Re: [python-win32] Building win32 extensions to Python (OT)

2006-06-19 Thread James Carroll
Hi Bill > 1). The resulting exe did not run properly or > 2). You didn't know that py2exe can create single file executables? > Unfortunately it's #1. I get a crash with the single file bundled with no zipfile... My post on the py2exe mailing list didn't get any replies: http://article.gmane.

[python-win32] Fwd: Building win32 extensions to Python - crash

2006-06-16 Thread James Carroll
ant C++ to manage its lifetime, then you can do a = A(); a.thisown=False. Thisown is a swig thing that keeps python from deleting the C++ class. But you aren't using swig (yet) so this is only relevent as far as showing the one thing you have to be aware of. Without swig, it's jus

Re: [python-win32] Building win32 extensions to Python

2006-06-16 Thread James Carroll
> Thanks for your responses. I went ahead and tried MinGW. I was able to > build and use screengrabber and other examples. I also used it as an > example and created successfully a very simple "hello python" extension. Fantastic! they must be more (binary) compatable than I thought. > What am

Re: [python-win32] Building win32 extensions to Python

2006-06-15 Thread James Carroll
Hi Chris, I would recommend buying Visual Studio. It's what python 2.4 is built with, and it makes compiling extensions nice and easy. My favorite examples of extending python include: - screengrabber extension for the python imaging library http://effbot.org/downloads/ 1) download and inst

[python-win32] Word COM, then paste into word app.

2006-04-06 Thread James Carroll
I would like to try to do something with wxPython that I've seen a commercial app do... The app was a statistical analysis program, and it would display results in a richly formatted way, then would paste into word perfectly. I'd like to show a read-only, but dynamically generated small word docum

Re: [python-win32] application data

2006-03-13 Thread James Carroll
> >dlg = wx.lib.dialogs.MultipleChoiceDialog(self, > > "Choose the user's profile directory" > > "Migrate settings for a user", subdirs, (200,200)) > > > >Whadayathink? > > No, that's no better. In many corporate environments, your personal > profile lives on a net share,

[python-win32] CoInitialize not called?

2006-03-10 Thread James Carroll
Hi, I have a multi-threaded wxPython App that examines shortcuts using the function below. The first time my thread runs that opens hundreds of links and looks for my target exe everything is fine. The second time I get the following error: Unhandled exception in thread started by Traceback (mo

Re: [python-win32] Python-win32 Digest, Vol 36, Issue 11

2006-03-10 Thread James Carroll
> > > >I'm changing my > >strategy to simply let them choose from a list of directories under > >Documents and Settings instead. > > That's not entirely reliable. One of my partners, a man who HATES > spaces in file names, used the "tweakui" utility to rename all of the > special directories, so h

Re: [python-win32] Python-win32 Digest, Vol 36, Issue 11

2006-03-09 Thread James Carroll
> >>> APPDATA=C:\Documents and Settings\username\Application Data > >>> > >>> I'm tempted to get the APPDATA directory for the current user, and the > >>> username, and do a replace on the username directory, but If there's a > >>> more foolproof way of knowing what the APPDATA directory will be fo

Re: [python-win32] Creating users

2006-03-08 Thread James Carroll
> In that case, you can place files in the Default User profile, > and they'll get copied into new profiles as they are created. > Alternately, you can put them in the All Users profile, and > everyone will share the same copy. Thanks Roger, I've got one more question for you if I haven't bugged

Re: [python-win32] Creating users

2006-03-08 Thread James Carroll
> >>> i = win32net.NetUserEnum('',0,0) That's It! I was thinking the third parameter would give me more information if it was a bigger number (I copied a 3 from the win32netdemo.py) but just having a 0 there gives me all the users I was hoping for. Thanks, -Jim __

Re: [python-win32] Creating users

2006-03-08 Thread James Carroll
> The profile, which is what's stored in Documents and Settings, will > be created (or copied from a server in the case of a roaming profile) > when the account is first logged on . Thanks Roger, since my goal is to copy something into the profile directories, then I am going to have to wait unti

[python-win32] Creating users

2006-03-07 Thread James Carroll
Hi I'm looking at maybe using: win32net.NetUserAdd(server, 1, d) to create user directories under Documents and Settings on the local machine, but don't know what they want for passwords. I also don't know if the users I want to create already have an account on their campus domain controller.

[python-win32] py2exe problem with makepy

2006-03-03 Thread James Carroll
Hi, I've got python 2.4.2 & pythonwin 207 & py2exe 0.6.4 (I also tried 0.6.3) The other day I tried to run makepy on Excel.Application and got a strange error... today I am getting something similar trying to py2exe something that I've had luck with before. I'm getting the following error: runn

Re: [python-win32] how to open a file with associated application ?

2006-03-02 Thread James Carroll
Hi Michael, Try this: import os os.startfile(r"C:\DEFORM3D\PROBLEM\test.KEY") -Jim On 3/2/06, Michael Li <[EMAIL PROTECTED]> wrote: > hi, > > In Windows, there is a default way to open a file, > like double click test.txt file, then Notepad will > open the test.txt, double click test.doc, then

[python-win32] File permissions...

2006-02-17 Thread James Carroll
How do I grant permissions on directories with pythonwin? At the moment we use a command line utility: cacls "existing path" /E /T /P Everyone:F To give Everyone full access (:F) by modifying an existing ACL (/E) and affecting all contents of the directory (/T) I'd like to do it all with shell

[python-win32] Launching Windows' shortcut editor

2006-01-25 Thread James Carroll
Hi, I would like to invoke the same shortcut editor that you get when you right cilck on a shortcut (link) and choose Properties. It lets you edit the Target and Start In directories, etc. I've tried: win32api.ShellExecute (0, "Properties", filename, None, ".", 0 ) win32ap

Re: [python-win32] exe version information and icon extraction?

2006-01-25 Thread James Carroll
> You can use win32api.GetFileVersionInfo to retrieve all the version > properties. See \win32\demos\getfilever.py for usage. Thanks everyone, that was easy. My resulting code looks like this: try: # if the target is an exe, get the file information pairs = wapi.GetFileVersionInfo(targe

[python-win32] exe version information and icon extraction?

2006-01-24 Thread James Carroll
Hi, I'm trying to get some information out of some .exe files on Windows. I want to get the "Original File Name" and other resources / properties. (Company, file version, and other stuff you can see by right clicking on an exe and choosing the version tab.) I'd also like to get a small wxImage f

[python-win32] exe version information and icon extraction?

2006-01-24 Thread James Carroll
Hi, I'm trying to get some information out of some .exe files on Windows. I want to get the "Original File Name" and other resources / properties. (Company, file version, and other stuff you can see by right clicking on an exe and choosing the version tab.) I'd also like to get a small wxImage f