|
From: Phil S. <phi...@ho...> - 2001-11-02 06:29:44
|
Looks like we are each doing some of the same work. Hopefully we can merge our changes - I made a number of them. I haven't got a linux box to test with tonight; can you try wrapping the arguments with quotes? i.e. instead of '/bin/sh -c %s' use '/bin/sh -c "%s"' chuck clark wrote: > > Kevin... > I've got a real interest in getting your os module to work so I began tonight > trying to get it to run on my unix boxes - one solaris and one linux. I > started testing on the linux box first which is running mandrake 8.1, > jython2.1a3 and the IBM JDK 1.3. When I first ran the module there were errors > because you call a method on __shellExec when you define it as _shellExec. > Simple typo - but once fixed the tests fail for me with the message: > AssertionError: echo hello there failed with default environment > > I started looking into it a little deeper and it appears than any command with > arguments fail. If i add "ls", "date" and "uptime" to the beginning of the > testCmds list they work. However when I add in "ls -l" I get the assertion. > It appears the shell returns with an exit code of 2. sh on my machine is bash. > I tried it with csh and tcsh and the exit code is 1. This is going to be some > quirky unix shell thing it looks like. I'm experiementing now and reading man > pages. Anyone else with more unix knowledge know what might be happening here? > > chuck > > On Thu, 01 Nov 2001 23:51:32 -0800 > Phil Surette <phi...@ho...> wrote: > > > Thanks Kevin! Great stuff. > > > > I tested it out on my Win 2000 box. > > My linux box is unavailable right now, but I can test > > it on that soon if no one else does. > > > > I'm a version of the script with > > the following modifications: > > > > The os checks were limited to Windows NT, so I went over > > to http://www.tolstoy.com/samizdat/sysprops.html > > and got a list of the os.name strings there and > > added them in along with some guesses. > > > > Under the Win95 stream I believe the correct command > > is 'command /c' so I poked that in, hope someone can > > verify that this works. I'm relying on > > http://www.easydos.com/dosindex.html for this info. > > > > Under win32, os.environ should be case-insensitive, > > so I added that in as well (this follows > > cpython's behaviour). Case-sensitivity should be > > maintained for everything else (but this is untested). > > > > I didn't really take an in-depth look at the module > > other than to verify that it seems to work as > > expected. > > > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev |