com: makepy gencache.EnsureModule

2007-08-10 Thread Kai Rosenthal
Hello, I' having a problem with gencache.EnsureModule: I used win32com\client\makepy.py to successfully generate Python sources. Unfortunately, after I call win32com.client.Dispatch(), the object I get back is of type "COMObject" instead of one of the generated classes. In particular, I'm trying

determine 32 or 64 bit architecture with python 2.2

2007-06-19 Thread Kai Rosenthal
Hello, how can I determine the architecture (32 or 64bit) with python 2.2 on Windows or Unix (AIX, Solaris) OS, without the modul platform? Thanks for your hints, Kai -- http://mail.python.org/mailman/listinfo/python-list

resolve environment variables in string - regular expression

2007-02-09 Thread Kai Rosenthal
Hello, how can I resolve envionment variables in a string. e.g. strVar = /myVar resolve in str1 = /mytest02/$MYVAR/mytest02 --> /mytest02//myVar/mytest02 (unix) str2 =$MYVAR/mytest03 --> /myVar/mytest03 (unix) str3 =%MYVAR%/mytest03 --> /myVar/mytest03 (windows) I would not set the va

Windows: get owner and group of a file

2006-12-06 Thread kai rosenthal
Hello, with ls -l on windows I get -rw-r--r-- 1 500 everyone 320 Nov 09 09:35 myfile How can I get on windows with a standard python 2.2 (without windows extensions) the information "500" and "everyone" (owner and group)? Also I cannot use popen('ls -l'). With import stat stat_info = os.lstat(my

os.access(file, os.R_OK) on UNIX and WINDOWS

2006-09-13 Thread kai rosenthal
Hello, on UNIX I changed the permission of a file "myfile" with chmod 000 myfile. Then I got 0 from os.access(myfile, os.R_OK). This is ok. Then I checked the same file on WINDOWS (with samba): I got "True" from os.access(myfile, os.R_OK). I think it is not ok?! In my python script I check the r