Re: [python-win32] Issues with tkinter, COM servers and Python 3.x

2015-05-18 Thread Tim Roberts
d for me to understand how it could get the wrong type. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Issues with tkinter, COM servers and Python 3.x

2015-05-19 Thread Tim Roberts
't know if I'm answering your question. I hope I do. Absolutely, yes. Thanks. I have to think this is a bug in the Python COM interface layer, injecting a value into sys.argv without implementing the Python 3 string changes. I don't see the problem in 5 minutes of perus

Re: [python-win32] Using "WEAP" API in Python

2015-08-04 Thread Tim Roberts
utely sure of the bittedness? Exactly this kind of thing can happen if WEAP is a 32-bit application but you installed the 64-bit Python, or vice versa. Are you sure that the app ID is "Weap.WeapApplication"? Do you know how to troll the registry to verify that? -- Tim Roberts, t...@pr

Re: [python-win32] Using "WEAP" API in Python

2015-08-04 Thread Tim Roberts
Tim Roberts wrote: > Are you sure that the app ID is "Weap.WeapApplication"? Do you know how > to troll the registry to verify that? I see in the code samples that this is the correct App ID, so that's not the issue. You might try this from VBScript and see if it works.

Re: [python-win32] Using "WEAP" API in Python

2015-08-04 Thread Tim Roberts
them. > As you said I created the file and again(!) I faced an error. I attach > the error pic for you. I think you're going to have to go to WEAP with this question. It certainly looks like the WEAP installer did not register its COM services. Does the WEAP GUI run OK? -- Tim

Re: [python-win32] PythonService.exe Network Service

2015-08-26 Thread Tim Roberts
ou have the file in your \Users\username\Documents path, that's almost certainly the issue. Check the file in Explorer to see if it is readable by Everyone. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 ma

Re: [python-win32] SAPI COM server

2015-09-08 Thread Tim Roberts
t it through > SAPI it never even gets called. I tested my class through com client > that I implemented and then it works fine. > Have you selected your engine as the default TTS engine in the Speech applet of Control Panel? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, In

Re: [python-win32] Task Scheduler on Windows 7 and pythonw.exe problems

2015-09-22 Thread Tim Roberts
ur scheduled task? Is it running as you? You might consider using the subprocess module to start your netsh commands instead of os.system. os.system is going to want to create a subshell, but processes running in a service (which scheduled tasks do) aren't allowed to interact with the

Re: [python-win32] Is there a _simple_ way to find out what version of Windows you are running?

2015-10-08 Thread Tim Roberts
browser identification line is formatted, nor indeed does the standard require one be present at all. Some browsers are too clever, some intentionally lie, some don't include it. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ p

Re: [python-win32] Is there a _simple_ way to find out what version of Windows you are running?

2015-10-08 Thread Tim Roberts
is not as consistent as the desktop version. Too many manufacturer tweaks. Plus, anyone who is running Python on a CE device knows what they are doing and will be able to answer the question without your help. -- Tim Roberts, t...@probo.com Providenza & Boe

Re: [python-win32] win32com error of 'invalid parameters'

2015-11-19 Thread Tim Roberts
147352567 is 0x80020009, which is the unhelpful DISP_E_EXCEPTION. It might refer to a pointer or a bad address. The "Invalid Parameters" string suggests you should double-check all of your parameters. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] hoto cast pyobject to ccompnt

2015-11-27 Thread Tim Roberts
u are just getting a compile-time error, right? That’s because the smart pointer wrapper (CComPtr)will only accept a pointer that actually derives from the type it is wrapping. In this case, that’s not so. You will probably have to force the pointer to be an IUnknown* before you can wrap it

Re: [python-win32] drag&drop files with non-ASCII filenames?

2015-12-15 Thread Tim Roberts
window that are not warranted. No one promised, for example, that a string pasted with "paste" is going to fire kbhit() continuously until empty. > To read it I use: > > file = get_paste() It is unwise to use the name of a built-in type as the name of a variable. --

Re: [python-win32] drag&drop files with non-ASCII filenames?

2015-12-15 Thread Tim Roberts
Ulli Horlacher wrote: > On Tue 2015-12-15 (11:10), Tim Roberts wrote: > >>> I have a python 2.7 program which runs in a console window and upload >>> files. >>> To specify the files, the user uses Windows drag&drop (via explorer) or >>> copy&a

Re: [python-win32] Excel to python COM not working. Please help!

2015-12-28 Thread Tim Roberts
ere did you look in the registry? Remember that, on a 64-bit system, 32-bit components get registered in HKEY_CLASSES_ROOT\Wow6432Node\CLSID, not in HKEY_CLASSES_ROOT\CLSID. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win

Re: [python-win32] Access Denied

2016-01-23 Thread Tim Roberts
Outlook. https://msdn.microsoft.com/en-us/library/office/cc839856.aspx — Tim Roberts, t...@probo.com<mailto:t...@probo.com> Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Printer Response

2016-01-31 Thread Tim Roberts
d. You can certainly use win32print.StartDocPrinter, and that does return an identifier, but I don’t know what good that does you. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.pytho

Re: [python-win32] Unsubscribe

2016-02-02 Thread Tim Roberts
To unsubscribe, visit the link at the bottom of every message, or send your "unsubscribe" message to python-win32-le...@python.org . -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-wi

Re: [python-win32] Handling Print Events

2016-02-08 Thread Tim Roberts
s://msdn.microsoft.com/en-us/library/windows/desktop/dd162861.aspx -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] pywintypes Error

2016-02-16 Thread Tim Roberts
e please help me to figure it out? > You have to have the COM server register itself. You didn't post any code, so we can't tell which class it is. Assuming you know which DLL it is, just run "regsvr32 .dll". -- Tim Roberts, t...@probo.com Providenza & Boekelheide

Re: [python-win32] Com error invalid class string

2016-02-16 Thread Tim Roberts
don't know how you can expect anyone to help when you don't show the code. The issue is very clear -- the class string in the call to Dispatch is not a registered class. So, go look up what ID_SETUP_DONGLE is, figure out which DLL is the server for that class, and register it. -- Tim

Re: [python-win32] Problem: methods defined in type library's base class are not accessible in inherited class objects of the type library

2016-02-19 Thread Tim Roberts
nts a design flaw in the objects you are invoking. When you have a lot of COM interfaces, each with a few methods, you end up doing an awful lot of QueryInterface calls. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] equivalent selenium findElement(By.xpath...) with win32com

2016-02-22 Thread Tim Roberts
t you show us the code you have? The Internet Explorer COM object surface is very large, so we don't want to waste time explaining what you already know. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 ma

Re: [python-win32] FW: pywintypes Error

2016-02-23 Thread Tim Roberts
ne please help me to figure it out? > You posted this question a week ago, and I responded. Did you not like the answer? "Invalid class string" means the server DLL is not registered. You need to use "regsvr32" to register the DLL. It'

Re: [python-win32] Error in word with AddTextbox

2016-02-23 Thread Tim Roberts
onstants.wdTextOrientationHorizontal > left = 100 > top = 100 > width = 200 > height=100 > document.Shapes.AddTextbox(orientation, left, top, width, height) The documentation for AddTextBox would have explained this. You need to use msoTextOrientationHorizontal, not wdTextOrie

Re: [python-win32] equivalent selenium findElement(By.xpath...) with win32com

2016-03-07 Thread Tim Roberts
t), but nothing > under this level. idem with "children" property. You still haven't shown us any of your code. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] questions

2016-03-07 Thread Tim Roberts
curves at once. How are you opening Notepad? There are several ways to do that, both with in native Python and in the API. To do #2, you can use win32ui.FindWindow to find the Notepad window handle, then use win32gui.PostMessage to send a WM_CLOSE message to that window. --

Re: [python-win32] pywintypes.com_error: (-2147467259, 'Unspecified error', None, None)

2016-03-08 Thread Tim Roberts
That's 0x80004005, which for MAPI is MAPI_E_CALL_FAILED. Very generic. Have you run gentypes.py on Outlook? Perhaps you should try to generate a static proxy: ol = win32com.client.gencache.EnsureDispatch("Outlook.Application") -- Tim Roberts, t...@probo.com Providenza & B

Re: [python-win32] equivalent selenium findElement(By.xpath...) with win32com

2016-03-09 Thread Tim Roberts
ion") You can then use ie.Document to get the IHTMLDocument2 interface for the visible tab. It's then possible to query through the DOM, although not with the usual DOM methods. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. __

Re: [python-win32] Python 2.7.11 on Windows Server 2012 R2 standard - Error message "DLL load failed: %1 is not a valid Win32 application" after IMPORT WIN32SERVICE

2016-03-20 Thread Tim Roberts
ion, 64-bit Windows simply does not have the ability to mix 32-bit and 64-bit libraries in a single process. It is for this reason that I still tend to choose 32-bit Python. — Tim Roberts, t...@probo.com<mailto:t...@probo.com> Providenza & Boekelheide, Inc. _

Re: [python-win32] C/C++ COM client calling Python COM server

2016-03-21 Thread Tim Roberts
OD, &dparams, &vRet, NULL, NULL ); The result comes back in vRet. The type will probably have vRet.vt == VT_I4, and the value is in V_I4(&vRet). This is why most people don't use late-binding IDispatch objects from C++. -- Tim Roberts, t...@probo.com Providenza & Boe

Re: [python-win32] Python Urrgent question

2016-03-28 Thread Tim Roberts
pected to happen, and what actually did happen. You did not say that here. Because we do not have your app, we can't run your sample. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@pyt

Re: [python-win32] Potential problem with calling Invoke

2016-04-11 Thread Tim Roberts
patch.__call__ in win32com\client\dynamic, but that's so fundamental to IDispatch operation that I don't know the implications of changing the order. In the short term, I suspect you could work around this in an ugly way: cmd = DOpus.Create().Command() cmd._olerepr_.defaultDisp

Re: [python-win32] Potential problem with calling Invoke

2016-04-13 Thread Tim Roberts
, go back to the original, no harm done. And if they DO help, well now you have something to contribute to the community. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] AutoCAD attribute issue

2016-05-23 Thread Tim Roberts
uot;, line 3, in acad = win32com.client.Dispatch("__**AutoCAD.Application”) So where did the __** come from? Those are, indeed, invalid characters in a COM CLSID name. — Tim Roberts, t...@probo.com<mailto:t...@probo.com> Providenza & Boekelheide, Inc. _

Re: [python-win32] Track-session-events

2016-06-09 Thread Tim Roberts
tion. > I'm confused. What do you want to know? The code you posted is from a Windows service, which gets launched when the machine boots up and continues to run until the power turns off. That's the only way you can catch logoffs and session changes. Are you writing a service?

[python-win32] upgrading to python 2.4

2004-12-09 Thread Tim Roberts
thon environment alive and well. For some packages, this just means running a .exe or a .msi. For some packages, it means unzipping and running "python setup.py install". For some packages, it means doing an nmake. -- - Tim Roberts, [EMAIL

[python-win32] Re: upgrading to python 2.4

2004-12-10 Thread Tim Roberts
tures when you deploy, why wouldn't you do your development under 2.3? -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Image capture

2005-01-05 Thread Tim Roberts
rivate Const PRF_CLIENT = &H4& Private Const PRF_CHILDREN = &H10& Private Const PRF_OWNED = &H20& Private Sub Command1_Click() SendMessage grid.hwnd, WM_PAINT, picture.hDC, 0 SendMessage grid.hwnd, WM_PRINT, picture.hDC, PRF_CHILDREN Or PRF_CLIENT Or PRF_OWNED picture

Re: [python-win32] Geting values from a thread

2005-01-10 Thread Tim Roberts
ing like this very often, then it is quite likely that threads are not the right answer for your problem. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] on the way to find pi!

2005-01-24 Thread Tim Roberts
in__': try: digit_count = long(sys.argv[1]) except: digit_count = int(raw_input('How many digits? :')) print pi(digit_count) print repr(float(pi(digit_count))) and here is what happens when you try to use it in arithmetic: C:\Tmp>x.py 5 3.1415 3.1415000

[python-win32] sleep() fine-control in Python - RDTSC, select() etc.

2005-01-25 Thread Tim Roberts
horter duration than that. This assumption is dangerous. On a 4 GHz processor, the low-order 32 bits of rdtsc wraps every second. 64-bit arithmetic is easy in x86 assembly. You should get in the habit of using it with rdtsc. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekel

[python-win32] time. delay oddities

2005-01-26 Thread Tim Roberts
eal-time process. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] Re: Download a file from FTP server to local machine

2005-02-07 Thread Tim Roberts
tp://myftp.mysite.com/dir1/dir2/myfile.txt"; -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] How to use Python to develop virtual printer?

2005-03-01 Thread Tim Roberts
ng it in C or C++ to begin with.) -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] system toolbar icons

2005-03-18 Thread Tim Roberts
is is not a Pythonwin bug. This is a Windows design flaw. It happens with ANY app with a tray icon that dies unexpectedly. If you hover your mouse over the icons, the dead icons will go away. "Harvest your zombies", as they might say in Linux. -- - Tim Roberts, [EMAIL P

Re: [python-win32] win32gui, win32ui -- how to release references?

2005-03-21 Thread Tim Roberts
y wrapper classes to handle them automatically. Are these steps automatically handled in Python by win32gui and win32ui? If not, can someone post a snippet of cleanup code that works for this example? Yes, it is automatic. When the objects are destroyed, the resources will be released. --

[python-win32] Python crash after win32com.client.CastTo?

2005-03-22 Thread Tim Roberts
om cmd.exe prompt. For what it's worth, -1073741819 is hex C005, which is STATUS_ACCESS_VIOLATION: a general protection fault. That's usually a wild address or a null pointer dereference. Is it possible that one of those last two parameters is actually (in,out) and not just (ou

Re: [python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-03-31 Thread Tim Roberts
n this case, since you want a specific solution, you can send just WM_CHAR. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Re: Help on using win32api.SendMessage to send keystrokes

2005-04-01 Thread Tim Roberts
N event? Python supports C expressions; you just build it by hand: bits = 0x800 | 0x0003 | vkKey Or, if you prefer the bit numbers explicitly: bits = (2 << 30) | (3 << 16) | vkKey -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. __

Re: [python-win32] Sparse files and Pickle

2005-04-04 Thread Tim Roberts
name before pickling. I thought pickle recognized a magic method name so the object could "help" put itself into a picklable state, but I don't see it now. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-w

Re: [python-win32] Handle to a Driver

2005-04-04 Thread Tim Roberts
Thus, this should do what you want: ret = DeviceIoControl( hDevice, IOCTL_SET_READ_EVENT, ReadEvent.handle, 0, None ) -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http:

Re: [python-win32] Handle to a Driver

2005-04-04 Thread Tim Roberts
k(" ret = DeviceIoControl( hDevice, IOCTL_SET_READ_EVENT, handle, 0, None ) -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Handle to a Driver

2005-04-04 Thread Tim Roberts
; 0x); This gets you a deprecation warning in Python 2.3. You can do this same function without the warning using struct: dword = struct.pack( " -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing

Re: [python-win32] Help on using win32api.SendMessage to send keystrokes

2005-04-05 Thread Tim Roberts
ou ask, you would need to write and install a set of kernel filter drivers to inject the events, and you really don't want to do that. The API is not enough. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 m

Re: [python-win32] Help on using win32api.SendMessage to send keystrokes

2005-04-05 Thread Tim Roberts
I write drivers for a living. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Help on using win32api.SendMessage to send keystrokes

2005-04-05 Thread Tim Roberts
ice-specific drivers often include information that the manufacturer considers to be proprietary. The support burden for a kernel driver is much greater than a user-mode app. And, the investment in creating and debugging a driver is so high, that most manufacturers don't want to help the co

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

2005-04-12 Thread Tim Roberts
e inside the function, the parameter name happens to be bound to that object, but it doesn't know what other (outside) names might be bound to that object. (Actually, that's not entirely true: it knows HOW MANY names are bound to it, so it can do reference coun

Re: [python-win32] getting the contents of a Control in a window

2005-04-12 Thread Tim Roberts
iently creates the buffer for you, and passes the resulting string as a return from the function. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailma

Re: [python-win32] Python and Hardwaremanagement

2005-04-12 Thread Tim Roberts
= input('What is your name? ') print "Hello, %s!" % name If you want to create GUI apps, where you have a window with controls and buttons and such, you will need to investigate one of the add-on packates. wxPython is my favorite, but tkinter and pyGTK have their

Re: [python-win32] how to browse another computer's folder treestructure ?

2005-04-29 Thread Tim Roberts
On Thu, 28 Apr 2005 15:43:25 -0400, Michael Li <[EMAIL PROTECTED]> wrote: Hi, Mark Thank you very much. It works, but only shows shared folders, not all the folders, is it possible to show all folders ? Of course not. Windows security wouldn't be worth very much if it could. --

Re: [python-win32] Incomplete ZIP source files at sourceforge.net

2005-05-03 Thread Tim Roberts
on, I have not yet encountered an issue that required me to build pywin32 on my own. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Setting environment variables in windows from Python Programs

2005-05-10 Thread Tim Roberts
>>> os.environ['LANG']='language' >>> os.system('set L') LANG=language LIB=C:\VS.NET\VC7\ATLMFC\LIB;C:\VS.NET\VC7\LIB;C:\VS.NET\VC7\PlatformSDK\lib\pre release;C:\VS.NET\VC7\PlatformSDK\lib;C:\VS.NET\SDK\v1.1\lib;

Re: [python-win32] Setting environment variables in windows from Python Programs

2005-05-11 Thread Tim Roberts
isses the point. I DID define the variable inside the Python code, and the process that I launched from Python (using os.system) DID inherit that variable. That's the best you can do: you can change the environment for the processes you start, but you canno

Re: [python-win32] LOCALE related stuff Re: Setting environment variables in windows from Python Programs-

2005-05-11 Thread Tim Roberts
ht read the locale. So, for example, the first lines of your file might need to be: import os os.environ['LANG'] = 'ja_JP' import locale locale.setlocale(locale.LC_ALL, '') import sys import pygtk ... -- Tim Roberts, [EMAIL PROTECTED] Providenz

Re: [python-win32] Bug with system()/popen() ?

2005-05-13 Thread Tim Roberts
nality of popen()) > > This is one reason why I always override the installation directory to one without spaces. One alternative is to fall back to: os.system('c:\\progra~1\\tortoi~1\\bin\\TortoiseProc.exe /command:update /path:c:\\temp\\test /n

[python-win32] Q: daemon spawn from within apache cgi blocks parent process

2005-05-24 Thread Tim Roberts
the stdout handle as soon as it starts. Either solution should solve your problem. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] convert encoding from UNIX/MAC to DOS

2005-05-26 Thread Tim Roberts
;universal newlines", where it will detect the standard in use and handle it appropriately. So, for short files, you can do this: open('localEndings.txt','w').write( open('unknownEndings.txt','rU').read() ) -- Tim Roberts, [EMAIL PROTECTED] Provi

[python-win32] 1MB Thread Stack Size

2005-06-02 Thread Tim Roberts
ty. Any time the number of threads in a process is more than an order of magnitude greater than the number of CPUs, the operating system administration overhead begins to overwhelm the productive work that can be done. Surely you could solve your problem with 100 threads and some appropriate queu

Re: [python-win32] 1MB Thread Stack Size

2005-06-03 Thread Tim Roberts
the context. And if you DON'T really plan on having 1,000 threads working on tasks at the same time, then you don't really need 1,000 threads. I'm sure you can solve the stack space problem. I'm just suggesting that time spent on such a solution might be wasted, when you cou

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

2005-06-03 Thread Tim Roberts
ntilla code ever sets the font for the titles. The code itself gets all of the formatting applied, so it gets fonts and colors. Is the title really being printed with whatever font was leftover in the dc? That's probably a bug. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelh

Re: [python-win32] IIS CGI installation

2005-06-06 Thread Tim Roberts
development. :) > Here, I am in complete agreement. There's something very appealing about CherryPy. Simple, functional, understandable. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] Windows LogParser COM interface

2005-06-06 Thread Tim Roberts
r executing query: Error while writing to file: The handle is >invalid. [The handle is invalid.]', None, 0, -2147024890), None) > > Well, I cut and pasted your code as-is onto my XP SP2 system, and it worked perfectly. As Mark said, however, you can't run this within a GUI app. If you put this in a "pyw" file, or if you launch it with pythonw, it won't work, because there is no stdout to write to. The fact that the traceback shows "file "", line 1, in ?" tells me that you might be running it from inside a GUI, and not from a real command line. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

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

2005-06-07 Thread Tim Roberts
e invoked? Can >I use import with an asp page? > In my experience, the best way to deal with the unpredictable and unfriendly nature of IIS and ASP is to "upgrade" IIS by disabling it and installing Apache for Win32 in its place. -- Tim Roberts, [EMAIL PROTEC

Re: [python-win32] Interfacing to windows explorer

2005-06-08 Thread Tim Roberts
ople are comfortable using IE as a user interface, and it's a lot easier than wxPython (even though I like wxPython a lot). -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Openning the IDE from Windows Explorer

2005-06-14 Thread Tim Roberts
templating. If you really need this to have a native user interface, there are several good options: wxPython, tkinter, and Qt are all possible. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Pyth

[python-win32] Unable to set an Excel chart's title through win32com : can you reproduce this problem ?

2005-06-28 Thread Tim Roberts
ocessing to occur, you would have seen that the error was, in fact, occurring at the "chart.HasTitle". I'm not sure I know why, but the issue is the "chart.Location" method. After that method, the chart object is no longer valid, and you can't manipulate anything. If

[python-win32] polling values from physical sensors

2005-07-06 Thread Tim Roberts
ikey, and Jameco are all electronic suppliers that have sensors and interface kits available. You might do some web searches for robotics suppliers. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing lis

Re: [python-win32] Invoking InchesToPoints

2005-08-02 Thread Tim Roberts
les: def InchesToPoints( inches ): return inches * 72.0 -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Invoking InchesToPoints

2005-08-03 Thread Tim Roberts
ting it to Python, forget about it. >Is it possible that it's not 72 all the time, >depending on the screen resolution and so forth? > > No. Pixels-per-inch can vary based on small vs large fonts, but points-per-inch is always 72, and twips-per-inch is always 1440. --

Re: [python-win32] build list of all tasks like Alt-TAB box

2005-08-10 Thread Tim Roberts
t; Google is your friend. WS_EX_TOOLWINDOW is used to create floating toolbars, which can exist outside of the parent app. You don't want those showing up as main windows. WS_EX_CONTROLPARENT essentially says "this window contains other controls". Getting rid of this probably gets ri

Re: [python-win32] build list of all tasks like Alt-TAB box

2005-08-11 Thread Tim Roberts
e"; it is possible you might find an older version living somewhere in the dusty back rooms of the Internet. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] problem wih vi.run

2005-09-02 Thread Tim Roberts
may be able to use multithreading to do this, by starting up a separate thread to do the Run, while maintaining your control in the main thread. You'll have to be careful to monitor the object lifetime, so you don't try to use the ob

Re: [python-win32] Looking for sample code

2005-09-07 Thread Tim Roberts
n number to do the dispatch. You can do this: a = win32com.client.Dispatch( "Access.Application" ) Through the magic of the registry, Access.Application is a "symbolic link" to Access.Application.10 (or whatever), which is itself a symbolic link to the UUID of the A

Re: [python-win32] detecting windows type

2005-09-09 Thread Tim Roberts
ly difficult to get information about the network interfaces on a 95/98 machine. Have you tried the downloadable WMI support mentioned earlier? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-wi

[python-win32] testMSOffice.py and Excel 2003

2005-09-16 Thread Tim Roberts
ing to pull my hair out here, any help would be appreciated. > Remove the inner set of parentheses: xl.Workbooks.Add() Workbooks is a collection object, not a method. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] hide subshell os.system

2005-09-23 Thread Tim Roberts
en >using a graphical program ... > ASPN includes a "ping" module for Python. No console window there! Google is your friend. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-w

Re: [python-win32] Simultaneous Adobe Reader

2005-09-23 Thread Tim Roberts
t a time. If you un-maximize the client window, or if choose Window -> Cascade, you can see there are multiple documents inside. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] testMSOffice.py and Excel 2003

2005-09-27 Thread Tim Roberts
ead of integers. Instead of using dynamic.Dispatch, if you say this: from win32com.client import gencache, constants xl = gencache.EnsureDisplatch("Excel.Application") now you can say this: lastRow = xlSheet.Cells.Find('Hello World', xlSheet.Cells(1, 1), constants.xlFormulas, constants.xlWhole ).Row and your code runs. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ 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 Tim Roberts
find a reference somewhere. However, I consider this a fairly odd request. What are you actually trying to do? If you want to generate and print formatted documents, you would have finer control and a much more flexible solution by using ReportLab to create PDF files, or HTML and the wxH

Re: [python-win32] Service problem - can't find stop method of object

2005-10-07 Thread Tim Roberts
do? Is it possible you're doing some operation that tries to cross a user boundary? Services run as LOCAL_SYSTEM, and there are some things you can't do to service processes. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Translating MS-Word documents

2005-10-11 Thread Tim Roberts
cument formatting will survive a change to RTF and back, you could convert to RTF (which is easily machine readable) and do the replacements in plain text. However, few documents survive that change completely intact. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc.

Re: [python-win32] Translating MS-Word documents

2005-10-11 Thread Tim Roberts
ctually language translation, since the author did not mention it, although there are certainly few other applications for which a 5,000 word dictionary would be necessary. Yes, there are tools for this that are much better than rote word-for-word replacement. -- Tim Roberts, [EMAIL

Re: [python-win32] Control-C

2005-10-17 Thread Tim Roberts
Services will be absolutely prohibited from interacting with the user. They will have to start up a separate process in the user's session in order to communicate -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python

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

2005-10-20 Thread Tim Roberts
p my files. > Are you writing this as a CGI process in Apache/Win32? Have you redefined your stdout to be binary? By default, Python opens its stdout as binary, so when you write this out to the socket, the file system will "helpfully" translate 0A to 0D/0A. You need somethin

[python-win32] create user message for wxPython

2005-10-21 Thread Tim Roberts
to receive messages. You said application B was also a wxPython application. Doesn't it already have a wxApp and a wxFrame main window? If you are running app.MainLoop(), that should be enough to catch messages. As long as that "OnStart" function is a member of the frame c

Re: [python-win32] simulate DoEvents by python/wxpython

2005-10-27 Thread Tim Roberts
send messages between the threads, to signal when an image is available, or to signal that a worker thread should exit. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] monitoring application controls...

2005-11-14 Thread Tim Roberts
there are people doing research in accessability that have done it: http://www.cs.unc.edu/~parente/tech/tr01.shtml Note particularly the libraries for pyHook and pyAA. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] error message after many win32pipe.popen calls

2005-11-15 Thread Tim Roberts
ywin205) > Does it fail if you run it outside of Pythonwin? Are you sure you're closing all of the pipes properly before starting a new one? Have you tried this with the new "subprocess" module? Error 1816 is an "exceeded quota" sort of error. You

Re: [python-win32] inspect32.exe python equivalent?

2005-11-17 Thread Tim Roberts
particularly the libraries for pyHook and pyAA. > Note that the "AA" in "pyAA" stands for "Active Accessibility". -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

<    3   4   5   6   7   8   9   10   11   12   >