[python-win32] PythonWin IDE: how to assign a function/code to key F1 etc. ?

2009-04-28 Thread Robert
want to put new functions (short python code) on keys like F1, F12, Ctrl-F1 and other keys. Is there a mechanism/recipe ? ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] PythonWin IDE: how to assign a function/code to key F1 etc. ?

2009-04-30 Thread Robert
Mark Hammond wrote: Robert wrote: want to put new functions (short python code) on keys like F1, F12, Ctrl-F1 and other keys. Is there a mechanism/recipe ? Look for the *.cfg files in the pythonwin directory. Thanks. maybe some of the following stuff is useful for somebody, or for

Re: [python-win32] Modify only the first line of a big file (Roughly 1.5MB - For thousands of file).

2009-05-03 Thread Robert
Khalid Moulfi wrote: Hi all, I have thousands of file and I must update only the first line. My concern is : is it possible to read only the first line for each of these files and update the first line only without reading the file completely ? Version of Python is 2.2.1 Thanks for any he

Re: [python-win32] SetSystemTime: A required privilege is not held by the client

2009-06-24 Thread Robert
Tim Golden wrote: Robert wrote: SetSystemTime on Vista admin account throws: (1314, 'SetSystemTime', 'A required privilege is not held by the client.') Not known from previous Windows versions. With what switch or whatever can this be enabled? According to the docs: (wa

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

2009-07-02 Thread Robert
>>> os.path.getmtime('x.txt') 1193160881 >>> int(win32file.GetFileAttributesExW('x.txt')[-2]) 1193153681 >>> int(win32file.GetFileAttributesExW('x.txt')[-2]) - os.path.getmtime('x.txt') -7200 (Win XP) is this a bug, or is there a issue with timezones/summer time? aren't time.time() values abso

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

2009-07-03 Thread Robert
Tim Roberts wrote: Robert wrote: os.path.getmtime('x.txt') 1193160881 int(win32file.GetFileAttributesExW('x.txt')[-2]) 1193153681 int(win32file.GetFileAttributesExW('x.txt')[-2]) - os.path.getmtime('x.txt') -7200 (Win XP) is this a bug, or is

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

2009-07-03 Thread Robert
ng=equallogic....@python.org] On Behalf Of Robert Sent: Thursday, July 02, 2009 5:07 PM To: python-win32@python.org Subject: [python-win32] File Time: win32file vs Python ? >>> os.path.getmtime('x.txt') 1193160881 >>> int(win32file.GetFileAttributesExW('x.txt

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

2009-07-03 Thread Robert
Dave Angel wrote: Tim Roberts wrote: Robert wrote: os.path.getmtime('x.txt') 1193160881 int(win32file.GetFileAttributesExW('x.txt')[-2]) 1193153681 int(win32file.GetFileAttributesExW('x.txt')[-2]) - os.path.getmti

[python-win32] win32com IE OnBeforeNavigate2: How to Cancel?

2010-02-25 Thread Robert
. How to cancel the navigation? Robert - This member function is called by the framework to cause an event to fire before a navigation occurs in the web browser. virtual void OnBeforeNavigate2( LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray

Re: [python-win32] win32com IE OnBeforeNavigate2: How to Cancel?

2010-02-25 Thread Robert
oh, found I have to return a 7-tuple with Cancel as last one return None, None, None, None, None, None, args.Cancel Robert wrote: class MyWebBrowser(activex.Control, WebBrowserModule.WebBrowser): def OnBeforeNavigate2(self, pDisp, URL, Flags, TargetFrameName, PostData, Headers, Cancel

[python-win32] COM: Volume Shadow Service through Python?

2010-03-15 Thread Robert
++ only interface. There is a "VSS.VSSCoordinator" in the COM browser. does it have to do anything with that... Robert ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] COM: Volume Shadow Service through Python?

2010-03-16 Thread Robert
Kevin Horn wrote: On Mon, Mar 15, 2010 at 1:01 PM, Robert mailto:kxrobe...@googlemail.com>> wrote: is there a way to use the VSS (as requester) from Python rather simple way - with COM functions or so (win32com or cytpes)? or only through a compiled SWIG extension

[python-win32] os.stat() : files without "date modified" : OSError: [errno 22] Invalid Argument

2010-10-11 Thread Robert
at is the underlying cause for the crash? Best, Robert ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] PyGUI blobedit creashes with pywin32-214 but not 212 - traceback - related problems

2010-10-19 Thread Robert
e. Yet there was no update for long time. I wonder that there are not many pywin32 bug reports in that direction. I only found : bug #2846720 (similar to C) ) and #2908939 perhaps. (->comments by M. Hammond, but no solution found) #3013558 Any ideas? Robert import wx _

[python-win32] and PyGUI notes - Re: PyGUI blobedit creashes with pywin32-214 but not 212 - traceback - related problems

2010-10-21 Thread Robert
pure Python is much better for this), just to exploit the Window features ... before in infinite time I rewrite the behavior of the MFC-goodies in pure win32gui ;-) ) Robert PS: PyGUI notes PyGUI is/seems a nice plan. rather direct on platform libs ( theorically - still damn MFC on Win ;-) ).

Re: [python-win32] PyGUI blobedit creashes with pywin32-214 but not 212 - traceback - related problems

2010-10-21 Thread Robert
Roger Upole wrote: "Robert" wrote in message news:i9kmoi$cl...@dough.gmane.org... B) a oneliner with just "import wx" crashes hard with F5 in Pythonwin IDE build 214/py2.6 - but not in build 212 (ntdll.dll) AppName: pythonwin.exe AppVer: 2.6.214.0 ModName: ntdll.dll M

Re: [python-win32] can't import dde module after importing win32ui

2011-11-06 Thread Robert
g through Pythinwin.exe (IDE), but only when starting with python(w).exe + win32ui (Even when the Pythonwin IDE is raise sucessfully through a script on python(w).exe, the problem is there) Is there a special manifest in Pythonwin.exe ? Robert ___ py

Re: [python-win32] can't import dde module after importing win32ui

2011-11-06 Thread Robert
Robert wrote: Mark Hammond wrote: It will be something to do with the manifest and the mfc libraries. I think that even though the mfc dlls are installed with pywin32, it might not work as hoped :) Can you find a redistributable version of the MFC dlls you can try? I can't explain why t

Re: [python-win32] can't import dde module after importing win32ui

2011-11-06 Thread Robert
Robert wrote: Robert wrote: Mark Hammond wrote: It will be something to do with the manifest and the mfc libraries. I think that even though the mfc dlls are installed with pywin32, it might not work as hoped :) Can you find a redistributable version of the MFC dlls you can try? I can&#

[python-win32] WinSxS, manifests and binary distribution ?

2011-11-07 Thread Robert
to with right version ... ? What has to be done to distribute the right binary files for a win32ui app? Where do the "active" rather new files in C:\WINDOWS\WinSxS\x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_028bc 148 come from at all? Robert PS: By experien

Re: [python-win32] WinSxS, manifests and binary distribution ?

2011-11-08 Thread Robert
Mark Hammond wrote: I'm afraid some of the assembly stuff is truly black-magic to me, but I'll answer what I can. On 8/11/2011 1:28 AM, Robert wrote: ... Now when I move away the 5 MFC files (4 dlls + manifest) to _mv, then Pythonwin.exe still runs properly! And it does so until

Re: [python-win32] WinSxS, manifests and binary distribution ?

2011-11-09 Thread Robert
see.. Check also what is actually called in HKEY_CLASSES_ROOT\CLSID\\LocalServer32 Robert ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] manifest "Microsoft.Windows.Common-Controls" version="6.0.0.0" => strange problem with pywin32 build 216 ?

2011-11-18 Thread Robert
on messages (BN_.. (Which could be routed via HookNotify?)) or so do trigger the normal HookCommand'ed handler. When that Common-Controls section (or the whole .manifest) is removed, the apps work normal in build 216. What could be the reason? What does this Common-Control section actuall

[python-win32] SIGSEGV crash at the end of apps using win32uiole / OCX

2011-12-27 Thread Robert
if the original pythonwin\pywin\Demos\ocx\webbrowser.py (using a MDIClient) is run standalone through python(w).exe, there is also a ugly SIGSEGV or even worse C-level crash - now at start. It should only raise a Python exception due to the non-working MDI setup I guess. Robert === S

Re: [python-win32] Several, totally isolated Python interpreters in the same process

2011-12-27 Thread Robert
-stuff/source/browse/trunk/winsxs is it necessary to have extra python files for each instance? or could one existing python installation run in multiple instances too this way ? Robert Information I found useful about WinSxS and assemblies: http://msdn.microsoft.com/en-us/library

[python-win32] How to get URL of open browser window?

2007-11-16 Thread Robert
What is the best way to get the URL of current open webbrowser Window (topmost) into a utility script? At least for IE & Mozilla's Robert ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] SetSystemTime: A required privilege is not held by the client

2008-04-16 Thread Robert
SetSystemTime on Vista admin account throws: (1314, 'SetSystemTime', 'A required privilege is not held by the client.') Not known from previous Windows versions. With what switch or whatever can this be enabled? Robert ___ pytho

Re: [python-win32] Python Service error 1053: the service did notrespond to the start or control request in a timely fashion

2009-01-16 Thread Robert O'Connor
From: "Richard Zinn" Hi, I've implemented the MyService.py example from the py2exe samples directory using Python2.6, on my Windows XP SP2, and I get the error 1052...did not respond in a timely fashion immediately when I run the MyService.py, or the MyService.exe, or if I install it as a servic

[python-win32] Python Service Won't Start, But Does Debug

2009-04-28 Thread Robert Robinson
I'm new to using the win32 module and I've written a little service in python for myself. It runs fine and without errors when I use debug: >python myService.py debug Debugging service myService - press Ctrl+C to stop. This works and prints to a log file I set up just fine, so I know it's working

Re: [python-win32] making icons on task bar require double-click

2009-10-23 Thread Robert Liebeskind
This can be accomplished with the wxPython lib. On Oct 22, 2009, at 7:21 PM, Tim Roberts wrote: Randy Syring wrote: Is it possible, with a python program, to run through the task bar icons and change them so that their current single-click event would get transferred to a double-click event?

Re: [python-win32] making icons on task bar require double-click

2009-10-23 Thread Robert Liebeskind
I apologize. I think I misread what you are trying to accomplish. It sounds like you want to do this for icons that you did not create. I do not think this is possible with wxPython. On Oct 23, 2009, at 11:05 AM, Robert Liebeskind wrote: This can be accomplished with the wxPython lib

Re: [python-win32] making icons on task bar require double-click

2009-10-23 Thread Robert Liebeskind
I apologize. I think I misread what you are trying to accomplish. It sounds like you want to do this for icons that you did not create. I do not think this is possible with wxPython. On Oct 23, 2009, at 11:05 AM, Robert Liebeskind wrote: This can be accomplished with the wxPython lib

Re: [python-win32] making icons on task bar require double-click

2009-10-23 Thread Robert Liebeskind
I apologize. I think I misread what you are trying to accomplish. It sounds like you want to do this for icons that you did not create. I do not think this is possible with wxPython. On Oct 22, 2009, at 7:21 PM, Tim Roberts wrote: Randy Syring wrote: Is it possible, with a python progra

[python-win32] Python script jumps back to 'main' in long running win32 event

2010-06-24 Thread Robert Sudwarts
Hi, I'm hoping that someone can help with this... I've seen some old posts which I think may refer to this same issue but I'm having difficulty understanding how to come up with a solution, and particularly where any "PumpWaitingMessages" should be located and/or/how/whether pythoncom.CoInitializ

[python-win32] Can't access methods of COM object.

2010-11-05 Thread Robert Norman
I have been successful in the past using COM from Python to control ActiveX elements such as LabView programs and a few third-party device servers. I recently tried to integrate a new component which came with a LabView example and some Visual Basic sample code. The LabView example works for

Re: [python-win32] python-win32 Digest - Can't access COM methods

2010-11-08 Thread Robert Norman
.com> Content-Type: text/plain; charset="ISO-8859-1" Robert Norman wrote: I have been successful in the past using COM from Python to control ActiveX elements such as LabView programs and a few third-party device servers. I recently tried to integrate a new component which came with

Re: [python-win32] ImportError: DLL load failed

2013-09-25 Thread Robert Judge
Mark Hammond gmail.com> writes: > > On 13/07/2012 10:45 AM, Jane Chen wrote: > > Hi all, > > > > I would like to add python win32 to Portable Python distribution with > > PyGTK for Windows > > http://fnch.users.sourceforge.net/portablepygtkwindows.html > > I installed the pywin32 in the python\L

[python-win32] Dr. Watson woes with ADO, mysql

