Re: [python-win32] Friendlier pywintypes.com_error messages

2008-08-08 Thread Tim Roberts
ormation. Not sure what you mean by "supported error codes". There are HRESULT error numbers spread all over the include files in the Platform SDK. The most common (like the three you mentioned) are in WinError.h. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc

Re: [python-win32] Play MP3s from Windows, Just Works

2008-08-18 Thread Tim Roberts
rs have already said they will not assert their patent rights on free and/or open source decoders and encoders. However, you are correct to point out that the legal situation is murky. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc.

Re: [python-win32] GetModuleFileName requires Process or Thread handle?

2008-08-18 Thread Tim Roberts
dule handle of your main executable is 0x0040). You cannot call GetModuleFileName across processes. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] help with parsing email

2008-08-18 Thread Tim Roberts
cket.error, msg error: (10061, 'Connection refused') Are you absolutely sure that your Exchange server includes the POP gateway? Remember that Outlook communicates with Exchange through a custom set of protocols. The POP gateway is optional, and many corporate environments

Re: [python-win32] PyCEdit issue

2008-08-18 Thread Tim Roberts
Marc-André Belzile wrote: Ok that works. Is it a limitation with the windows control or PyCEdit? The Windows multi-line edit control requires \r\n between lines. If that's what PyCEdit uses, then that's where it comes from. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Bo

Re: [python-win32] help with parsing email

2008-08-19 Thread Tim Roberts
o I had to use an external TLS Python module to > connect to it. I would check Outlook's settings and see if it has SSL > or TLS enabled. I thought I wrote this to the list, but I don't see it. Outlook and Exchange communicate through a private set of protocols. They do not use P

Re: [python-win32] Change account email option

2008-08-19 Thread Tim Roberts
tom of each message to get to a place where you can set this up. Mailman doesn't provide a way to do simple renaming, other than running a shell command on the server itself. The easiest way is to unsubscribe the old and resubscribe the new. -- Tim Robe

Re: [python-win32] Detect if user has a window opened in full screen mode?

2008-08-21 Thread Tim Roberts
can answer this question. Note that DirectX games use a very different method of going fullscreen than maximized applications. For maximized applications, you could enumerate through all of the top-level windows and find their window rectangles. For DirectX games, that wouldn't work. -

Re: [python-win32] os.startwith issue dealing with .tif (winxp)

2008-08-29 Thread Tim Roberts
in this specific case, you are in luck. The "Microsoft Picture and FAX Viewer" happens to live inside of a system DLL, and that DLL always lives in the Windows "system32" directory. So, you can do this: rundll32.exe shimgvw.dll,ImageView_Fullscreen path\to\image\file.tiff Wh

Re: [python-win32] ImportError: No system modul

2008-09-10 Thread Tim Roberts
)" > > Although the file pythoncom24.dll does exist. > It must do more than "exist", of course. It must be in the right spot. How did you install pywin32? Where does it exist? And what does this say? import sys print sys.path -- Tim Roberts, [EMAIL PROTE

Re: [python-win32] Accessing other interfaces of a Dispatch created COM object

2008-09-10 Thread Tim Roberts
he impression that InvokeTypes is something of Microsofts, and > there's isn't really any way to observe what it's doing? > I've lost track. What's the root problem? Is it still the "Library not registered" issue when you call a method in Interface_2?

Re: [python-win32] Accessing other interfaces of a Dispatch created COM object

2008-09-10 Thread Tim Roberts
e IIDs listed in HKEY_CLASSES_ROOT\Interface. > So I searched through the registry for those CLSIDs. They show up in > the same places, once each under HKEY_CLASSES_ROOT and > HKEY_LOCAL_MACHINE. HKEY_CLASSES_ROOT is just a "symbolic link" shortcut to HKEY_LOCAL_MACHINE\Softw

Re: [python-win32] Accessing other interfaces of a Dispatch created COM object

2008-09-10 Thread Tim Roberts
next. > Take the IID of the type library for _basicUHI.tlb. Now, look that up in HKEY_CLASSES_ROOT\TypeLib. Somewhere in there, there should be a path to the TLB. Make sure the path is correct. You might also try running regsvr32 on the DLL file associated with I2. -- Tim Roberts, [EMAIL P

Re: [python-win32] VARIANT as byref parameter

2008-09-16 Thread Tim Roberts
rameter in python with win32com. I found no documentation for a > problem like this in the web. It would be great if someone could help me. Is the parameter declared as [out,retval] in the type library? If so, then Python should create the variant and return it to you: varData = QueryNote.ReadVa

Re: [python-win32] Fwd: Modifying the system menu

2008-09-17 Thread Tim Roberts
odify the menu in the hook. You will have to use a hook in order to catch the menu item being chosen anyway. There are Python modules to handle some kinds of hooks, but overall this would be much easier in C. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___

Re: [python-win32] VARIANT as byref parameter

2008-09-17 Thread Tim Roberts
t; > This line produces a type mismatch error. > Well, that implies that the buffer is an in/out variant, not an output. I'm not sure how to construct a buffer Pythoncom will correctly translate in this instance. Mark, maybe? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boek

Re: [python-win32] Pythonwin telit

2008-09-18 Thread Tim Roberts
ver, there haven't been any significant bugs in quite a long time. What version are you using, and what "bugs" do you see? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@pyth

Re: [python-win32] Virtual print driver - similiar to winpdf

2008-09-22 Thread Tim Roberts
ows Driver Kit). It is not a project to be undertaken lightly. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Controlling Excel via COM: errors with conditional formatting

2008-09-24 Thread Tim Roberts
o, it records it in Visual Basic. The "Arg:=Value" syntax is a Visual Basic syntax. The "sometimes these () are necessary" comment comes from Visual Basic. By the way, after you use Dispatch, all of Excel's "xl" constants are available to you. import win32com

Re: [python-win32] win32console attach problems

2008-10-03 Thread Tim Roberts
after the console is started the > AttachConsole fails, throwing an exception. Fair enough. My issue is > that after one such a failing attempt all following AttachConsole > attempts will fail the same way. What error do you get? MSDN describes several different error returns. --

Re: [python-win32] help with python COM server needed

2008-10-03 Thread Tim Roberts
(?) and (?)", \ >(konts, d1, d2)) > sqlite3 uses the ? method of parameter substitution. You don't need those extra parentheses (that is, use ? not (?) ). Also, you don't need the backslash at end of line; Python will keep continuing the stat

Re: [python-win32] win32console attach problems

2008-10-03 Thread Tim Roberts
s already attached. But if this was the > case - shouldn't it be fixed with the win32console.FreeConsole I > always call before attaching? Well, let me ask a silly question. Are you running this from a "pyw" app, using Pythonw.exe, so you don't have a console of your own?

Re: [python-win32] win32console attach problems

2008-10-06 Thread Tim Roberts
#x27;t see anything immediately obvious. If it were me, I'd write a tiny C application to try the exact same APIs to kill your console app, just to make sure that the sequence does work as expected. Print out the "pid", then pass that to the C app by hand. Remember to make it

Re: [python-win32] help with python COM server needed

2008-10-06 Thread Tim Roberts
alue = response > End Sub > Function calls in VB with no parameters don't use parens. I think you want this: response = a.ReturnAmount -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] win32console attach problems

2008-10-07 Thread Tim Roberts
e API. It doesn't keep any state. My uneducated guess is that you are seeing an issue with the underlying Win32 APIs, not in the win32console module itself. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32

Re: [python-win32] Problem in accessing the Message body of Outlook Inbox.

2008-10-09 Thread Tim Roberts
ere are several ways to get to Outlook, and the solution depends on what you used. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Problem in accessing the Message body of Outlook Inbox.

2008-10-10 Thread Tim Roberts
message = inbox.Messages.Item(i + 1) > f.write(message.Subject+"\n\n") > f.write(message.Body+"\n\n\n") > > Hope you could get some idea based on this.. I believe you want the "Text" property

Re: [python-win32] Please help, run into a COM object issue using the windows media SDK, thanks!

2008-10-10 Thread Tim Roberts
m a message. Any of the GUI frameworks will supply a message loop. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] how do I build pywin32?

2008-10-13 Thread Tim Roberts
the win sdk? What do I need to install to > properly build pywin32? It may be worth trying an older version of the SDK. The Vista SDK version of specstrings.h does not try to include sal.h. There is a 5 year gap between VS7.1 and the WS2008 SDK. Why are you building Python from scratch? J

Re: [python-win32] how do I build pywin32?

2008-10-13 Thread Tim Roberts
age-class or type specifiers > com\win32comext\mapi\src\PyIProfSect.cpp(648) : error C2059: syntax > error : ')' > > (either on IMAPIProp or PyObject, probably the former) Yes, but that's not sensible. That code hasn't changed in 9 years. IMAPIProp and IProfSect

Re: [python-win32] COM server and function parameters

2008-10-15 Thread Tim Roberts
id set to IID_NULL (a list of 0s). > Again, this function returns two things: an HRESULT and an interface. Are you returning a two-tuple? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Problem in accessing the Message body of Outlook Inbox.

2008-10-16 Thread Tim Roberts
recipients. In CDO, the MAPI.Message object has a "Recipients" collection, which is a set of "Recipient" objects. Each "Recipient" has Address, Name, and Type properties. The "Sender" property has the F

Re: [python-win32] COM -- Dispatch() parameter

2008-10-21 Thread Tim Roberts
ot; Adobe has a great deal of technical documentation on their web site: http://www.adobe.com/devnet/acrobat/. The detailed COM stuff is in their "Interapplication Communication Reference": http://partners.adobe.com/public/developer/en/acrobat/sdk/IACReference.pdf -- Tim Roberts, [EMAI

Re: [python-win32] Feature request: adding unicode method to CDispatch

2008-10-21 Thread Tim Roberts
e where the default behavior doesn't do what you expect? Usually, if a method is returning a string, it will be a Unicode string, because that's the COM standard. If a method returns a single-byte string, it's probably better to convert it yourself. -

Re: [python-win32] Feature request: adding unicode method to CDispatch

2008-10-21 Thread Tim Roberts
lt property of the Table object is a Range object. The default property of the Range object is the Text object, which IS a Unicode string. So, instead of relying on the default conversions, if you say this explicitly: for j = doc.Tables xxx = j.Range.Text you'll find that xxx

Re: [python-win32] Feature request: adding unicode method to CDispatch

2008-10-21 Thread Tim Roberts
Tim Roberts wrote: > > You're relying on a bunch of automatic conversions here, some of which > do conversions that you don't want. > > "j" is not a string here -- it is a Table object. The default property > of the Table object is a Range object. The def

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

2008-10-22 Thread Tim Roberts
redible hack impersonating as a feature. For my own curiousity, is this for a test lab somewhere, or is this actually part of a product? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32

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

2008-10-24 Thread Tim Roberts
27;s not fair to say! The mechanism you are using should work. That's the mechanism Microsoft recommends. There's something going wrong in the process, but the concept is correct. I didn't reply because I couldn't spot the problem off the top of my head, but you are on the r

Re: [python-win32] Getting a users token

2008-10-24 Thread Tim Roberts
ng as the current user. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] force outlook ui update

2008-10-27 Thread Tim Roberts
ated in every place. > > Is there a way to force an UI update? No. MAPI controls the mail engine, not the user interface. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected]

Re: [python-win32] force outlook ui update

2008-10-29 Thread Tim Roberts
Christan K. wrote: > Tim Roberts probo.com> writes: > >> Christian K. wrote: >> >>> the subject field in the inbox list changes immedately but the subject >>> line of the message itself (either shown in the embedded panel or in >>> its own

Re: [python-win32] force outlook ui update

2008-10-30 Thread Tim Roberts
API services only because it is sensible for it to do so, but it's an add-on. It's not a core part of Outlook's world, and as you can see, the integration is not particularly tight. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. _

Re: [python-win32] Python and Microsoft Media Server

2008-10-30 Thread Tim Roberts
whether the URL is alive or not? I think you could use the socket module to send a ping request to the port and see if you get a response. If you are actually trying to figure out whether the movie is playable, then you'll have to use a media player of some kind. -- Tim Roberts, [

Re: [python-win32] how to call the dll in python

2008-11-03 Thread Tim Roberts
specific about what you need, we could provide better advice. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] PythonWin

2008-11-13 Thread Tim Roberts
oexist in the world for many years yet, so there's nothing wrong with learning Python 2.x today. But to do that, I agree with Harald that you should probably start with Python 2.5. Virtually all of the major tools work with Python 2.5. -- Tim R

Re: [python-win32] Scary message when opening the Interpreter

2008-11-14 Thread Tim Roberts
nd Python-Win32 from source? If so, may I ask why? There is virtually no benefit to doing so on Windows. The pre-built executables provide everything you need. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] How to make python scripts output to current cmd window? (like linux terminal)

2008-11-17 Thread Tim Roberts
ftype: ftype Python.File On my machine, it says: python.file="C:\Apps\Python24\Python.exe" "%1" "%* I see that you wrote "./.py". Was that an accident, or are you using a shell other than "cmd"? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boe

Re: [python-win32] How to make python scripts output to current cmd window? (like linux terminal)

2008-11-17 Thread Tim Roberts
Tim Roberts wrote: > sayeo87 wrote: > >> Right now on Windows I have added ".py" to my PATHEXT so that I can run .py >> files by doing ./.py. But when I do this the output of the program >> goes to a new command prompt window which instantly disappears. How c

Re: [python-win32] How to make python scripts output to current cmd window? (like linux terminal)

2008-11-18 Thread Tim Roberts
Mike Driscoll wrote: > Tim Roberts wrote: >> >> I realized when I read my reply that I really did nothing to clear up >> any confusion. Allow me to provide an example. >> >> Let's say I have c:\bin\remote.py, and client.py in the current >> directory

Re: [python-win32] getting integer value for worksheet.Cells(row, col).Value

2008-11-19 Thread Tim Roberts
Visual Basic code. To do the same conversion in Python, you need to use a Python function -- int() in this case. Cells().Value returns a string. It's just that simple. If you want an integer, you convert it. No mystery, no COM. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelhe

Re: [python-win32] dispatch and minimize the window?

2008-11-20 Thread Tim Roberts
Dispatch, you want to put an icon in the tray? If so, it's entirely up to your COM server to do this. There are a number of example on Google of how to put an icon in the tray. Here's one: http://www.brunningonline.net/simon/blog/archives/SysTrayIcon.py.html -- Tim Robert

Re: [python-win32] Simple context-menu question.

2008-11-25 Thread Tim Roberts
a menu item was clicked. I would also caution you that it is not good practice to create deeply nested context menus. It makes for a very confusing user experience. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Fwd: Accessing Modification Time of an Outlook Mail in Python

2008-11-25 Thread Tim Roberts
do not really have a "modification time". The only thing they have is the "Date:" header, which is really the creation time (message.TimeCreated). -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 m

Re: [python-win32] Simple context-menu question.

2008-11-25 Thread Tim Roberts
Mike Driscoll wrote: > Tim Roberts wrote: >> Joel Bryan Juliano wrote: >> >>> >>> My question is how can I get the current names of the "MenuName > >>> SubMenuName > SubItemName" when InvokeCommand is called? >> >> I would al

Re: [python-win32] Problem in accessing the Sender and Receiver addresses of an outlook mail

2008-12-03 Thread Tim Roberts
succeed. This depends on your mail server. If you are using Exchange, and are looking at an internal message, it's not using SMTP, and might be configured to deliver only to DN names. The "Type" property of the address tells you which address type it is. http://www.ssuet.edu.pk/taim

Re: [python-win32] Problem in accessing the Sender and Receiver addresses of an outlook mail

2008-12-04 Thread Tim Roberts
that talks a little about this: *http://tinyurl.com/6mfqqo* -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] rebooting windows from Python?

2008-12-04 Thread Tim Roberts
, and it really is a personal preference, I think it's a lot less trouble, and a lot easier to understand, just to use the tools at my disposal: subprocess.call( "shutdown", "-r" ) -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc.

