Re: [python-win32] cannot create 'NoneType' instances

2008-08-31 Thread Larry Bates
Arun Kumar wrote: hi, I'm new to python as well as pywin. I'm having trouble with the following code: _ListenerBase = win32com.client.getevents("SAPI.SpSharedRecoContext") class _ListenerCallback(_ListenerBase): """Created to fire events upon speech recognition. Instances of this class

Re: [python-win32] Adding an exe to startup...

2008-09-16 Thread Larry Bates
John Bunting wrote: Hey everyone, I've been having some trouble finding information on how to add an exe that I have created to the startup of my windows box. I would like to know how I should go about adding the exe to the startup menu, without using the gui interface. I want to be able to

Re: [python-win32] Extending DLL search path?

2008-09-30 Thread Larry Bates
Arve Knudsen wrote: Hi I have a C++ program which embeds Python and is itself modularized into several DLLs. The Python part (extensions) of the application again links to these DLLs, the problem is the containing catalog (also containing the executable itself) is not on the PATH, so the DLLs ar

Re: [python-win32] NT service and login prompt

2008-09-30 Thread Larry Bates
le dahut wrote: Hello, Is it possible to tell windows to wait a python service has started before the login prompt is displayed ? Probably not, but why would you want to implement something that does? Share your use case with us and perhaps we can be of more assistance. -Larry ___

Re: [python-win32] Closed Source Service

2008-10-16 Thread Larry Bates
Max Lynch wrote: Hi, I was wondering if it's possible to make a closed source service using python win32 and PythonService.exe? Thanks, Max ___ python-win32 mailing list pyth

Re: [python-win32] Interacting with the desktop as a service on Vista

2008-10-21 Thread Larry Bates
Matt Herbert (matherbe) wrote: Hey all, So I have a service that needs to interact with the desktop on a Vista machine. I've read multiple articles about Vista's updated security and it's restrictions on services. So I realize that in order for the service to interact with desktop, I'm going to

Re: [python-win32] Win32 service with tray icon

2007-05-09 Thread Larry Bates
ost does what I want. I thought about using socket server/client to have the two apps communicate but I'm at a complete loss as to how to implement socket client in the systrayicon.py program since it uses PumpMessages. I just don't see how to connect to my com server (whic

Re: [python-win32] Problem with Raw datatype

2007-06-08 Thread Larry Bates
swarna np wrote: > Hi All, > > I am using Oracle as by DBMS and Python for front end. > > I am having a problem with 'Raw' data type of Oracle, it is as follows: > > 1. When I fetch a column whose type is 'Raw' it's being formatted. > For ex: The value in the DB is : FEEDEE007F91500D9638994600A

Re: [python-win32] Windows service problem

2007-06-12 Thread Larry Bates
Dalton, Tom wrote: > Hi, > > I'm using pywin32 on WinXP embedded to run a server service (using > Win32serviceutil.py). The service is installed correctly and set up to > run automatically on startup, which it does. The machine boots to the > logon screen and the service can be verified to be runn

[python-win32] win32 build 210 install error message

2007-06-22 Thread Larry Bates
PyErr_WarnEx could not be located in the dynamic link library python25.dll. Any ideas what I need to do? Thanks in advance. Larry Bates ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] win32 build 210 install error message

2007-06-23 Thread Larry Bates
Roger Upole wrote: > Larry Bates wrote: >> I wanted to install the latest win32 extensions so I could gain access to >> win32cred objects. I downloaded and installed pywin32-210 and at the end of >> the >> installation got the following error message: >> >&

Re: [python-win32] urllib and Outlook 2007

2007-07-09 Thread Larry Bates
James Matthews wrote: > Dear List > > I have two questions. > > > 1. Is there any way to change the user-agent when using urllib.urlopen > without having to subclass it? > > 2. I cannot seem to find anything on reading outlook email using COM > everything i find is out dated can anyone give me

Re: [python-win32] urllib and Outlook 2007

2007-07-10 Thread Larry Bates
James Matthews wrote: > Thank you Larry however those websites don't help me when i want to be > able to retrieve email content. > > On 7/9/07, *Larry Bates* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > James Matthews wrote: >

Re: [python-win32] High Baud Rate Serial Port Question

2007-07-21 Thread Larry Bates
Jeff Taylor wrote: > I know this has probably been brought up many years ago, but I'm rather > new to Python. > > Is there a way to open a serial port with a baudrate greater than > 115.2kbps? I'm currently using pyserial and it can handle over 115.2, > but when it calls win32file, win32file gi

Re: [python-win32] COM object Dispatch Error

2007-08-07 Thread Larry Bates
lucemia wrote: > Hi: > > I have a problem about using win32com in python. > > I am using a software called CSTStudio to do my project. > CSTStudiod could be used in VBA Script currectly to start or execute > program via COM interface, > but it crashed in python win32com. > >> h = win32com.cli

Re: [python-win32] automating Adobe Indesign

2007-08-20 Thread Larry Bates
jelle wrote: > Hi, > > I'm working on scripting Indesign, a dtp app from Adobe. > Thing is that I'm able to dispatch the application via > win32com.client.Dispatch('Indesign.Application') > which works just fine, but the thing is that I have no idea which methods are > available: > > In [8]: ind

Re: [python-win32] Q: error when using win32print via apache: "null context handle"

2007-08-21 Thread Larry Bates
Because people were misusing local resources almost all access to hard drives, printers, etc. has been disabled in browsers. The two ways around this are: 1) Write an ActiveX plug-in that is installed in the browser that can send to the printer. 2) Either display a printable HTML page in the b

[python-win32] Writing .NET component in Python

2007-09-06 Thread Larry Bates
Does anyone have any insight where I would start looking for information on writing .NET compatible components in Python. I have a COM object that is written in Python and some developers have asked for a .NET port of it. I spent some time in Google and didn't come up with any information to

Re: [python-win32] Writing .NET component in Python

2007-09-06 Thread Larry Bates
Sidnei da Silva wrote: > [ Thomas Heller ] >> Not sure what you mean by .NET port. I have the impression (from reading, >> never >> used .NET myself) that .NET is able to use COM objects. It may be >> required that >> the COM objects must have a type library. > > That's my understanding too. I

Re: [python-win32] Automating logon/logoff

2007-10-17 Thread Larry Bates
Matt Herbert (matherbe) wrote: > Hello all, > > I am stumped trying to figure out how I can automate the login/logoff > procedure on Windows. Here is what I know so far. First, I can logoff > the system pretty easily using win32api.ExitWindowsEx() function. > Second, I can auto logon the system (a

Re: [python-win32] problem creating a simple COM server

2007-11-13 Thread Larry Bates
Kelie wrote: > Hello group, > > Following the example in Mark's book, I tried creating a simple COM server > exposing two methods from the re module. But could not get it to work. Here is > the code: > > class PythonModule_re: > _public_methods_ = ['pyfindall', 'pysplit'] > _reg_progid_ =

Re: [python-win32] Python and Excel via Cron

2007-11-21 Thread Larry Bates
Why are you using Cygwin cron instead of native Windows Task Scheduler (Windows version of cron-like scheduler)? These lines: > myExcel.Workbooks.Add('C:\Python24\\test.xls') > myExcel.Workbooks.Add('C:\Python24\\macro.XLA') > myExcel.ActiveWorkbook.SaveAs('C:\Python24\\test.xls') should re

Re: [python-win32] JPEG to TIFF conversion

2007-12-10 Thread Larry Bates
Manjeet Singh wrote: > Hi, >I am a new to the image conversion /compression concepts. I have few > thousands of images which were scanned in Uncompressed JPEG format(.Tiff > and .Jpeg). I am required to convert them to standard tiff files(CCIT > Group4). Is there any way to accomplish this i

Re: [python-win32] JPEG to TIFF conversion

2007-12-12 Thread Larry Bates
Larry Bates wrote: > Manjeet Singh wrote: >> Hi, >>I am a new to the image conversion /compression concepts. I have few >> thousands of images which were scanned in Uncompressed JPEG format(.Tiff >> and .Jpeg). I am required to convert them to standard tiff files

Re: [python-win32] Starting a .exe py2exe program in background mode.

2008-01-14 Thread Larry Bates
João Abrantes wrote: > Hello everyone. > I have made a python program and converted into an executable using > py2exe. Now I want him to start on windows startup without showing the > DOS Window... I have registered the program on windows startup registry key: > > key = _winreg.OpenKey(_winr

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-01 Thread Larry Bates
Pallavi Apotikar wrote: > > Actually, I have an excel sheet, where I am entering the data. > > I am reading the entered data in python. > > excel takes data as a string. > > before passing it to python, i wanted to check whether the entered > data(value) is a valid python data type. > > so in

Re: [python-win32] Fastest GDI loop

2008-02-08 Thread Larry Bates
Gerdus van Zyl wrote: > Hi > > Please find attached my program (please excuse the mess) that uses > cairographics.org to draw on a win32 window using GDI. My question is: > What is the best event handling/drawing loop that one can have in > pywin32? Is for instance a message map faster or slower?

[python-win32] Help calling IProgressDialog Interface

2008-02-22 Thread Larry Bates
I've spent all morning searching and I just can't seem to find the TypeLibrary name for this COM interface. I've searched the registry, scanned COM browser list at least a dozen times, etc. Some information about this COM object is located here: http://www.com.it-berater.org/COM/windows_shell

Re: [python-win32] HTTP Server as a Windows Service

2008-02-22 Thread Larry Bates
Mike Smith wrote: > I've written the following script based on information I have found on > the web. The purpose of the script is to start an HTTP listener on the > machine it's running on that will give status on a particular process > running on that system that can be polled by an external

Re: [python-win32] Help calling IProgressDialog Interface

2008-02-22 Thread Larry Bates
Thomas Heller wrote: > Larry Bates schrieb: >> I've spent all morning searching and I just can't seem to find the >> TypeLibrary >> name for this COM interface. I've searched the registry, scanned COM >> browser >> list at least a dozen times,

Re: [python-win32] Help calling IProgressDialog Interface

2008-02-27 Thread Larry Bates
Thomas Heller wrote: > Larry Bates schrieb: >> Thomas Heller wrote: >>> Larry Bates schrieb: >>>> I've spent all morning searching and I just can't seem to find the >>>> TypeLibrary >>>> name for this COM interface. > >>&

Re: [python-win32] Help calling IProgressDialog Interface

2008-02-27 Thread Larry Bates
Tim Golden wrote: > Larry Bates wrote: >> I almost have it completely working with one remaining problem. The dialog >> allows the user to specify an AVI that runs showing activity while things >> are >> going in the background. There are AVIs stored in shell32.dll

Re: [python-win32] Help calling IProgressDialog Interface

2008-02-27 Thread Larry Bates
Larry Bates wrote: > Tim Golden wrote: >> Larry Bates wrote: >>> I almost have it completely working with one remaining problem. The dialog >>> allows the user to specify an AVI that runs showing activity while things >>> are >>> going in the back

Re: [python-win32] Finding the selected file in Windows Explorer

2008-04-22 Thread Larry Bates
Daniel Gonçalves wrote: Hi! I need to find the selected file(s) in a Windows Explorer window from another program (I'd look at the window that last had focus). I found something in the following page that should do the trick: http://blogs.msdn.com/oldnewthing/archive/2004/07/20/188696.aspx How

Re: [python-win32] Size of directory

2008-04-22 Thread Larry Bates
Tony Cappellini wrote: When I right click on a directory with windows Explorer, a window is displayed showing Size: Size On Disk: Contains: Created: Attributes: (with the appropriate values for each entry) How do I get the same information via Python ? I've looked at os.stat but os.stat(r

Re: [python-win32] Finding the selected file in Windows Explorer

2008-04-22 Thread Larry Bates
Daniel Gonçalves wrote: Larry Bates wrote: Daniel Gonçalves wrote: Hi! I need to find the selected file(s) in a Windows Explorer window from another program (I'd look at the window that last had focus). Daniel, What do you mean by "find the selected files". Give u

Re: [python-win32] Attaching Menu to Any App

2008-05-16 Thread Larry Bates
Tim Golden wrote: Tim Roberts wrote: What *I* said was that it could NOT be done in pure Python, but I was expecting Mark Hammond or Tim Golden to contradict me in such a pessimistic statement. ;) I was trying to hold back from a tirade of pointing out how foolish an idea this was. Why is it

Re: [python-win32] Request for comments

2008-05-29 Thread Larry Bates
is hard for me to read. While I'm not crazy about the pink background, that is probably a personal preference. -Larry Bates (Windows XP Pro, running dual monitors at 1600 x 1200). ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Capturing a Python script's Task Manager statistics

2008-06-20 Thread Larry Bates
[EMAIL PROTECTED] wrote: Anyone know of a way to have a Python script capture its own Task Manager statistics? I have a long running Python script whose CPU, memory, disk i/o, and network traffic I would like to monitor. An alternative more generic approach would be to run an 'observer' script

Re: [python-win32] return & tuples (& lists)

2008-06-29 Thread Larry Bates
Michel Claveau wrote: Hi! Not a question. Only a little note... (for readers without Sunday activity) In (pure) Python, consider this code: def ftest(): vret=(111,222,333) return(vret) print ftest() #give: (111, 222, 333) In (COM) Python, the same method of the c

Re: [python-win32] error in list length

2008-07-10 Thread Larry Bates
kNish wrote: Hi, The following lines of code gives an error starting with line where len() is used local_BkFiles = glob.glob(localDirectoryName+'\\*' + data + '*bk*') local_BkFiles.sort(key=str.upper) last_pv_File_Name = local_PvFiles[len(local_PvFiles)-1] spl

Re: [python-win32] sort error

2008-07-21 Thread Larry Bates
kNish wrote: Hi, I have had this issue for long now. Is it possible to have a work around for this. When these commands are run singly, they give a result. When run inside a script, the second line does not give a result. What is a possible work around for this. BkFiles.sort(key=str.upper) las

Re: [python-win32] Registering 3rd party DLLs

2008-07-21 Thread Larry Bates
Gal Aviel wrote: Hello All, I posted a related question in the py2exe mailing list, only to realize that the issue might be more related to this mailing list ... I'm distributing a python application as a self-contained executable using py2exe. My application relies on several 3rd party DL

Re: [python-win32] Cannot import "pyodbc" module

2008-07-21 Thread Larry Bates
Tim Golden wrote: Roger Upole wrote: Modules compiled as 32-bit won't work with 64-bit python. If there isn't a 64-bit version of pyodbc, you'll need to stick with 32-bit python (which continues to run well on 64-bit systems). I wonder whether (he says, talking to the air) it would be worth m

Re: [python-win32] error in list length

2008-07-21 Thread Larry Bates
knish wrote: Hi, Thank you for your reply. I will remember your point and send the code from the console. BRgds, kNish Larry Bates wrote: kNish wrote: Hi, The following lines of code gives an error starting with line where len() is used

Re: [python-win32] How to replace the values with keys ?

2008-07-22 Thread Larry Bates
Graps Graps wrote: Hi all, I am a newbie to python... I have two text files text1 and text2. Text1 is a tabbed separated file, say like a b a c a d a g b c b d b h c d c h... and so on.. Text2 is a python dictionary containing data as {0: 'a', 1: 'b', 2: 'c'...} now I want the data in text

Re: [python-win32] class and modules

2008-07-26 Thread Larry Bates
kNish wrote: Hi, I went thru the notes. I said i will understand when the group explains this to me. How much difference does it make to call a module as it and call it as being part of a class. Say Class a: def b: