On Tue, Nov 27, 2012 at 10:25 AM, Michel Samia <[email protected]> wrote: : > Thank you very much for the new functionality.
If you like GNU Parallel: * Post the intro videos on Reddit/Diaspora*/forums/blogs/ Identi.ca/Google+/Twitter/Facebook/Linkedin/mailing lists * Get the merchandise https://www.gnu.org/s/parallel/merchandise.html * Give a demo at your local user group * Request or write a review for your favourite blog or magazine * Request or build a package for your favourite distribution (if it is not already there) * Invite me for your next conference (Contact http://ole.tange.dk) If you use GNU Parallel for research: * Please cite GNU Parallel in you publications (use --bibtex) If GNU Parallel saves you money: * (Have your company) donate to FSF https://my.fsf.org/donate/ > Unfortunately I wasn't able > to reproduce the expected behaviour of this script simple.py > > #!/usr/local/bin/parallel --shebang-wrap --pipe -k -j24 /usr/bin/python > # should work like cat > import sys > > for line in sys.stdin: > sys.stdout.write(line) > > When I run > > echo 'bla' | ./simple.py > > sometimes it hangs and my mouse cursor changes its shape to s cross and > sometimes it prints error messages: > > michel@bellatrix:/tmp$ echo bla | ./simple.py > ./simple2.py: line 6: syntax error near unexpected token `sys.stdout.write' > ./simple2.py: line 6: ` sys.stdout.write(line)' > > which probably means that the script is run by bash, not by Python. That is odd. I just tried using your exact program on two different systems (Ubuntu and Debian) and it works for me. That leads me to believe it is a local problem on your system. It would be good if others could test your script, too. On your system please try creating a new user and run the same as the new user. Hopefully that will give you a clean environment. /Ole
