Re: [python-win32] python print statements

2009-01-07 Thread Jim Vickroy
Nalli Dinesh wrote: Hi, python print statements are extensively used in my application for debugging purpose. My application is ready, but I do not want to remove the print statements and at the same time I do not want python interpreter to execute/run the print statements. How can I accompl

Re: [python-win32] Windows Service and APPDATA for AUTO startup

2009-01-06 Thread Jim Vickroy
Tim Roberts wrote: Jim Vickroy wrote: Tim Roberts wrote: Is this a custom account you created? Does it actually have a profile (C:\Documents and Settings\Custom User\Application Data)? Yes, that folder does exist. When started manually (with that account) the Service works

Re: [python-win32] Windows Service and APPDATA for AUTO startup

2009-01-06 Thread Jim Vickroy
Tim Roberts wrote: jim.vick...@noaa.gov wrote: Hello everyone, *_ Background _* 1. I've created a Windows Service that looks for its configuration data in a sub-folder of/ os.environ['APPDATA']/. 2. The Service is configured to automatically start after host reboot. 3. The Ser

[python-win32] Windows Service and APPDATA for AUTO startup

2009-01-06 Thread jim . vickroy
Hello everyone,Background I've created a Windows Service that looks for its configuration data in a sub-folder of os.environ['APPDATA']. The Service is configured to automatically start after host reboot. The Service runs successfully when manually started under its custom (i,e,, not Local Sys

Re: [python-win32] how to determine the version of pywin programmatically ?

2008-12-09 Thread Jim Vickroy
Mark Hammond wrote: Jim Vickroy wrote: I notice that the build number appears in: * pywin32.version.txt but I was hoping for something similar to numpy or PIL. I can't see a huge gain in pywin32 opening that file just to make it available in __version__, and having it man

[python-win32] how to determine the version of pywin programmatically ?

2008-12-09 Thread Jim Vickroy
Hello all, I'm writing a script to determine the versions of various installed software packages. How do I access the pywin32 build number from within a script? For example: * for the numpy package, it is: numpy.__version__ * for the PIL package, PIL.Image.VERSION seems to work I noti

[python-win32] Microsoft Visual Sourcesafe automation --

2008-09-10 Thread Jim Vickroy
Hello all, I am attempting to automate Sourcesafe access. Here is a sample session: >>> import sys >>> sys.version '2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]' >>> sys.subversion ('CPython', 'tags/r252', '60911') >>> sys.platform 'win32' >>> sys.getwindowsversion() (5

Re: [python-win32] Newbee question

2007-08-20 Thread Jim . Vickroy
- Original Message - From: RANDALL HOWELL <[EMAIL PROTECTED]> Date: Monday, August 20, 2007 1:53 pm Subject: [python-win32] Newbee question > I am trying to figure out how to code my stop pay. I > get paid 40 cents a stop for the first 22 stops, and > $1.40 for stops after that. > stops

Re: [python-win32] Threading Issue

2007-07-03 Thread Jim Vickroy
James Matthews wrote: Thanks Emlyn Just one more issue i have here. When i pass a string as an argument to the thread it seems to call the method returning the string as a tuple and i get an error that the method gets 48 arguments and it can only accept 2? If this doesn't make sense here is

Re: [python-win32] Threading Issue

2007-07-03 Thread Jim Vickroy
James Matthews wrote: Dear List. When spawning a thread using the threading module syntax new_thread = threading.Thread(target=function_returning_a_list) How can i get the list that this function is supposed to return. Thanks James -- http://www.goldwatches.com/watches.asp?Brand=14 http://

Re: [python-win32] Threading Issue

2007-07-03 Thread Jim Vickroy
James Matthews wrote: So i need to make the list a global variable It could be but that is not necessary. The list is simply a variable known to the program unit that creates the threading.Thread(...) instance. On 7/3/07, *Jim Vickroy* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]&g

Re: [python-win32] Python COM and Photoshop

2007-05-01 Thread Jim Vickroy
Sam The Cat wrote: > Help ! > > I am writing some COM code in Python to control photoshop. Several > functions of PS require an "Array" argument. In the examples of VBscript > or javascript the Array type is used. I have tried what would appear to be > the equivalent in Python -- Lists and Tup

Re: [python-win32] Release notes for Build 210

2007-03-19 Thread Jim . Vickroy
H. They are visible for me. What do you see when you click on the "Notes" icon adjacent to the "Monitor" icon? -- jv - Original Message - From: Tony Cappellini <[EMAIL PROTECTED]> Date: Monday, March 19, 2007 1:12 pm Subject: [python-win32] Release notes for Build 210 > I'm trying

Re: [python-win32] Opening an DAO database with password?

2007-02-06 Thread Jim Vickroy
Grzegorz Adam Hankiewicz wrote: Grzegorz Adam Hankiewicz wrote: Hello. I'm following http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52267 to open a local .mdb file and export the contents. It works with normal databases, but I cannot open a password protected database. Accordin

Re: [python-win32] Does pywin32-odbc support several users?

2006-11-17 Thread Jim Vickroy
rieh25 wrote: >I'm thinking of implementing pywin32 to implement access to an Oracle >database, to users of an application built in Zope . Is this a good idea, or >is pywin32's odbc feature intended for a single user? > >Thanks > > pywin32's odbc interface provides connection objects -- as many

Re: [python-win32] FW: Python script as a windows service

2006-11-02 Thread Jim Vickroy
I am not familiar with this approach (and I am working on a machine where I do not have admin privileges), but an alternative is to download the Windows extensions for Python by Mark Hammond (et. al.) at: http://sourceforge.net/projects/pywin32/ which makes writing a Windows service simple as

Re: [python-win32] Measuring cpu, memory and bandwith used by an application

2006-08-29 Thread Jim Vickroy
Tor Erik Sønvisen wrote: >Given a process id (or some other identificator), is it possible to >monitor resource usage of that process only? >___ >Python-win32 mailing list >Python-win32@python.org >http://mail.python.org/mailman/listinfo/python-win32 >

Re: [python-win32] Problem with python-win32

2006-08-25 Thread Jim Vickroy
[EMAIL PROTECTED] wrote: Hi, I'm an engineer from France and I use PythonWin very often. I Have one question please : I'd like to run a function from a library included in the "Tools=>COM Browser=>Registered Type Librairies" menu. This library is called "Bibiothèque de pilotage de Scandi

Re: [python-win32] ADO memory leak?

2006-08-25 Thread Jim Vickroy
scripts have always been run using python.exe rather than pythonwin, and my observations on memory usage come from the Windows Task Manager. Roger Upole wrote: Jim Vickroy wrote: I have a "fairly" simple test script that appears to exhibit a memory leak when using ADO

Re: [python-win32] ADO memory leak?

2006-08-24 Thread Jim Vickroy
Tim Roberts wrote: Jim Vickroy wrote: I have a "fairly" simple test script that appears to exhibit a memory leak when using ADO to insert rows in a SQL Server database via a persistent connection. Memory requirements monotonically increase with time (apparently in 4k

[python-win32] ADO memory leak?

2006-08-24 Thread Jim Vickroy
I have a "fairly" simple test script that appears to exhibit a memory leak when using ADO to insert rows in a SQL Server database via a persistent connection. Memory requirements monotonically increase with time (apparently in 4k increments). I'm using python 2.4.1,  win32com (pywin32 build 2

Re: [python-win32] unzip a file

2006-07-17 Thread Jim . Vickroy
- Original Message - From: "Ahmed, Shakir" <[EMAIL PROTECTED]> Date: Monday, July 17, 2006 12:23 pm Subject: Re: [python-win32] unzip a file > HI all, > > I am new python and looking scripts for unzip files form a local > folder.Any help is highly appreciated. > > Thanks in advance. >

Re: [python-win32] ADOX catalog.Table.Append error -- 'The parameter is

2006-07-12 Thread Jim Vickroy
Roger Upole wrote: Jim.Vickroy wrote: Hello, I am a novice user of ADOX who is attempting to create a database and a table in it. I seem to be able to create a SQL Express database but am unable to add a table to it. The attached script (adox.py) illustrates the difficulty. A

[python-win32] ADOX catalog.Table.Append error -- 'The parameter is incorrect.',

2006-07-10 Thread Jim . Vickroy
Hello, I am a novice user of ADOX who is attempting to create a database and a table in it. I seem to be able to create a SQL Express database but am unable to add a table to it. The attached script (adox.py) illustrates the difficulty. Any suggestions would be appreciated. Thanks, -- jv ''

[python-win32] ADOX Delete method ?

2006-07-07 Thread Jim Vickroy
ADOX Catalog objects appear to have a Delete method (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/admscadoddlmethods.asp) but I'm not seeing it from python-win: >>> from win32com.client import Dispatch >>> catalog = Dispatch('ADOX.Catalog') >>> print dir(catal

Re: [python-win32] detect file modification event

2005-10-20 Thread Jim Vickroy
Fantastic! That's it exactly. I was hoping to avoid polling and this shows me how. Thanks much. -- jv Tim Golden wrote: >[Jim Vickroy] > > > >>Sorry if this has been previously answered, but my search failed to >> >> >detect it. > > &g

[python-win32] detect file modification event

2005-10-20 Thread Jim Vickroy
Sorry if this has been previously answered, but my search failed to detect it. Could someone refer to information on how to detect file modification (e.g., update) events in MS Windows? Thanks, -- jv ___ Python-win32 mailing list Python-win32@python.

Re: [python-win32] Comparing dbase date value with os.path.getmtime(filename)

2005-10-14 Thread Jim . Vickroy
You may wish to take a look at the time module (specifically) time.gmtime(...) or time.localtime(...)) to work with the return value from getmtime(...). Can't really help much with the return value from the database since I don't know what type of object it is. If you are using Python 2.3 or