Re: [python-win32] Walking the registry and creating reg files

2008-12-04 Thread Tim Roberts
t; need to roll my own? I'm not answering the question you asked, but are you aware of the very handy "reg" tool included with XP? "reg export" can export a full key in a format that is compatible with regedit. reg export HKLM\system\CurrentControlSet\Services\vgasave xx

Re: [python-win32] Walking the registry and creating reg files

2008-12-04 Thread Tim Roberts
"something" > Because Mike said he needed to extract sections from the existing registry for audit purposes. It's up to him to decide whether that's easier by writing Python or by using "reg export". Is "something" a number? ;) -- Tim Roberts, [E

Re: [python-win32] Walking the registry and creating reg files

2008-12-05 Thread Tim Roberts
Tim Golden wrote: > > [*} One note which I remember: the .reg files are usually UTF16LE; > not sure if that's important or not. Regedit and "reg export" create UTF16 files, but regedit and "reg import" are perfectly happy to read 8-bit .reg files. -- Tim Rob

Re: [python-win32] Walking the registry and creating reg files

2008-12-05 Thread Tim Roberts
function that Tim mentioned, but to do so, it has to acquire backup privileges. If you want to use the same functions from your own program, YOU have to acquire the backup privileges. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. __

Re: [python-win32] Walking the registry and creating reg files

2008-12-05 Thread Tim Roberts
en-us/library/ms724917.aspx -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Walking the registry and creating reg files

2008-12-05 Thread Tim Roberts
remember, I didn't have any special permissions for that. > You are quite correct. It's only those two specific functions (RegSaveKey and RegRestoreKey) that need special privileges. It just so happens that's what Tim G was talking about. So, we're all in violent agreement

Re: [python-win32] Simulating a mouse click - lParam

2008-12-05 Thread Tim Roberts
ust way is like this: lParam = struct.unpack( 'L', struct.unpack( 'hh', x, y ) )[0] However, it would be much better to talk to the tab control directly. Are you doing this from inside the owning wx application? If so, you should be able to get the tab control object and call

Re: [python-win32] Walking the registry and creating reg files

2008-12-05 Thread Tim Roberts
need special privileges. At least, that's my story, and I'm sticking to it. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Simulating a mouse click - lParam

2008-12-05 Thread Tim Roberts
enumerate for it. After you send TCM_SETCURSEL, you should be able to call InvalidateRect to force the window to redraw. Do you have the Windows SDK installed? You can use the "spyxx" tool to explore the window configuration of the app yo

Re: [python-win32] Walking the registry and creating reg files

2008-12-08 Thread Tim Roberts
;s, while with your method, I would end up with the > original three? Is that right? > Yes, but remember that RegSaveKey uses an undocumented binary format that matches the internal registry database format. Joe User isn't going to go in and modify the saved file. It was really

Re: [python-win32] get window title

2008-12-09 Thread Tim Roberts
phrases should have brought you the pieces you need to make this happen. import win32gui def winEnumHandler( hwnd, ctx ): if win32gui.IsWindowVisible( hwnd ): print hex(hwnd), win32gui.GetWindowText( hwnd ) win32gui.EnumWindows( winEnumHandler, None ); -- Tim Roberts, [EMAI

Re: [python-win32] get window title

2008-12-09 Thread Tim Roberts
ne another. For dialogs and top-level windows, it means the title bar text. For edit boxes, it means the contents. For static text, it means the text. For buttons, it means the button caption. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. __

Re: [python-win32] Passing data in a windows message

2008-12-10 Thread Tim Roberts
nds, both temporary objects no longer have any references, so they will get garbage collected. Won't they? Now, if you had written it this way: hold_me = marshal.dumps( message ) address, length = win32gui.PyGetBufferAddressandLen( buffer(hold_me) ) then I think it would work, becau

Re: [python-win32] Getting active SMTP servers via python.

2008-12-10 Thread Tim Roberts
ine this a priori, and many commercial environments do not have SMTP servers at all (Exchange clients, for example). You must ask the user to configure this. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing li

Re: [python-win32] Passing data in a windows message

2008-12-10 Thread Tim Roberts
If you used SendMessage, it would block until the other end acknowledged it. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Writing to Excel performance

2008-12-12 Thread Tim Roberts
b page sends an attachment, it doesn't trust the MIME type. It reads the file to detect the file type. If you rename an executable to xxx.xls and try to open it within it Excel, it will complain about the format. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___

Re: [python-win32] Writing to Excel performance

2008-12-12 Thread Tim Roberts
most part, uses the extension to look up a handler in the registry. The old Mac OS used a fourcc scheme, where you embedded a code identifier in the resource fork of the file itself. That makes many things unnecessarily hard. Linux uses the "shebang" technique, where the first line of a f

Re: [python-win32] Post Message

2008-12-15 Thread Tim Roberts
n hacking window messages. Remember that the "Save As" dialog is in a separate top-level window, and because it is modal, it has its own message loop. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] no array returned in output parameter

2008-12-15 Thread Tim Roberts
. > > > - Which type represents 16396 ? > That's 12 + 0x4000, so it's VT_VARIANT + VT_BYREF. That is, a variant output parameter. 16387 is VT_I4 + VT_BYREF, or a long integer output parameter. Are you 100% convinced that the object has an array of filters to return? How

Re: [python-win32] Transmit HID device with python on Windows

2008-12-15 Thread Tim Roberts
s a Python binding. http://libhid.alioth.debian.org/ -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] no array returned in output parameter

2008-12-15 Thread Tim Roberts
but that should be irrelevant. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Internet Explorer Session independent Creation

2008-12-17 Thread Tim Roberts
same credential. > > But what I want is truly independent internet explorer instance. > > > > Somebody can help me? > I'm not convinced this is possible. When you run several instances of IE via COM, they all try to route to the same process, which means they will share

Re: [python-win32] Post Message

2008-12-17 Thread Tim Roberts
? The AcroExch.PDDoc interface includes a "Save" method to save the file. I don't immediately see how annotations are enabled; is that one of the keys in the "Info" dictionary? -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. __

Re: [python-win32] kernal32.DeviceIoControl Operation Aborted

2008-12-18 Thread Tim Roberts
ION_ABORTED maps to STATUS_CANCELED in the driver world. That's a very specific error, which happens only when a driver has requested that your I/O request be canceled. That can happen if you hit Ctrl-C, or if you unplugged the device. However, it shouldn't happen with ordinary requests

Re: [python-win32] kernal32.DeviceIoControl Operation Aborted

2008-12-19 Thread Tim Roberts
ifferent value. So either it's > just a coincidence that I read 0x8B, or I have my data aligned wrong > and it's getting a '0' in the field where it's expecting a 7 for PORTD. Are you getting two bytes here as well? What's the second byte? --

Re: [python-win32] kernal32.DeviceIoControl Operation Aborted

2008-12-19 Thread Tim Roberts
language for dealing with hardware, but if you do very much of it, you'll find that the "array" and "struct" modules become indispensable parts of your daily toolkit. I write drivers for a living, both Windows and Linux. My debug and diagnostic tools are almost alwa

Re: [python-win32] Welcome to the "python-win32" mailing list

2008-12-29 Thread Tim Roberts
ot 0 > > What should i do? Would appreciate any tip. :) Well, "select" is not just a drop-in replacement for "poll", although it can serve the same function. Without looking at the rest of the source, you probably want something like this: def Run( self ): self._fdmap = {

Re: [python-win32] Welcome to the "python-win32" mailing list

2008-12-29 Thread Tim Roberts
Tim Roberts wrote: > Well, "select" is not just a drop-in replacement for "poll", although it > can serve the same function. Without looking at the rest of the source, > you probably want something like this: > >def Run( self ): > self._fdm

Re: [python-win32] Welcome to the "python-win32" mailing list

2008-12-30 Thread Tim Roberts
ch is indented from the "def" statement. If you had that line at the same indentation as the "def", you'd see this error, because it would not be part of the function. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Multiple Extraction - ArcGIS9.2

2009-01-05 Thread Tim Roberts
%* C:\tmp> If those are missing, and you know that the Python interpreter exists on your disk, you can set it up yourself using commands like this, substituting your own path, of course: assoc .py=Python.File ftype Python.File="C:\Python24\python.exe" "%1&qu

Re: [python-win32] building pywin32 for python 2.6...

2009-01-05 Thread Tim Roberts
;C:\Program Files (x86)\Microsoft Visual > Studio .NET 2003\Vc7\bin\cl.exe"' failed with exit status 2 > You are using the very latest SDK (6001) but an old compiler (Visual Studio 2003). If you read the release notes, you'll see that the 6001 SDK no longer supports

Re: [python-win32] Multiple Extraction - ArcGIS9.2

2009-01-06 Thread Tim Roberts
E~1.PY 'C:\HfT Thesis_Bikash\thesis data\A2008257NDVI.tif';'C:\HfT Thesis_Bikash\thesis data\A2008273NDVI.tif' 'C:\HfT Thesis_Bikash\thesis data\exactbound_gcs.shp' I may have the quoting wrong. You'll have to see what is required by ArcGIS. -- Tim Roberts, t...@p

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

2009-01-06 Thread Tim Roberts
of /os.environ['APPDATA']/ feasible for AUTO-start > Services? If not, what are preferred folders for > application-specific data; my preference is to avoid > /pythonxx\Lib\site-packages\.../ > APPDATA works if the account really does have a profile

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

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

Re: [python-win32] Dispatching a win32com from within a win32service

2009-01-19 Thread Tim Roberts
before login? There's an issue here, in that iTunes needs to display a user interface, which it can't really do until someone has logged in, -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list pyth

Re: [python-win32] (no subject)

2009-01-22 Thread Tim Roberts
> CLIENT_PIPE.write( 'A' ) > CLIENT_PIPE.flush() > reply = CLIENT_PIPE.read( 1 ) > print 'CLIENT: answer %d received: "%s"'%(i, reply) > The issue here is with the Python file wrappers. You have to take SOME kind of action to allow the

Re: [python-win32] GetWindowsVersion on Longhorn

2009-01-22 Thread Tim Roberts
Windows NT\CurrentVersion should have what you need. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] ImportError: DLL load failed: The specified procedure could not be found.

2009-01-26 Thread Tim Roberts
bytes free > > Looks like there's only one set of these files in the system32 > directory. > Of course; Windows does not allow multiple versions in a single directory. What Mark suggested is that you compare those versions to whatever versions are contained in your Py

Re: [python-win32] How to calc amount of avail RAM in a process ?

2009-01-29 Thread Tim Roberts
geoff wrote: > I am hoping someone could steer me in the right direction on how to > calculate the amount of RAM available to a process. > > I found the post below from Tim Roberts - a belated thanks Tim for > your patient responses ! and it seems we regularly hit this limit.

Re: [python-win32] Opening and enumerating resource many times

2009-01-29 Thread Tim Roberts
doesn't seem to be a Python garbage issue; I added a forced garbage collection in every loop, and it still happened. I haven't found any web articles about this. Very interesting... -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] How to calc amount of avail RAM in a process ?

2009-01-29 Thread Tim Roberts
('ullAvailVirtual', c_ulonglong), ('ullExtendedVirtual', c_ulonglong), ] def GlobalMemoryStatusEx(): x = MEMORYSTATUSEX() x.dwLength = sizeof(x) windll.kernel32.GlobalMemoryStatusEx(byref(x)) return x z

Re: [python-win32] How to calc amount of avail RAM in a process ?

2009-01-29 Thread Tim Roberts
is a virtual memory system. Even if you only have 256MB of physical RAM, your process can still allocate up to 2GB of memory. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] How to calc amount of avail RAM in a process ?

2009-01-29 Thread Tim Roberts
sure that pages you are really USING stay in memory. The other pages will be used by DLLs, other processes, and disk caching. Also remember that, if the page file gets low, the system will allocate more. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32

  1   2   3   4   5   6   7   8   9   10   >