|
From: Humbel O. <Otm...@bi...> - 2001-12-12 11:05:33
|
Hi Kevin, others
I slowly begin to understand why Finn did not want to write this one :-)
I can successfully issue quite complex commands like:
os.system('alias')
os.system('alias tar')
os.system('echo this is my echo !')
os.system('env')
os.system('java')
os.system('java -version')
os.system('java -classpath /bison/neighborhood/iSeriesInfra/java/lib
CH.obj.Libraries.Utility.TestOutput', jvm=3D1)
os.system('ls')
os.system('ls -l')
os.system('set')
os.system('system -v ping rmtsys(alpsemsrv6)') # this issues the
native 'PING' command
However, there are some commands for which I didn't find a way to pass
hyphenated options to, like:
os.system('alias -p')
- no idea why. Now I have to check each command if it accepts options
starting with '-', this will take some time ... . I see no solution at
the moment, I can only document these commands.
Please also notice the jvm=3D1 flag in the 'java -classpath' command:
os.system needs to be telled if a JVM is going to be started, because in
this case the encoding is different. In fact, IF a jvm is started, I can
use your (Kevin's) code unchanged :-)
Now my questions:=20
Is this 'extension' to os.system() - it will silently ignore the jvm
flag on most platforms - acceptable ?
Shall I proceed ?
If you tell me this has little chances to be checked into cvs, then I'll
give up my 'two-hours-a-day-research'.
I attach the current javaos.py FYI (It still needs to be worked over,
though).
Thanks for your feedback !
Oti.
PS. I think it would not be a big think to replace re, since we are only
using re.match(), won't it ?
|