[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 inst

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

2010-04-02 Thread Bill Janssen
Preston Landers 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 enable all > feat

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

2010-04-05 Thread Bill Janssen
Mark Hammond 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. > > > > M

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

2010-04-06 Thread Bill Janssen
Mark Hammond 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" &g

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

2010-04-07 Thread Bill Janssen
Bill Janssen wrote: > Mark Hammond 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 i

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

2010-04-07 Thread Bill Janssen
Bill Janssen 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:

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

2010-04-07 Thread Bill Janssen
Mark Hammond 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 "", line 1, in >

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

2010-04-08 Thread Bill Janssen
Mark Hammond 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 Python in a priv

[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 runSubPro

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

2010-04-15 Thread Bill Janssen
Preston Landers 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 types.String

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

2010-04-19 Thread Bill Janssen
Bill Janssen wrote: > Mark Hammond 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 &

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

2010-04-20 Thread Bill Janssen
rt win32api Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. >>> $ Here's what the assembly

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

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

[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-

[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 py

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

2010-05-04 Thread Bill Janssen
Roger Upole 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

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

2010-05-04 Thread Bill Janssen
Thomas Heller 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 > <_Fu

[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: con

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

2010-05-09 Thread Bill Janssen
Bill Janssen 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: impor

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

2010-05-09 Thread Bill Janssen
A few weeks ago, Mark mentioned that there's now a way to run a Windows service without pythonservice.exe. I'd like to hear more about that. Right now, I'm stuck with my UpLib system on Windows. I'd like to be able to install everything in the UpLib directory, including a private copy of Python

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

2010-05-10 Thread Bill Janssen
Mark Hammond 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 generating a python scri

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 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 to be a standalone imp

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 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 I get: $ pwd -W c:/UpLi

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

2010-05-12 Thread Bill Janssen
Bill Janssen 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 tri

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

2010-05-12 Thread Bill Janssen
Mark Hammond 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. $ sc start PyNativePip

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

2010-05-14 Thread Bill Janssen
Mark Hammond wrote: > On 13/05/2010 9:25 AM, Bill Janssen wrote: > > Mark Hammond wrote: > > > >> Execute 'python nativePipeTestService.py install' to install it, then > >> start it as normal (ie, don't run it manually with no args). > &g

[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 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, w

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

2010-05-23 Thread Bill Janssen
Waldemar Osuch wrote: > On Fri, May 21, 2010 at 15:03, Bill Janssen wrote: > > 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? > > > twisted.python.win3

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

2010-05-24 Thread Bill Janssen
Tim Roberts 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 "

[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 = win32api.GetUserNameEx(win32api.Na

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

2010-10-14 Thread Bill Janssen
Tim Roberts 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

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

2010-10-14 Thread Bill Janssen
Tim Roberts 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

Re: [python-win32] Avoid bare except

2010-10-15 Thread Bill Janssen
Aahz wrote: > On Thu, Oct 14, 2010, Bill Janssen wrote: > > > > try: > > import win32api, win32security > > > > username = win32api.GetUserNameEx(win32api.NameSamCompatible) > > print 'granting "logon as a serv

[python-win32] crash on Windows Server 2008

2010-10-15 Thread Bill Janssen
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:59:41 PM Event ID: 1000 Task Category: (100) Level: Erro

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

2010-10-15 Thread Bill Janssen
Tim Roberts 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

[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 n

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

2010-11-23 Thread Bill Janssen
Tim Roberts 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-bi

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

2010-11-23 Thread Bill Janssen
Tim Roberts 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&#x

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

2010-11-29 Thread Bill Janssen
Tim Roberts 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 so much

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

2015-12-16 Thread Bill Janssen
I'd like to build a Python-based deliverable for Windows. It includes many gnarly packages, like numpy, scipy, statsmodel, ggplot, kivy, ZODB, ZEO, etc. They include Cython modules (and scipy may even require Fortran, for all I know). On OS X, I build this all from source by starting with Kivy,

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

2015-12-16 Thread Bill Janssen
> 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 wrote:

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

2015-12-18 Thread Bill Janssen
he recipe/meta.yaml). > > Sent from my iPhone > > > On Dec 16, 2015, at 13:00, Bill Janssen wrote: > > > > I'd like to build a Python-based deliverable for Windows. It includes > > many gnarly packages, like numpy, scipy, statsmodel, ggplot, kivy, ZODB, >

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

2015-12-18 Thread Bill Janssen
full VS > installations so I'm not sure how your mileage will fair with the > community/free editions. You could sign up for an AppVeyor or Anaconda > account if procuring VS proves problematic. > > Trent. > > -Original Message- > From: Bill Janss