Re: [python-win32] detecting windows type

2005-09-09 Thread le dahut
Maybe I can parse the output of a 'ipfonfig' command, but commands.getoutput only work with unix, not with windows. Is there another way to get the output of a command line program under windows ? K. Le jeudi 08 septembre 2005 à 17:24 +0200, Peter Jessop a écrit : On 9/8/05, le dahut [EMAIL

[python-win32] Localization

2005-09-09 Thread Bokverket
Hi, new to the list and to Python but enthusiastically on the move into both... I am from the world outside A-Za-z country. I wrote a simple text processing application in Python which I eventually would like to integrate with Microsoft Word. Right away, the following localization problems

[python-win32] handling paths in windows services

2005-09-09 Thread Jason
I get the following error when trying to run a python script as a service The instance's SvcRun() method failed File win32serviceutil.pyc, line 742, in SvcRun File winService.pyc, line 134, in SvcDoRun File winService.pyc, line 83, in RunMe File config.pyc, line 28, in readConfig

[python-win32] path to START MENU folder

2005-09-09 Thread Chavez Gutierrez, Freddy
Title: path to START MENU folder Somewhere I found this code to get the path to the DESKTOP folder: from win32com.shell import shell df = shell.SHGetDesktopFolder() pidl = df.ParseDisplayName(0, None,::{450d8fba-ad25-11d0-98a8-0800361b1103})[1] mydocs = shell.SHGetPathFromIDList(pidl)

[python-win32] Re: path to START MENU folder

2005-09-09 Thread Roger Upole
shell.SHGetSpecialFolderPath(0,shellcon.CSIDL_COMMON_STARTMENU) should do the trick. Roger ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] path to START MENU folder

2005-09-09 Thread Peter Jessop
Hola Freddy Another way of doing it would be to use the WScript.Shell object: import win32com.client objShell = win32com.client.Dispatch(WScript.Shell) allUserDocs = objShell.SpecialFolders(AllUsersDesktop) print allUserDocs similarly you can use the following to obtain access to other special

Re: [python-win32] detecting windows type

2005-09-09 Thread Tim Roberts
On Fri, 09 Sep 2005 09:42:18 +0200, le dahut [EMAIL PROTECTED] wrote: Maybe I can parse the output of a 'ipfonfig' command, Nope, that won't work. Ipconfig is NT-only. 95 and 98 have winipcfg, but it is a GUI tool, not a command-line tool. but commands.getoutput only work with unix, not

Re: [python-win32] handling paths in windows services

2005-09-09 Thread Gabriel Genellina
At Friday 9/9/2005 11:08, you wrote: The 'svc.cfg' is on the the same directory that contains the python script, but its path is obviously not available to the windows service. Short of using absolute paths, what would be the correct way to handle this. Try this: import os,sys print