[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: anox



Sébastien Bertrand <thedamocles@gmail.com> writes:
>>  - It probably does not handle whitespace in command names or
>>   directories.
>
> It handles complex command without problem.

How?  anonx does

  app = ' '.join(sys.argv[1:])  # Pick all arguments,

but calling

  foo "bar x"

is not the same as calling

  foo bar x.

Similar for directories: if the current work directory is something like
"/foo/bar foo", then

  f.write("cd " + directory + "\n")

will not work. (Everything except \0 can appear in a path.)

>>  - From the documentation on Popen.wait[1]:
>>   "Warning: This will deadlock when using stdout=PIPE and/or
>>   stderr=PIPE and the child process generates enough output to a pipe
>>   such that it blocks waiting for the OS pipe buffer to accept more
>>   data."
>
> Ok, I'm not sure to understand how to write the code, but I'll check that point.

You could just not redirect stdout (same as stderr).

Ansgar


Reply to: