Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.Command and client.FileCommand improvements #66

Open
Jaymon opened this issue Jun 20, 2020 · 0 comments
Open

client.Command and client.FileCommand improvements #66

Jaymon opened this issue Jun 20, 2020 · 0 comments

Comments

@Jaymon
Copy link
Owner

Jaymon commented Jun 20, 2020

path = testdata.create_file(contents=[
    "#!{}".format(testdata.get_interpreter()),
    "print('hello')
])

s = testdata.FileCommand(path)

Didn't work because FileCommand added the .py suffix, it would be nice to fix that by being able to pass in a value to the FileCommand.__init__() method.

So I switched it to:

s = testdata.Command(path)

But that failed because path didn't have the right permissions, so it might be worth having the files be default 777 or having an easy way to set these permissions, even if it was a create_script() method.

What finally worked was:

s = testdata.Command("{} {}".format(testdata.get_interpreter(), path))

Which doesn't seem ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant