[python-win32] MSI installer or zip file for pywin32?

2010-04-02 Thread Bill Janssen
Howdy, all. I'm writing a build script for UpLib on Windows with msys, and I'd like to find some way of installing the Python win32 extensions without running the old-style installer it currently comes with. Ideally, I'd like to just unpack the code and DLLs in my install directory, for later

Re: [python-win32] MSI installer or zip file for pywin32?

2010-04-02 Thread Bill Janssen
Preston Landers pland...@gmail.com wrote: You can run unzip on the official exe installer to get a directory structure that you can copy into your build. I had no idea one could do that! Thanks. The pywin32_postinstall.py stuff is separated out in the arhcive, and does need to be run to

Re: [python-win32] MSI installer or zip file for pywin32?

2010-04-06 Thread Bill Janssen
Mark Hammond skippy.hamm...@gmail.com wrote: As far as the system DLLs, last time I checked they do have to be in the system32 directory (or the wow64 version.) But I could be wrong - I didn't play with that very much. If it works without installing system DLLs I'd be curious to know.

Re: [python-win32] MSI installer or zip file for pywin32?

2010-04-06 Thread Bill Janssen
Mark Hammond skippy.hamm...@gmail.com wrote: On 6/04/2010 4:31 PM, Mark Hammond wrote: On 6/04/2010 4:28 PM, Bill Janssen wrote: Mark, my system is a dozen or so Python programs plus a few Windows services implemented in Python. If I set those up to hack the Path environment variable

Re: [python-win32] MSI installer or zip file for pywin32?

2010-04-07 Thread Bill Janssen
Bill Janssen jans...@parc.com wrote: Mark Hammond skippy.hamm...@gmail.com wrote: On 6/04/2010 4:31 PM, Mark Hammond wrote: On 6/04/2010 4:28 PM, Bill Janssen wrote: Mark, my system is a dozen or so Python programs plus a few Windows services implemented in Python. If I set those up

Re: [python-win32] MSI installer or zip file for pywin32?

2010-04-07 Thread Bill Janssen
Bill Janssen jans...@parc.com wrote: Just for the moment, I think I'll see if I can get things working by copying the DLLs into \WINDOWS\System32\, including Python26.dll. No luck so far. I install Python privately (Just for me on the Python installer) in C:\UpLib\1.7.9\python

Re: [python-win32] MSI installer or zip file for pywin32?

2010-04-07 Thread Bill Janssen
Mark Hammond skippy.hamm...@gmail.com wrote: $ python -i Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import win32api Traceback (most recent call last): File stdin, line 1,

[python-win32] problems with subprocess module and env parameter

2010-04-15 Thread Bill Janssen
When I call subprocess.Popen(), I'm getting an error from what I believe is win32process.CreateProcess: Traceback (most recent call last): File TestAdds.py, line 950, in testNoPasswordNoGuardian (UPLIB_MAKE_REPOSITORY, self.port, self.directory)) File TestAdds.py, line 96, in runSubProc

Re: [python-win32] problems with subprocess module and env parameter

2010-04-15 Thread Bill Janssen
Preston Landers pland...@gmail.com wrote: Your PATH is a Unicode string. I'm not sure offhand if that's acceptable or not, but all the rest of the strings appear to be regular (non-unicode) strings. You could also try: import types for k, v in env.iteritems(): if type(v) is not

[python-win32] Getting PyWin32 working with private Python installs

2010-04-19 Thread Bill Janssen
Bill Janssen jans...@parc.com wrote: Mark Hammond mhamm...@skippinet.com.au wrote: On 8/04/2010 12:05 PM, Bill Janssen wrote: I don't think I've tried that config. I'll give it a shot. [After trying it...] Nope, that may be necessary, but it's not sufficient. I installed

Re: [python-win32] Getting PyWin32 working with private Python installs

2010-04-20 Thread Bill Janssen
Howard Lightstone how...@eegsoftware.com wrote: On Tue, Apr 20, 2010 at 10:14 AM, Bill Janssen jans...@parc.com wrote: Howard Lightstone how...@eegsoftware.com wrote: I've had a private Python25 install running with win32 for a while. I believe the trick is that the pythoncom25.dll

[python-win32] CPython on Windows Azure?