Re: [python-win32] Simultaneous Adobe Reader

2005-09-22 Thread Jim Vickroy
Jorge Ramirez wrote: > Hello, > > From windows, using a python script how can I open Adobe Reader > without displaying a PDF document? Furthermore, using a script is it > possible to run two Adobe Reader sessions simulatneously. Thanks in > advance. > > Kind Regards, > JR > >-

Re: [python-win32] Running a script

2005-09-19 Thread Jim . Vickroy
Hello Roger, Assuming your Python installation is viable (does typing "python" sans quotes at the command line launch the Python interpreter?), have you renamed the file from "rtf2xml" to "rtf2xml.py" as required to run under MS Windows? -- jv Hello   Windows XP SP2.   I am a Python novic

Re: [python-win32] Looking for sample code

2005-09-06 Thread Jim Vickroy
Harish Kotian wrote: > Hi Friends > > I am looking for sample code using python script for: > 1) reading / displaying contents from MS Access database, probably > using ODBC drivers > 2) Reading from a sessions object, > Any pointers? > Regards > Harish. > > >-

Re: [python-win32] closing processes

2005-08-12 Thread Jim Vickroy
ryan pinto wrote: >hi - need some help, > >Looking for some way to close processes which are >open. Is there any way that a process can be detected >if its running and then closed. > >Ryan > >__ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the be

Re: [python-win32] Getting new thread's ID (not handle)

2005-08-01 Thread Jim . Vickroy
It is in the win32api module. -- jv It looks like GetThreadId is what I need, but I can't find that in any of the win32* modules.  I do see CreateThread in CVS in Pythonwin/win32thread.cpp, but I don't have a win32thread in my installation. On 8/1/05, Justin Johnson <[EMAIL PROTECTED]> wrote: MSD

Re: [python-win32] Querying Password Change Privilege on an Active Directory User Ac count

2005-07-29 Thread Jim Vickroy
Hello John, Why does it matter? Why not just ignore the specific type of exception raised by an invalid SetPassword() or SetInfo() request as follows: try: adsuser.SetPassword(trans.password) adsuser.SetInfo() except : pass # or whatever except : pass # or whatever except Exception,

Re: [python-win32] testing windows services

2005-07-05 Thread Jim Vickroy
Thomas Heller wrote: >Harald Armin Massa <[EMAIL PROTECTED]> writes: > > > >>Hello, >> >>within the win32-extensions under demo I found the pipetestservice.py and am >>developping my own services out of it. >> >>With each development step I have to >> >>stop the running service >>remove the exi

Re: [python-win32] (no subject)

2005-06-16 Thread Jim Vickroy
Assuming you have tkinter installed as part of your Python distribution, I have attached a demo (courtesy of Mark Hammond) that shows much of what is possible (e.g., menus, buttons, etc.). Hope this helps. -- jv habtamu gulilat wrote: am habtamu from Netherlands I need to prepare userinte