execute a shell script from a python script
Hi all, I know nothing about Python. What I need to do is to get a Python script to execute a local shell script. I do not need any output. What would be th eeasiest way to accomplish this? Thanks! -- http://mail.python.org/mailman/listinfo/python-list
Re: execute a shell script from a python script
Thanks, actually there are no args, is there something even simpler? Thanks Frank Thomas Nelson wrote: > If your script is foo.sh and takes args: > import subprocess > subprocess.call(["foo.sh","args"],shell=True) > Should work fine. check out > http://www.python.org/dev/doc/maint24/lib/module-subprocess.html > > Enjoy, > THN > > spec wrote: > > Hi all, I know nothing about Python. What I need to do is to get a > > Python script to execute a local shell script. I do not need any > > output. What would be th eeasiest way to accomplish this? > > > > Thanks! -- http://mail.python.org/mailman/listinfo/python-list
fails to call python from jython for types, functools, csv modules
Hello I'm very new to python/jython, and trying yo *call a program from jython*, which works very good in python. I got some issues which resolve as I expose here, but I think these are unsatisfactory solutions. If you want to reply please do it to my address. thanks, Jx PD. both are great projects!!! 1. FIRST Error Error !Traceback (most recent call last): File "", line 1, in File "__pyclasspath__/parserJoax.py", line 1, in File "C:\Python26\lib\re.py", line 283, in import copy_reg File "C:\Python26\lib\copy_reg.py", line 7, in from types import ClassType as _ClassType File "C:\Python26\lib\types.py", line 36, in BufferType = buffer NameError: name 'buffer' is not defined *Solution --> comment in types.py #BufferType = buffer (line 37)* 2. SECOND Error Error !Traceback (most recent call last): File "", line 1, in File "__pyclasspath__/parserJoax.py", line 3, in File "C:\Python26\lib\csv.py", line 7, in from functools import reduce File "C:\Python26\lib\functools.py", line 10, in from _functools import partial, reduce ImportError: cannot import name reduce *Solution --> comment in functools.py #, reduce (line 10) Problem --> IDLE for windows doesn't work anymore, I mean I can lauch the GUI, but I can still use python from command line* 3. THIRD Error Error !Traceback (most recent call last): File "", line 1, in File "__pyclasspath__/parserJoax.py", line 3, in File "C:\Python26\lib\csv.py", line 7, in from functools import reduce ImportError: cannot import name reduce *Solution --> comment in csv.py #...@fieldnames.setter (line 96)* -- http://mail.python.org/mailman/listinfo/python-list
Fwd: fails to call python from jython for types, functools, csv modules
Hello I'm very new to python/jython, and trying yo *call a program from jython*, which works very good in python. I got some issues which resolve as I expose here, but I think these are unsatisfactory solutions. If you want to reply please do it to my address. thanks, Jx PD. both are great projects!!! 1. FIRST Error Error !Traceback (most recent call last): File "", line 1, in File "__pyclasspath__/parserJoax.py", line 1, in File "C:\Python26\lib\re.py", line 283, in import copy_reg File "C:\Python26\lib\copy_reg.py", line 7, in from types import ClassType as _ClassType File "C:\Python26\lib\types.py", line 36, in BufferType = buffer NameError: name 'buffer' is not defined *Solution --> comment in types.py #BufferType = buffer (line 37)* 2. SECOND Error Error !Traceback (most recent call last): File "", line 1, in File "__pyclasspath__/parserJoax.py", line 3, in File "C:\Python26\lib\csv.py", line 7, in from functools import reduce File "C:\Python26\lib\functools.py", line 10, in from _functools import partial, reduce ImportError: cannot import name reduce *Solution --> comment in functools.py #, reduce (line 10) Problem --> IDLE for windows doesn't work anymore, I mean I can lauch the GUI, but I can still use python from command line* 3. THIRD Error Error !Traceback (most recent call last): File "", line 1, in File "__pyclasspath__/parserJoax.py", line 3, in File "C:\Python26\lib\csv.py", line 7, in from functools import reduce ImportError: cannot import name reduce *Solution --> comment in csv.py #...@fieldnames.setter (line 96)* -- http://mail.python.org/mailman/listinfo/python-list