2005-01-10 Thread Robert Brewer
(if I'm reading MSDN correctly) is therefore the function "where the fault occurred". So the question is, what's the next step in tracking down the bug? PyComplex_AsCComplex is a pretty simple function. Or am I way off-base and should be looking elsewhere? Robert Bre

RE: [python-win32] Dr. Watson woes with ADO, mysql

2005-01-10 Thread Robert Brewer
peculation on speculation. > Personally I would get a debug build running, so a decent > stack-trace is available, but I understand that may not be an option. ...for which I'd need vc++, right? IIRC, I'd need at least version 7? Would "Visual Studio .NET Professional Edition

[python-win32] Greetings and win32 com events question

2005-01-26 Thread Robert Kaplan
22\Lib\site-packages\win32com\client\__init__.py", line 503, in __setattr__ d.__setattr__(attr, value) File "D:\PYTHON22\Lib\site-packages\win32com\client\__init__.py", line 463, in __setattr__ self._oleobj_.Invoke(*(args + (value,) + defArgs)) TypeError: Objects of type &#

[python-win32] Re: Greetings and win32 com events question (Typo corrected)

2005-01-27 Thread Robert Kaplan
463, in __setattr__ self._oleobj_.Invoke(*(args + (value,) + defArgs)) TypeError: Objects of type 'instance method' can not be converted to a COM VARIANT Tim Golden wrote: [Robert Kaplan] | I'm new to the mailing, so greetings all! Welcome. As a word of warning, this is a rela

[python-win32] Strange page header text in PythonWin

2005-06-02 Thread Robert Adams
Title: Message Hello List,   Can anyone please point in the correct direction to resolve this minor printing annoyance. When printing a copy of my code, why is the header using strange characters and not readable text as expected ?   Thanks in advance! Robert

Re: [python-win32] Strange page header text in PythonWin

2005-06-03 Thread Robert Adams
running the following, Python 2.3.3, wxPython 2.4.2.4, PythonWin 2.3.3 win32all build 163   Thanks, Robert   -Original Message-From: Mark Hammond [mailto:[EMAIL PROTECTED] Sent: Thursday, June 02, 2005 3:47 PMTo: 'Robert Adams'; 'python-win32'Subject: RE: [python

Re: [python-win32] IIS CGI installation

2005-06-04 Thread Robert Brewer
ISAPI + WSGI: http://isapi-wsgi.python-hosting.com/ or ASP: http://www.4guysfromrolla.com/webtech/082201-1.shtml or (my preferred method) ASP + WSGI: http://www.amorhq.net/blogs/index.php/fumanchu/2005/05/26/wsgi_gateway_f or_asp_microsoft_iis If you used the latter, you could use CherryPy and be

Re: [python-win32] import and asp-python and iis - strange behaviour

2005-06-06 Thread Robert Brewer
had some issues in the past with "import myfile", and I find "from mypackage import mfile" to be more reliable. Sorry; I don't have any hard data on that at the moment--lost in the mists of history. But everything I import in .asp files sits in my site-packages folder any

[python-win32] Editor Replace function limitation

2005-06-08 Thread Robert Adams
Title: Message Hi,   Do I have a setup issue or is the PythonWin editor Replace function limited to 30 characters ?   Thanks in advance, Robert ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python

Re: [python-win32] Editor Replace function limitation

2005-06-08 Thread Robert Adams
2.3.3 win32all build 163, and FYI, I am forced to run this version in support of CAD system. Regards, Robert -Original Message- From: John Machin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 2:45 PM To: Graeme Glass; Robert Adams Cc: python-win32 Subject: Re: [python-win32] Edi

[python-win32] Pythonwin COM problem

2005-06-15 Thread Bielik, Robert
I have a module where I use COM to communicate with some HW drivers. In my module I use CoInitializeEx to init COM in multithreaded mode. However, when I use PythonWin to debug/test my module, I get an error due to the fact that PythonWin has (implicitly) initialized COM in apartment threaded mo

[python-win32] Unicode style in win32/PythonWin

2006-01-12 Thread Robert Kiendl
Neil Hodgson wrote: > Robert: > > > After "is_platform_unicode = ", scintilla displays some unicode > > as you showed. but the win32-functions (e.g. MessageBox) still do not > > pass through wide unicode. > > Win32 issues are better discussed on the pyth

Re: [python-win32] Using win32com Constants

2006-02-17 Thread Robert Brewer
ly be available after the w=win32com.client.Dispatch("Word.Application") statement." Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] MS Access query error

2006-03-13 Thread Robert Brewer
eed to set Cursorlocation before calling Recordcount. Google for more info. adUseClient = 3 rs.Cursorlocation = adUseClient Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] NT Service not re-startable after reboot

2006-03-16 Thread Robert Brewer
insert hooks to return an error code more-meaningful than "1" in the future. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] NT Service not re-startable after reboot

2006-03-16 Thread Robert Brewer
- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\win32\test\test_win32pipe.py", line 37, in testCallNamedPipe win32file.WriteFile(pipeHandle, "bar\0foo") error: (109, 'WriteFile', 'The pipe has been ended.') --

Re: [python-win32] Runnin Python app as service with separate console

2006-04-05 Thread Robert Brewer
n32serviceutil.ServiceFramework" to get some sample code. Cut-n-paste should get you there. On the "separate console" front, I've given up on local, desktop-based solutions and now use a web-based terminal I wrote for use with CherryPy: http://projects.amor.org/misc/wiki/HTTPREPL

Re: [python-win32] Python help for Access database

2006-07-31 Thread Robert Brewer
MS Access Dates are best input using the #date# syntax. Here's an example to convert a datetime.datetime object to that format: return ('#%s/%s/%s %02d:%02d:%02d#' % (value.month, value.day, value.year, value.hour, value.minute, value.second)) Should be easy e

[python-win32] MySQL on Python 2.5

2006-10-30 Thread Robert Coggins
All, I am having trouble finding a module made to user MySQL on Pytho 2.5 on Windows. Could anyone point me to the right direction? The Windows MySQLdb will only install on my 2.4.3 version. Robert ___ Python-win32 mailing list Python-win32

[python-win32] Win98 - exceptions.IOError: (13, 'Permission denied')

2007-02-08 Thread Robert Dollinger
( servicemanager.EVENTLOG_INFORMATION_TYPE, servicemanager.PYS_SERVICE_STOPPED, (self._svc_name_, '') ) def SvcStop(self): self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) win32event.SetEvent(self.stop_event) if

