[python-win32] path to START MENU folder
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 folders: AllUsersDesktop,AllUsersStartMenu,AllUsersPrograms,AllUsersStartupDesktop,Favorites,Fonts,MyDocuments,NetHood,PrintHood,Recent,SendToStartMenu,Startup Templates Saludos Peter Jessop ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32
[python-win32] detecting windows type
On 9/8/05, le dahut [EMAIL PROTECTED] wrote: Hello, How is it possible to detect which kind of windows a python script is running on ? (9x, Me, 2k, XP, 2k3) from win32api import * GetVersionEx() An other question: I've a script using win32com.client.Dispatch(WbemScripting.SWbemLocator) but it doesn't seem to function on win 9x. This script is intended to detect the computer's network configuration (gateway, dns, ip addr, subnet mask). Does someone know how to obtain those informations on a win 9x ? Windows 9x came without support for WMI. You can download WMI Core from http://www.microsoft.com/downloads/details.aspx?FamilyId=98A4C5BA-337B-4E92-8C18-A63847760EA5displaylang=en although the implementation is quite limited Regards Peter Jessop ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32
[python-win32] Null provokes unicode error.
Good day all: I have a trivial problem that I would be grateful for help with. I am running python 2.4.1 withPython for Windows extensions build 204.When I run the following script after returning some lines correctly I find the following error. 'Traceback (most recent call last): File C:\Scripts\Script2.py, line 4, in ?print objChild.Name + '\t' + objChild.DescriptionTypeError: coercing to Unicode: need string or buffer, NoneType found'This happens when the description value is null. How do I avoid this problem?Code import win32com.client objContainer = win32com.client.GetObject(LDAP://cn=users,dc=agri,dc=local) for objChild in objContainer: print objChild.Name + '\t' + objChild.Description Thanks Peter Jessop ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32
[python-win32] Null provokes unicode error.
Amit, Simon Thanks for the help Peter ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32
[python-win32] Ugh...native Windows interactive Python 2.4 in Cygwin termin
-- Forwarded message --From: Peter Jessop [EMAIL PROTECTED]Date: Aug 7, 2005 6:12 PM Subject: Re: [python-win32] Ugh...native Windows interactive Python 2.4 in Cygwin terminalTo: Matthew Bogosian [EMAIL PROTECTED]I have Cygwin installed here although I confess that I don't use it much and can probably be of little help and apologise if this is the case. However I tried the following bash-2.05b$ d:/Python24/python.exe Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win3 Type help, copyright, credits or license for more information. print Works here2 File stdin, line 1 print Works here2 ^ SyntaxError: EOL while scanning single-quoted string print Works here Works here I don't know if this is of any help to you but it may just be a problem of your installation. Regards Peter Jessop ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32
[python-win32] Excel automation
Hi Tim Thanks for your quick response. I had determined that putting none zero values did not provoke the error, but did not realise the reason. However c.Offset (2, 2) should change the active cell (1 down and 1 right, if it is 1-based), but it doesn't Regards Peter ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32