[python-win32] Re: Window capture using WM_PRINT and Python

2005-01-18 Thread Gabriel Genellina
At 18/1/2005 20:08, you wrote: I'm a Java developper and I wish to make a capture of an offscreen window (on WinXP). It's not possible in Java, so I use a python script and WM_PRINT, but it doesn't seem to work. I think device contexts are not shareable between processes, so you can't pass a DC

Re: [python-win32] How Can I exec() a statement?

2005-04-06 Thread Gabriel Genellina
At Wednesday 6/4/2005 14:57, * William wrote: HOW -- or, is it possible -- to execute the an assignment statement from a string? Try 'exec' a=1 b=2 exec 'a=b+3' a 5 Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32

Re: [python-win32] How Can I exec() a statement?

2005-04-11 Thread Gabriel Genellina
to distinguish inside f if it was called with a or b as an argument, since both are simply names pointing to the same object: def f(x): ... print x, id(x) ... a = [1,2,3] b = a a [1, 2, 3] b [1, 2, 3] id(a) 6999440 id(b) 6999440 f(a) [1, 2, 3] 6999440 f(b) [1, 2, 3] 6999440 Gabriel Genellina

Re: [python-win32] Python and Hardwaremanagement

2005-04-12 Thread Gabriel Genellina
of my hardware. Unless you're doing very specific things, just let the OS take control of your hardware... What do you want to do? Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo

Re: [python-win32] word

2005-04-15 Thread Gabriel Genellina
At Thursday 14/4/2005 15:33, ryan pinto wrote: wordApp.CommandBars.FindControl(Id=23).Execute Remember that, in Python, you must use () to invoke a function, even if it has no arguments. Gabriel Genellina Softlab SRL ___ Python-win32 mailing list

Re: [python-win32] list/kill processes on Win9x and NT+...

2005-07-12 Thread Gabriel Genellina
://support.microsoft.com/kb/q175030/ Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Possibility of calling static functions using window/thread handles?

2005-08-23 Thread Gabriel Genellina
) Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

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

2005-09-09 Thread Gabriel Genellina
os.path.join( os.path.dirname( os.path.abspath( sys.argv[0])), 'svc.cfg') Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] create word document?

2005-10-05 Thread Gabriel Genellina
work. Just record a macro doing whatever you want to do in Word and see the resulting code. Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Weird ADSI hang.

2005-10-06 Thread Gabriel Genellina
/W3SVC) print At the end END CODE At the end does print and at that point it just hangs there. Maybe it doesn't matter, but try removing the print statement on print recurse(...) since recurse() doesnt return anything print At the start recurse(IIS://localhost/W3SVC) print At the end Gabriel

Re: [python-win32] Control-C

2005-10-13 Thread Gabriel Genellina
operations to do what they need to do. Any help you might have would be greatly appreciated. win32api.GenerateConsoleCtrlEvent http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/generateconsolectrlevent.asp Gabriel Genellina Softlab SRL

Re: [python-win32] String weirdness on python 2.4 / windows

2005-10-19 Thread Gabriel Genellina
files having different format than bmp files) Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] findwindow by its class name

2005-10-21 Thread Gabriel Genellina
) including its own HWND; Application B handles it and replies to A with its own HWND. After that, both apps know the other's HWND and can post messages. Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http

Re: [python-win32] drag/move image from staticBitmap control?

2005-10-28 Thread Gabriel Genellina
part image on the screen, just like maps.google does, is it possible to do that? A better place to ask would be the wxPython list Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman

Re: [python-win32] PythonWin - Start in script's directory

2005-11-22 Thread Gabriel Genellina
as my script, instead of wherever PythonWin wants to put it by default, I think somewhere in C:\Python? os.path.dirname(os.path.abspath(sys.argv[0])) returns the directory where your script is. You can make it the current dir using os.chdir Gabriel Genellina Softlab SRL

Re: [python-win32] mciSendCommand from win32 ???

2005-11-28 Thread Gabriel Genellina
/ and Lazarus. Or, there is a small DirectSound example, see the PyWin32 help. Gabriel Genellina Softlab SRL ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] BSTR

2006-04-14 Thread Gabriel Genellina
'Ok' ... else: print 'Wrong!' ... Wrong! Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: [python-win32] select.poll()