[python-win32] MS Access: silent overflow failure

2007-03-22 Thread Robert Brewer
s a column reference. The same SQL run as a Query inside the Access GUI works as expected. Manually changing one of the ints to a Single by appending ".0" works as expected. Any ideas about where I need to look next to find the cause of, and then fix, this behavior? Robert Brewer S

Re: [python-win32] MS Access: silent overflow failure

2007-03-27 Thread Robert Brewer
Mark Hammond wrote: > Robert Brewer wrote: > > The small demo script below makes ADO calls to a Microsoft > > Access (Jet) > > database via win32com. But it fails in a potentially dangerous way; > > "SELECT int * int;" can return None with no warning if the

Re: [python-win32] Running CherryPy inside IIS

2007-05-01 Thread Robert Brewer
sn't have nearly that level of testing (even though I wrote asp_gateway). I don't recommend it unless you have the time to debug the interaction between various versions of IIS, ASP, pywin32, and Python. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] _

Re: [python-win32] PyTime

2007-05-08 Thread Robert Brewer
I spent far too many hours trying to extract them back from float(d) [1]. Yet another lesson in the dangers of multiple documentation locations. Ah well, at least I learned something about Jet and SQL server internals. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] [1] http://pro

Re: [python-win32] Apache & mod_python & win32com

2008-04-24 Thread Robert Brewer
Uninitialize() If for various reasons that can't be made to work (some components just aren't thread safe), another option would be to run all the COM calls in a single thread and use a Queue; request threads would call q.put(xml, reqid) and block, the COM thread would call q.get(), do the work, and shove the result into results[reqid]. Robert Brewer [EMAIL PROTECTED] ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Apache & mod_python & win32com

2008-04-24 Thread Robert Brewer
inally approach works. Ask again if you need to. > I guess you thinking of some > standard python modules (as there's probably a python module for > everything =))? :) Yup, there is a Queue module: http://docs.python.org/lib/module-Queue.html. Robert Brewer [EMAIL PROTECTED]

[python-win32] Problems connecting to an MS Access (.mdb) file

2008-06-16 Thread Robert Latest
n conn = odbc.odbc(conn_str) dbi.operation-error: [Microsoft][ODBC Microsoft Access Driver]Allgemeiner Fehler Registrierungsschlüssel 'Temporary (volatile) Jet DSN for process 0xfd0 Thread 0xfa4 DBC 0x349644 Jet' kann nicht geöffnet werden. in LOGIN --- Thanks, robe

[python-win32] Setting service exit code on stop

2020-08-09 Thread Robert Kearns
Hello all, I am having a look through the C++ source code (in particular win32/src/PythonService.cpp), trying to deduce a way to have the Python service set the exit code on stop. It appears that on a successful stop, both exit codes (svc and win32) are set to 0, overriding any previously set val