Hi all
1.I want to know how do i write batchfile kind of file in python so that it
executes some commands. Code snippets are required.
2.As well how do i invoke command prompt.
Actually what i need is that i have to perform certain things in
windows...first i have to go to start-run-type cmd
1)
filename = C:/Program Files (x86)/NSIS/makensisw.exe
doc = install.nsi
status = os.system('%s %s' % (filename, doc))
print Status: , status
If you have long running program you want the output from there are
other options but the above is easiest imho.
2) just open the python file using the
a h wrote:
Hi all
1.I want to know how do i write batchfile kind of file in python so
that it executes some commands. Code snippets are required.
import os
os.system(command)
e.g. os.system( c:\temp_folder\next_folder\test.exe)
2.As well how do i invoke command prompt.
Not sure what
Hi
I have just updated to python 2.6 and also updated the py win package to
pywin32-213.win32-py2.6. The GUI now seems to not get the XP look and feel it
had before on the python 2.5 installation. I am running on a Windows Vista
machine, but the change seems to be the same on XP. The code
a h wrote:
thanks for the reply, what i have done to set up the environment
variables is open the command prompt and then has given the whole path
of c:\..\vsvars32.bat and then enter.
A message appear is setting environment for using MS visual studio.
and then using DEVENV i had build my
Everyone:
If I read the request correctly, this question is about how to set
environment variables from a python script.
In other words: what is the Python equivalent of the DOS command:
SET envrmnt=This is the new value
If my experience is correct (I would love it if someone will tell me that I
That logic seems weird to me.
This is why it feels weird:
The cmd shell itself is a running application that only changes its own
environment parameters. This is no different from the limitation that
Python's os.putenv has, as it only affects the Cmd process and children
of that process. It
Vernon Cole wrote:
If I read the request correctly, this question is about how to set
environment variables from a python script.
In other words: what is the Python equivalent of the DOS command:
SET envrmnt=This is the new value
Well, his question was a bit different, but this is part of
Vernon Cole wrote:
Similarly, it seems that getenv() and putenv() should be inverse
functions, but they are not. os.getenv() refers to the parent
environment, os.putenv() refers to the child environment.
No, no, no! That's not true at all! BOTH of those functions refer to
the environment of
Tim:
Okay, explain this...
C:\BZR\sterling\HL7c:\python26\python.exe
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
on
win32
Type help, copyright, credits or license for more information.
import os
os.putenv('x','test')
print os.getenv('x')
zzz
exit()
Vernon Cole wrote:
Tim:
Okay, explain this...
C:\BZR\sterling\HL7c:\python26\python.exe
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)]
on
win32
Type help, copyright, credits or license for more information.
import os
os.putenv('x','test')
print os.getenv('x')
11 matches
Mail list logo