[python-win32] win32file.CreateSymbolicLink and

2009-06-17 Thread Roger Upole
Devin Jeanpierre wrote: I'm new to pywin32 development, but wanted to toy with creating symlinks (and related new things) with a similar API to the current os module. The documentation in pywin32 states that the only flag is "SYMLINK_FLAG_DIRECTORY" (MSDN docs state that in the C++ API, the only

[python-win32] regarding invoking command prompt using python

2009-06-17 Thread Roger Upole
Vernon Cole wrote: Tim: Okay, explain this... C:\BZR\sterling\HL7>c:\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

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Vernon Cole
Tim: Okay, explain this... C:\BZR\sterling\HL7>c:\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 >

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Tim Roberts
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

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Tim Roberts
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

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Philip Bloom
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 doe

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Vernon Cole
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

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Tim Roberts
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 buil

[python-win32] Problem with winxpgui

2009-06-17 Thread Christian Sørensen
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 in

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread bob gailer
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

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Gerdus van Zyl
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 u

[python-win32] regarding invoking command prompt using python

2009-06-17 Thread a h
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 th