2010-04-30 Thread Bill Janssen
Has anyone looked into getting CPython and pywin32 installed on a Windows Azure service platform? I foresee some difficulties here; for one thing, you can't run an installer, and for another, you can't install into C:/WINDOWS/system32/. Bill ___

[python-win32] finding pythonXX.dll?

2010-05-03 Thread Bill Janssen
Is there anyway to tell, from inside Python, where the python26.dll file is? I've got to install the win32 dlls in the same directory. I see that sys contains a symbol dllhandle, but that's just a numeric handle. Bill ___ python-win32 mailing list

Re: [python-win32] finding pythonXX.dll?

2010-05-04 Thread Bill Janssen
Roger Upole rwup...@msn.com wrote: Bill Janssen wrote: Is there anyway to tell, from inside Python, where the python26.dll file is? I've got to install the win32 dlls in the same directory. I see that sys contains a symbol dllhandle, but that's just a numeric handle. Bill

Re: [python-win32] finding pythonXX.dll?

2010-05-04 Thread Bill Janssen
Thomas Heller thel...@ctypes.org wrote: Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. from ctypes import * buf = create_string_buffer(256) windll.kernel32.GetModuleFileNameA _FuncPtr

[python-win32] mapping from a service to its class file?

2010-05-07 Thread Bill Janssen
I'm enumerating some service running under XP with mgr = win32service.OpenSCManager(None, None, 4) try: svcinfo = win32service.EnumServicesStatus(mgr) for svc in svcinfo: svch = win32service.OpenService(mgr, svc[0], win32service.SERVICE_QUERY_CONFIG) try:

Re: [python-win32] mapping from a service to its class file?