2006-04-24 Thread Gabriel Genellina
, not any file. WaitForMultipleEvent might be useful but depends on what you need. Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: [python-win32] select.poll()

2006-05-02 Thread Gabriel Genellina
information about WaitForMultipleEvent It's a Windows function, search msdn.microsoft.com. But you dont need it if you only have to poll sockets. Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam

Re: [python-win32] killProcName.py not working for processes under user SYSTEM

2006-05-02 Thread Gabriel Genellina
privilege to grab the process handle. This is a common scenario for services running as Local System. See http://support.microsoft.com/kb/197155/en-us Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam

Re: [python-win32] how to only accept local computer requests

2006-05-08 Thread Gabriel Genellina
requests from other computers. If the config file does not exist, it accepts requests from any computers. Is there any easy way to do it ? To see if the config file exists, use os.path.isfile(filename) To enable only local connections to your server, see the Twisted documentation. Gabriel Genellina

Re: [python-win32] starnge error at startup

2006-07-20 Thread Gabriel Genellina
= N_TOKENS exceptions.NameError: name 'N_TOKENS' is not defined Looking at tokenize.py, it imports all from token.py Look at your token.py. There is a notice at the top of the file, it should have been built automatically, but perhaps something failed. Gabriel Genellina Softlab SRL

Re: [python-win32] Shape file field update problem

2006-08-25 Thread Gabriel Genellina
the vendor. Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas

Re: [python-win32] IMPORT path

2006-09-12 Thread Gabriel Genellina
away from the development directories the path gets lost and Python can not find the modules. Reading the Python tutorial may help http://docs.python.org/tut/tut.html, specially about packages. Gabriel Genellina Softlab SRL

Re: [python-win32] MS Word

2006-10-03 Thread Gabriel Genellina
found any good examples. I usually create a macro for doing what I want, and then I inspect the VBA code to see how it's done. Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo lo que

Re: [python-win32] Calling a subprocess with spaces in the path

2006-10-18 Thread Gabriel Genellina
on windows? Yes, type cmd /? and see the rather crazy rules about quotes on the shell... (BTW if I use f=os.popen(s, 'w') It works fine, but that leaves me with a blocking call, and I really want a subprocess) This way you are not running your comand thru the shell. -- Gabriel Genellina Softlab

Re: [python-win32] disable mouse/keyboard input

2006-10-20 Thread Gabriel Genellina
mouse and keyboard globally, for all the system? Just for your application? Is this a GUI app? which framework have you used to build the GUI? -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y

Re: [python-win32] win32pdh problem on Windows Server 2003

2006-10-31 Thread Gabriel Genellina
, the names are localized, so if you have a non-english version of Windows, you have to look up what are the translated names. (I don't know how to obtain a neutral name usable everywhere) -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio

Re: [python-win32] Compiling a Python Windows application

2006-11-29 Thread Gabriel Genellina
parameters , clicking OK is to start the Python app. The open Word document and the parameters need to be made available to the app. -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam

Re: [python-win32] screen capture and win32gui.GetDesktopWindow()

2006-12-06 Thread Gabriel Genellina
to watch for drawing primitives as TightVNC does (or is it some other VNC clone?) -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: [python-win32] USB Power Off from Python

2006-12-14 Thread Gabriel Genellina
At Wednesday 13/12/2006 23:48, James Matthews wrote: However we see that you can unmount it ans sometimes it will be turned off I think it's some kind of soft turn off; you send the device a command to shutdown self. The +5V stay there. -- Gabriel Genellina Softlab SRL

Re: [python-win32] Displaying contents of a file using PyWin

2006-12-21 Thread Gabriel Genellina
. -- Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas

Re: [python-win32] Displaying contents of a file using PyWin

2006-12-21 Thread Gabriel Genellina
- but in that case RemoveDocTemplate should not be called as the NameError happens before. I don't recall (and grep doesn't show) that pythonwin ever raises this exception. It is used in 4 scripts inside pythonwin\pywin\framework. And can be found on your own book, chapter 20... -- Gabriel Genellina

Re: [python-win32] PyWin32 - PostMessage return value

2007-01-20 Thread Gabriel Genellina
. This way, the target application can reply to the caller when he has completed processing the operation (either ok or with an error). -- Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo lo

Re: [python-win32] PyWin32 - PostMessage return value

2007-01-22 Thread Gabriel Genellina
, but I'm not sure if that helps you at all... -- Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya

Re: [python-win32] Launch process

2007-01-24 Thread Gabriel Genellina
the thread and process handles when not needed. -- Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo

Re: [python-win32] how to generate an IPersistStream object?

2007-01-29 Thread Gabriel Genellina
implemented that interfase myself, but usually you only have to add two class attributes: _com_interfaces_ and _public_methods_, and implement the needed methods. You should refer to the Microsoft documentation on the exact semantics of each method. -- Gabriel Genellina Softlab SRL

Re: [python-win32] win32gui.GetOpenFileName()

2007-03-06 Thread Gabriel Genellina
this. Thanks Roger, where did you find this information? Look at the Microsoft site, MSDN, the primary source of information. Many win32xxx modules are just a thin wrapper around the related Windows functions. In this case, see http://msdn2.microsoft.com/en-us/library/ms646839.aspx -- Gabriel Genellina

Re: [python-win32] COM works from IDLE but not when file executed from Windows Explorer

2007-03-14 Thread Gabriel Genellina
, abspath will give a wrong result) -- Gabriel Genellina ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] help with parsing email

2008-08-18 Thread Gabriel Genellina
re_number = re.compile(rNoticeOfapplication/([0-9-_]+)) match = re_number.search(body) if match: print match.group(1) (this matches any numbers plus - and _ after the words NoticeOfapplication written exactly that way) -- Gabriel Genellina ___ python

Re: [python-win32] help with parsing email

2008-08-18 Thread Gabriel Genellina
, socket.SOCK_STREAM): gaierror: (11001, 'getaddrinfo failed') Probably pop.EXCHVS01.ad.my.org doesn't exist. -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] help with parsing email

2008-08-18 Thread Gabriel Genellina
, socket.SOCK_STREAM): gaierror: (11001, 'getaddrinfo failed') Probably pop.EXCHVS01.ad.my.org doesn't exist. -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] Internet Explorer constants

2008-09-05 Thread Gabriel Genellina
, but is there some other way? The ExecWB method is documented here http://msdn.microsoft.com/en-us/library/aa752117(VS.85).aspx -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Internet Explorer constants

2008-09-05 Thread Gabriel Genellina
En Fri, 05 Sep 2008 05:23:01 -0300, Tim Golden [EMAIL PROTECTED] escribió: Gabriel Genellina wrote: Hello I want to control Internet Explorer. This is what I have so far: import win32com.client from win32com.client.gencache import EnsureDispatch url = ... IE = EnsureDispatch

Re: [python-win32] Pythonwin telit

2008-09-19 Thread Gabriel Genellina
castellano: [EMAIL PROTECTED] == http://dir.gmane.org/gmane.comp.python.general.castellano -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] service support in 2.6 isn't working

2008-12-30 Thread Gabriel Genellina
210, it works fine. -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Problem in identifying an archived file in Windows

2009-02-25 Thread Gabriel Genellina
://msdn.microsoft.com/en-us/library/aa364944(VS.85).aspx You apparently are looking for FILE_ATTRIBUTE_ARCHIVE. -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] File Time: win32file vs Python ?

2009-07-05 Thread Gabriel Genellina
21.468 bytes 0 dirs 204.499.968 bytes libres To restore the same date/time, I have to use: from pywintypes import Time creationTime, accessTime, writeTime = [Time(timegm(localtime(int(t for t in GetFileTime(fh)[1:]] -- Gabriel Genellina

Re: [python-win32] File Time: win32file vs Python ?

2009-07-06 Thread Gabriel Genellina
21.468 bytes 0 dirs 204.499.968 bytes libres To restore the same date/time, I have to use: from pywintypes import Time creationTime, accessTime, writeTime = [Time(timegm(localtime(int(t for t in GetFileTime(fh)[1:]] -- Gabriel Genellina

Re: [python-win32] Guaranteed cleanup code execution?

2010-01-13 Thread Gabriel Genellina
. There are a couple demos too. It's quite easy to write a service using the classes provided. -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] 'No such interface supported' question

2010-01-13 Thread Gabriel Genellina
think this chapter is available for preview from the O'Reilly site. http://oreilly.com/catalog/9781565926219/ -- Gabriel Genellina ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32