Problem with Dos command by python script
GadgetSteve at live.co.uk
Thu Sep 15 07:31:06 CEST 2011
On 14/09/2011 9:13 PM, Jonatas Emidio wrote:
> Here i come!!
> I have the following problem...
> I need run by python script a string with some "DOS commands - Windows
> For exemple:
> print 'cd temp'
> print 'mkdir temp_app'
> How can i run this string in the python, but as a DOS interpreter?
The direct answer to your question is to tell you to take a look at the
subprocess module documentation but if the above is what you would like
to do then take a look as os.chdir(), os.mkdir(), os.mkdirs() and then
do the above in python.
I would also suggest that you should raise this sort of question at
More information about the Python-list