2010-05-09 Thread Bill Janssen
Bill Janssen jans...@parc.com wrote: For the [services] that are using PythonService.exe, I'd like to check to see whether the Python module for the service is still present. Is there any way to retrieve the information about that from the service? Here's what I came up with: import sys, os

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-10 Thread Bill Janssen
Mark Hammond skippy.hamm...@gmail.com wrote: That's correct. Using python.exe as the host will involve having a .py script which imports the servicemanager module then call PrepareToHostSingle and instantiate the service class - or something like that :) How definitive :-). I'm already

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-11 Thread Bill Janssen
Thanks, Mark. I suppose I could run regsetup.py, but that would make my private Python globally known, not really what I want to do. I'll soldier on with option (a), using python.exe to run the service, and see if I can get that to work on a simple example. Bill

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-11 Thread Bill Janssen
Mark Hammond mhamm...@skippinet.com.au wrote: Sounds about right - but reading pythonservice.cpp is really the definitive source to what needs to be done. Sadly I can't find anything more specific, such as a sample. OK. pythonservice.exe has a lot of stuff in it -- for instance, there seems

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-11 Thread Bill Janssen
OK, so I wrote my own InstallService: import sys, os, win32service def InstallService(pythonClassFile, serviceName, displayName, startType = None, errorControl = None, bRunInteractive = 0,

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-12 Thread Bill Janssen
Mark Hammond mhamm...@skippinet.com.au wrote: See attached sample which works for me - be sure to place it in the same directory as the pipeTestService.py sample (win32/Demos/service). All right, I put it in a file called nativePipeTestService.py, in that directory, and tried it. Here's what

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-12 Thread Bill Janssen
Bill Janssen jans...@parc.com wrote: $ python nativePipeTestService.py start Starting service PyNativePipeTestService [] Error starting service: The service did not respond to the start or control request in a timely fashion. $ I rebooted and tried again, same result. Then I tried setting

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-12 Thread Bill Janssen
Mark Hammond skippy.hamm...@gmail.com wrote: Execute 'python nativePipeTestService.py install' to install it, then start it as normal (ie, don't run it manually with no args). Yes, that's what I tried first. See my message 67901.1273677...@parc.com, just previous to the one you replied to. $

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2010-05-14 Thread Bill Janssen
Mark Hammond skippy.hamm...@gmail.com wrote: On 13/05/2010 9:25 AM, Bill Janssen wrote: Mark Hammondskippy.hamm...@gmail.com wrote: Execute 'python nativePipeTestService.py install' to install it, then start it as normal (ie, don't run it manually with no args). Yes, that's what I

[python-win32] does pipes.quote() work properly on Windows?

2010-05-21 Thread Bill Janssen
Anyone know if the quote() function in the pipes module does the right thing for cmd.exe pipes? If not, what is the right thing? Bill ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] does pipes.quote() work properly on Windows?

2010-05-21 Thread Bill Janssen
Tim Roberts t...@probo.com wrote: Bill Janssen wrote: Anyone know if the quote() function in the pipes module does the right thing for cmd.exe pipes? No, it doesn't. It uses sh rules, which aren't the same. If not, what is the right thing? Unfortunately, command line parsing

Re: [python-win32] does pipes.quote() work properly on Windows?

2010-05-24 Thread Bill Janssen
Tim Roberts t...@probo.com wrote: Bill Janssen wrote: I'm actually not passing file names. I'm passing argument strings, which may contain spaces, quotes, and other things. For instance, myprogram --title=That's the game! says Mike Hammer Brotsky --file=... myprogram

[python-win32] granting SeServiceLogonRight on a network account with pywin32?

2010-10-14 Thread Bill Janssen
I've got an MSI installer for installing my UpLib server. I use the following bit of code in a custom action to grant the user the right to log on as a service, so that the service can run under their user-id: import win32api, win32security username =

Re: [python-win32] granting SeServiceLogonRight on a network account with pywin32?

2010-10-14 Thread Bill Janssen
Tim Roberts t...@probo.com wrote: Bill Janssen wrote: I've got an MSI installer for installing my UpLib server. I use the following bit of code in a custom action to grant the user the right to log on as a service, so that the service can run under their user-id: import win32api

Re: [python-win32] crash on Windows Server 2008

2010-10-15 Thread Bill Janssen
Tim Roberts t...@probo.com wrote: Bill Janssen wrote: I'm trying to run a Python service on Windows Server 2008. It does start up, but then faults out, leaving this message in the event viewer: Log Name: Application Source:Application Error Date: 10/15/2010 2

[python-win32] Can't see Python27.dll on Win 7

2010-11-23 Thread Bill Janssen
Hi. I'm trying to install PyLucene using MinGW on Windows 7. It keeps failing when it tries to load the _jcc.pyd module (JCC is the compiler which wraps the Java Lucene library as a Python module). It fails with the notorious c:\Python27\python.exe: DLL load failed: The specified module could

Re: [python-win32] Can't see Python27.dll on Win 7

2010-11-23 Thread Bill Janssen
Tim Roberts t...@probo.com wrote: Bill wrote: So I went to look in c:/Windows/System32/, and sure enough, there it is: $ file /c/Windows/System32/python27.dll /c/Windows/System32/python27.dll: PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit $ On 64-bit Windows, 32-bit

Re: [python-win32] Can't see Python27.dll on Win 7

2010-11-23 Thread Bill Janssen
Tim Roberts t...@probo.com wrote: Bill Janssen wrote: So, if I cd to /c/Windows/System32, and do ls -l python27.dll, it's really looking at /c/Windows/SysWOW64 instead? That's why I see it with msys's ls and file, but not with cmd.exe and dir, or depends.exe? Yes, although depends

Re: [python-win32] Can't see Python27.dll on Win 7

2010-11-29 Thread Bill Janssen
Tim Roberts t...@probo.com wrote: Here's another option. It is not well known that the newer versions of depends have a trace mode. You can launch an executable from inside depends, and it will trace all of the DLL loads and unloads. That might tell you something. Oh, very cool! Thanks

Re: [python-win32] building a complicated Python application on Windows

2015-12-16 Thread Bill Janssen
load > the package into your own channel, such that a plain 'conda install -c > janssen foobar' will install your package and all the deps (which were > specified in the recipe/meta.yaml). > > Sent from my iPhone > > > On Dec 16, 2015, at 13:00, Bill Janssen <jans...@pa

Re: [python-win32] building a complicated Python application on Windows

2015-12-18 Thread Bill Janssen
Sent from my iPhone > > > On Dec 16, 2015, at 13:00, Bill Janssen <jans...@parc.com> wrote: > > > > I'd like to build a Python-based deliverable for Windows. It includes > > many gnarly packages, like numpy, scipy, statsmodel, ggplot, kivy, ZODB, > > ZEO, e