Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params"

2012-12-11 Thread Mark Hammond
On 12/12/2012 2:48 AM, bitbucket wrote: On Monday, December 10, 2012 8:16:43 PM UTC-5, Mark Hammond wrote: "out" params are best supported if the object supplied a typelib - then Python knows the params are out and does the right thing automagically. If out params are detected, the

Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params"

2012-12-10 Thread Mark Hammond
On 11/12/2012 8:39 AM, bitbucket wrote: On Monday, December 10, 2012 3:58:33 PM UTC-5, Terry Reedy wrote: I believe the easiest way to do that is to install the pywin extensions http://sourceforge.net/projects/pywin32/?source=directory I assume it can handle out params. That definitely looks

Re: Why is pylaucher in Python 3.3 being installed in Windows folder?

2012-10-06 Thread Mark Hammond
On 5/10/2012 2:40 AM, Oscar Benjamin wrote: Having them on PATH means that you can do: > py script.py and the effect will be analogous to (in a unix shell): $ ./script.py Of course the idea with the launcher is that you just do > script.py Unless you want a specific version

Re: Legal: Introduction to Programming App

2012-08-19 Thread Mark Hammond
Your only concern from the Python world will (probably; IANAL) be around use of trademarks owned by the PSF - see http://www.python.org/psf/trademarks/ for more. Mark On 20/08/2012 12:13 PM, Matthew Zipf wrote: Good evening, I am considering developing an iOS application that would teach ave

Re: missing python-config and building python on Windows

2012-07-31 Thread Mark Hammond
On 1/08/2012 10:48 AM, Damon Register wrote: I am attempting to build gtk and glade using mingw/msys. It seems that some of the packages require python. I installed 2.7.3 using the installer from python.org. That worked for some of the packages but now I am trying to do one that needs python-c

Re: exe made by py2exe do not run certain computer

2012-07-03 Thread Mark Hammond
On 4/07/2012 9:46 AM, Miki Tebeka wrote: It works fine on my computer and some other computer don't have python interpreter(it's Windows 7). But the same file also do not work on another computer(it's Windows xp) why does it happen? My *guess* is that you're missing some DLLs (probably some Visu

Re: changes made to my python coded com servers are not taking effect

2012-07-01 Thread Mark Hammond
On 1/07/2012 7:13 PM, Panceisto wrote: I assume the old code keeps running in some process somewhere. How to fix this? The client of your server still has a reference to the old server. The simplest solution is to restart those clients. Mark -- http://mail.python.org/mailman/listinfo/pytho

Re: bdist_wininst [was: Custom build of Python]

2012-06-21 Thread Mark Hammond
On 22/06/2012 3:10 AM, KACVINSKY Tom wrote: I found what I was looking for: python setup.py bdist_wininst bdist_wininst is for creating installers for Python packages which install into an existing Python directory structure. It isn't used to create a installer for Python itself (which

Re: Embedding Python27 in C++ on Windows: CRT compatibility issues with VS2010?

2012-05-24 Thread Mark Hammond
On 25/05/2012 2:10 AM, Stephen Lin wrote: Hello, I'm a relative python newbie but I've been tasked to figure out how to embed calls to a python library in an Excel XLL add-in. The Python/C API for doing this seems pretty straightforward, but I seem to have read somewhere online that it's import

Re: Compiling debug Python 2.7 on Windows

2012-05-22 Thread Mark Hammond
On 23/05/2012 2:42 AM, Иван Громов wrote: Hi, I'm trying to compile a debug version of Python 2.7 on Windows, but I've encountered some problems while creating a distribution.\ When I run PCbuild\python.exe setup.py bdist_wininst I get an error error: pyconfig.h: No such file or directory As far

Re: Right way to initialize python embedded in a multi-threaded application

2012-05-17 Thread Mark Hammond
On 17/05/2012 10:08 PM, shooshx wrote: I'm embedding python in a multi-threaded C application. I've taken care to wrap every call to the Python C API with gstate = PyGILState_Ensure(); // call python code PyGILState_Release(gstate); But I'm stumped with what to do in the initialization. Right a

Re: Generating custom Windows installers

2012-04-06 Thread Mark Hammond
r On Thu, Apr 5, 2012 at 8:42 PM, Mark Hammond mailto:skippy.hamm...@gmail.com>> wrote: Seeing you are relying on win32com, you might as well add the links directly rather than via the intermediate WScript.shell object. Look in win32comext\shell\demos\__create_link.py for

Re: Generating custom Windows installers

2012-04-05 Thread Mark Hammond
Seeing you are relying on win32com, you might as well add the links directly rather than via the intermediate WScript.shell object. Look in win32comext\shell\demos\create_link.py for an example of how to create shortcuts directly. HTH, Mark On 6/04/2012 5:23 AM, cesar.covarrub...@gmail.com

Re: OAuth 2.0 implementation

2012-03-28 Thread Mark Hammond
On 28/03/2012 1:18 AM, Roy Smith wrote: In article <7909491.0.1332826232743.JavaMail.geo-discussion-forums@pbim5>, Demian Brecht wrote: OAuth 2.0 is still in draft status (draft 25 is the current one I believe) and yes, unfortunately every single server available at this point have varying d

Re: Python 3.2 and MS Outlook

2012-03-07 Thread Mark Hammond
On Thursday, 8 March 2012 1:52:48 AM, Greg Lindstrom wrote: Is there documentation showing how to read from a Microsoft Outlook server using Python 3.2. I've done it with 2.x, but can't find anything to help me with 3.2. What problems are you having in 3.2? It should be exactly the same - e

Re: check if directory is writable in a portable way

2012-02-28 Thread Mark Hammond
On 28/02/2012 9:07 PM, Andrea Crotti wrote: How should I check if I can create files in a directory? By trying to create them there :) Presumably you want to know that so you can write something "real" - so just write that something real. The problem gets quite hard when you consider things

Re: asynchronous downloading

2012-02-23 Thread Mark Hammond
On 23/02/2012 5:58 PM, Plumo wrote: I want to download content asynchronously. This would be straightforward to do threaded or across processes, but difficult asynchronously so people seem to rely on external libraries (twisted / gevent / eventlet). Exactly - the fact it's difficult is why thos

Re: PythonWin debugger holds onto global logging objects too long

2012-02-07 Thread Mark Hammond
On 7/02/2012 9:48 PM, Jean-Michel Pichavant wrote: Vinay Sajip wrote: On Jan 24, 2:52 pm, Rob Richardson wrote: I use PythonWin to debug the Python scripts we write. Our scripts often use the log2pyloggingpackage. When running the scripts inside the debugger, we seem to get oneloggingobject fo

Re: Help with COM_error

2012-02-06 Thread Mark Hammond
Unfortunately this just means that Word threw an error and it's not giving many details about what that might be. Are you sure out_TOC is valid on the other computer? eg, http://stackoverflow.com/questions/3730428/why-cant-i-save-as-an-excel-file-from-my-python-code indicates Office fails in

Re: Registry entries set up by the Windows installer

2012-02-01 Thread Mark Hammond
On 2/02/2012 2:09 AM, Paul Moore wrote: I'm trying to get information on what registry entries are set up by the Python Windows installer, and what variations exist. I don't know enough about MSI to easily read the source, so I'm hoping someone who knows can help :-) As far as I can see on my PC

Re: unittest and threading

2012-01-25 Thread Mark Hammond
Let me have a guess :) On 25/01/2012 7:42 PM, Ross Boylan wrote: On Tue, 2012-01-24 at 13:54 -0800, Ross Boylan wrote: ... The code I want to test uses threads, but that is not entirely internal from the standpoint of the unit test framework. The unit test will be executing in one thread, but

Re: thread example question

2012-01-17 Thread Mark Hammond
On 18/01/2012 4:22 PM, Rodrick Brown wrote: import _thread as thread import time class thread_counter(object): def __init__(self, thr_cnt, sleep_int): self.thr_cnt = thr_cnt self.sleep_int = sleep_int def counter(myId, count): for i in range(count): time.sle

Re: Losing com pointer

2011-12-07 Thread Mark Hammond
On 7/12/2011 7:22 PM, Matteo Boscolo wrote: Hi all, I need some help to a com problem.. I got this class: class foo(object): def setComObject(comObject): self.comO=comObject #This is a com object from a cad application def showForm(self) # use the self.comO to read some information from the ca

Re: pythoncom on Windows Server 2008

2011-11-29 Thread Mark Hammond
On 30/11/2011 11:12 AM, Nairn, Bruce wrote: Hi, I’m trying to move some code to a Windows Server 2008 machine. It runs on Windows 7 and XP, but fails on Windows Server 2008. The python installation is seemingly identical (python 2.6.4, 32 bit). The following replicates the problem: import pytho

Re: Need Windows user / developer to help with Pynguin

2011-10-30 Thread Mark Hammond
On 30/10/2011 1:43 AM, Lee Harr wrote: For Windows users who want to just run Pyguin (not modify or tinker with the source code), it would be best to bundle Pynguin up with Py2exe I considered that, but I agree that licensing issues would make it problematic. What licensing issues concern you

Re: logging: warn() methods and function to be deprecated.

2011-10-23 Thread Mark Hammond
On 22/10/2011 11:09 PM, Vinay Sajip wrote: In response to an issue (#13235) raised on the Python bug tracker, I'm going to deprecate the warn() methods in the Logger and LoggerAdapter classes in the stdlib logging package, as well the module-level warn() function. The warn() variants were synony

Re: need python+windows edit control help

2011-10-21 Thread Mark Hammond
On 22/10/2011 10:30 AM, Eric S. Johansson wrote: I'm back with yet another attempt at adding accessibility features using Python and NaturallySpeaking. I've simplified the concepts again and I really need some help from someone who knows Microsoft Windows and Python. My goal is developing a templ

Re: Implementing Python-OAuth2

2011-10-11 Thread Mark Hammond
On 11/10/2011 7:16 PM, Kayode Odeyemi wrote: On Thu, Oct 6, 2011 at 5:15 PM, Jeff Gaynor mailto:jgay...@ncsa.illinois.edu>> wrote: On 10/06/2011 08:34 AM, Kayode Odeyemi wrote: Hello friends, I'm working on a pretty large application that I will like to use oauth2 o

Re: pyWin build 216

2011-09-23 Thread Mark Hammond
ction change for the windows extensions? Is it time I make the move to 3.x? Mark Hammond has given much to the Python community and I do not intend for this post to be negative in any way. No problem. There have been no updates as there is very little to update (ie, the code hasn't change

Re: PyEval_EvalCodeEx return value

2011-09-22 Thread Mark Hammond
On 20/09/2011 8:34 PM, Mateusz Loskot wrote: Hi, I'm trying to dig out details about what exactly is the return value the of PyEval_EvalCodeEx function in Python 3.x The documentation is sparse, unfortunately. Perhaps I'm looking at wrong function. My aim is simple, I need to execute Python cod

Re: import os or import os.path

2011-09-06 Thread Mark Hammond
On 7/09/2011 7:47 AM, Ian Kelly wrote: On Tue, Sep 6, 2011 at 3:25 PM, Jabba Laci wrote: Hi, If I want to use the 'os.path' module, it's enought to import 'os': import os if os.path.isfile('/usr/bin/bash'): print 'got it' In other source codes I noticed that people write 'import os.path'

Re: Dynamically linking python into my vc project - help required

2011-08-05 Thread Mark Hammond
On 3/08/2011 6:58 PM, mrinal...@edss.co.in wrote: Hi, I am trying to embed python into my MFC application. I have done this before by statically linking to the python lib. But I want to change this now. The idea is to take the information from the registry for the installed version of python on

Re: Python 2.7.2 for Windows reports version as 2.7.0?

2011-06-18 Thread Mark Hammond
On 18/06/2011 1:36 PM, pyt...@bdurham.com wrote: Hi Benjamin, The file info is seems correct but I just checked the MSI and it's reporting that it's 2.7.2. How exactly are you running python.exe and IDLE- are you calling the full path, just calling "python" and using whichever python version i

Re: Multiple windows services on the same machine

2011-06-06 Thread Mark Hammond
On 6/06/2011 2:54 AM, Massi wrote: Hi everyone, I'm writing a script which implement a windows service with the win32serviceutil module. The service works perfectly, but now I would need to install several instances of the same service on my machine for testing purpose. This is hard since the ser

Re: Distutils beginner question - windows

2011-06-05 Thread Mark Hammond
On 3/06/2011 6:57 PM, Seb S wrote: Hi all, Just a quick question , I have a simple script I want to convert into a windows installer and give to some friends. I had a look at http://docs.python.org/distutils/introduction.html and wrote this setup script: #!/usr/bin/env python from distuti

Re: bdist_wininst: install_script not run on uninstall

2011-05-27 Thread Mark Hammond
On 26/05/2011 6:00 PM, Wilbert Berendsen wrote: Op donderdag 26 mei 2011 schreef Mark: Wilbert wrote: can anybody find out why the install script is not run? Works for me in the pywin32 install script - maybe you should make the smallest possible example that doesn't work and post the entir

Re: bdist_wininst: install_script not run on uninstall

2011-05-25 Thread Mark Hammond
On 26/05/2011 5:28 AM, Wilbert Berendsen wrote: Hi, according to the docs the installer bdist_wininst creates will run the install-script on install with -install (which works perfectly) and on uninstall with the -remove argument (which seemingly never happens). However I want to cleanup some r

Re: What other languages use the same data model as Python?

2011-05-04 Thread Mark Hammond
On 5/05/2011 11:11 AM, harrismh777 wrote: The "pass by value" and "pass by reference" parameter passing mechanisms are pretty well defined, and C uses "pass by value". Yeah, that's kind-a funny, cause I'm one of the guys (old farts) that helped define them Cool - please tell us more abo

Re: multiple Python 2.7 Windows installations

2011-04-19 Thread Mark Hammond
On 20/04/2011 12:40 AM, Eric Frederich wrote: Hello, I am trying to get an installer built with distutils to recognize multiple installations. The installer currently finds my installation at C:\Python27 I have a custom Python27 built myself with Visual Studio sitting somewhere else, say C:\MyPy

Re: embedding interactive python interpreter

2011-03-28 Thread Mark Hammond
On 28/03/2011 2:06 PM, Eric Frederich wrote: I'm not sure that I know how to run this function in such a way that it gives me an interactive session. I passed in stdin as the first parameter and NULL as the second and I'd get seg faults when running exit() or even imnport sys. I don't want to pa

Re: embedding interactive python interpreter

2011-03-27 Thread Mark Hammond
On 28/03/2011 5:28 AM, Eric Frederich wrote: I'm not talking about the documentation for sys.exit() I'm talking about the documentation for Py_Main(int argc, char **argv) http://docs.python.org/c-api/veryhigh.html?highlight=py_main#Py_Main This C function never returns anything whether in the i

Re: embedding interactive python interpreter

2011-03-27 Thread Mark Hammond
On 26/03/2011 4:37 AM, Eric Frederich wrote: So I found that if I type ctrl-d then the other lines will print. I think ctrl-d just causes sys.stdin to see EOF, so things just "fall out" as you desire. exit() will winf up causing the C exit() function after finalizing, hence the behaviour

Re: win32 design pattern: COM localserver?

2010-12-09 Thread Mark Hammond
If you are implementing a COM object using win32com, then Python will never be unloaded from the host process, which works in your favour. Just have the COM object use a thread and a queue for this processing. The 'report' method would just stick the params and filenames in the queue and return

Re: Can't find pythonwin

2010-10-10 Thread Mark Hammond
On 11/10/2010 11:24 AM, HP Garcia wrote: I am working on a class project that requires us to use python. I have never used python before so be gentle. My question is I have python 2.5 installed on my pc. The instructions as me to run pythonwin but I can't find pythonwin. What I did find is IDLE(G

Re: 32 bit bdist_wininst vs x64 platform

2010-09-10 Thread Mark Hammond
Hi Robin, On 9/09/2010 9:28 PM, Robin Becker wrote: A reportlab user is using 32 bit python on x64 win 2003. he has a problem installing our bdist_wininst exe because the installer cannot find python. That should work fine - lots of pywin32 users do exactly that. Apparently the installer is

Re: Help needed with Windows Service in Python

2010-09-02 Thread Mark Hammond
On 3/09/2010 1:22 AM, Ian Hobson wrote: Hi All, I am attempting to create a Windows Service in Python. I have the framework (from Mark Hammond and Andy Robinason's book) running - see below. It starts fine - but it will not stop. :( net stop "Python Service" and using the se

Re: Newbie: Win32 COM problem

2010-08-25 Thread Mark Hammond
On 25/08/2010 10:33 PM, Paul Hemans wrote: File "C:\development\PyXLS\pyXLS.py", line 13, in createSheet def createBook(self): AttributeError: WrapXLS instance has no attribute '_book' pythoncom error: Python error invoking COM method. Can anyone help? That line seems an unlikely sourc

Re: pre-uninstall script in bdist_wininst

2010-08-05 Thread Mark Hammond
On 6/08/2010 4:26 AM, Nils wrote: Hi. I am using a postinstall-script like this: setup( ... scripts=['scripts\install.py'], options = { ... "bdist_wininst" : { "install_script" : "install.py", ... }, } ) According to the do

Re: Print file via file association using os.system or subprocess? (Windows)

2010-07-18 Thread Mark Hammond
On 19/07/2010 3:46 AM, pyt...@bdurham.com wrote: Under Windows: Is there a way to print a file using the file's file extension association using either the os.system or subprocess modules (vs. win32 extensions)? Use case: print PDF or Office documents to default printer without having to distribu

Re: Windows debugging symbols for python 2.5.4 and pywin32 214

2010-04-22 Thread Mark Hammond
On 22/04/2010 7:23 AM, Alexandre Fayolle wrote: Hi everyone, I have a production server running a Windows Service written in Python, which uses python 2.5.4 (yes I know it is old, but I am somewhat stuck with this for now) and pywin32 214. Given a set of manipulations, I get a stack overflow in

Re: user rights and python com servers

2010-04-15 Thread Mark Hammond
On 16/04/2010 2:40 PM, sniffer wrote: Thanks Mark, just one question does the explanation given above by you also apply to winxp systems in a domain, Yeah - IIRC, domain users can't change much of the registry by default, primarily as they aren't in the 'administrators' or 'power user' group

Re: python wia and RegisterEvent

2010-04-15 Thread Mark Hammond
On 16/04/2010 7:15 AM, gelonida wrote: Hi, I'd like to register an event in order to be informed, whenever a Windows WIA device is connected or disconnected. In python I can use WIA devices, but I don't know how to register events I have existing C# code, which works and looks like. class

Re: py2exe saga continues...

2010-04-15 Thread Mark Hammond
On 16/04/2010 10:52 AM, Alex Hall wrote: 1. Is there a way to start with no command line window popping up? My main script is a pyw, but it still shows a dos window when the generated .exe file is clicked. Leaving out the "console" parameter of setup, though, results in no .exe file at all, so I

Re: user rights and python com servers

2010-04-15 Thread Mark Hammond
On 15/04/2010 6:05 PM, sniffer wrote: hi all, i am facing a peculiar problem with a python com server i've developed the com server runs fine in winxp standalone systems but if the system is part of a domain then until the logged in user is given power user rights i am unable to register the dll

Re: How to add a library path to pythonpath ?

2010-03-16 Thread Mark Hammond
On 17/03/2010 1:26 AM, Barak, Ron wrote: Thanks for the suggestion Pable. However, I really need the $PYTHONPATH to include this additional library, so all Python scripts could use it. In Windows I have defined PYTHONPATH as c:\views\cc_view\TS_svm_ts_tool\SVMInspector\lib\, and also in the Windo

Re: Saving the Interactive Window with PythonWin

2010-02-21 Thread Mark Hammond
On 22/02/2010 4:28 AM, vsoler wrote: Hi everyone, When I run a python script, I know that I can print the results of my calculations on the Interactive Window. Once the scripts ends, I can copy/pate these results on an OpenOffice Writer document. However, I would like to know if I can somehow a

Re: Trouble running pywin32-214.win-amd64-py3.1 on 64-bit Windows 7

2010-02-19 Thread Mark Hammond
On 20/02/2010 5:35 AM, Steven Cohen wrote: Hello, I downloaded pywin32-214.win-amd64-py3.1, and it installs just fine (except that it prints a traceback when it tells me the postinstall script completed), but then when I try to execute Pythonwin.exe, I get the following error popup: The applica

Re: strange issue with C extension using Py_BuildValue

2010-02-10 Thread Mark Hammond
On 11/02/2010 9:19 AM, bobicanprogram wrote: I'm am having "strange" problems with the code snip below. When this code is built on a 64bit Linux, it would appear to work flawlessly.When the source is rebuilt on a 32bit Linux it begins to crack in strange ways. The issue seems to be associ

Re: counting lines of code

2010-01-20 Thread Mark Hammond
On 21/01/2010 5:51 PM, Michele Simionato wrote: I need a small utility to count the lines of Python code in a directory, traversing subdirectories and ignoring comments and docstrings. I am sure there is already something doing that, what do you suggest? I suggest typing your subject line into

Re: subprocess.Popen and ordering writes to stdout and stderr

2009-12-17 Thread Mark Hammond
On 18/12/2009 9:33 AM, Chris Withers wrote: exar...@twistedmatrix.com wrote: libc is probably giving you line buffering when you use os.system (because the child process inherits the parent's stdio, and the parent's stdio is probably a pty, and that's the policy libc implements). Interesting

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-17 Thread Mark Hammond
On 18/12/2009 7:44 AM, Ross Ridge wrote: The "P" DLL is for C++ and so the original poster may not actually need it. I'm pretty sure Python itself doesn't need it, and py2exe shouldn't either, but wxPython, or more precisely wxWidgets, almost certainly does. So in your case you'll probably need

Re: reading windows event logs

2009-11-25 Thread Mark Hammond
On 26/11/2009 7:22 AM, EW wrote: Hi All, I'm looking for some guidance on a better way to read eventlogs from windows servers. I've written a handy little app that relies on WMI to pull the logs an in all my testing it worked great. When I deployed it, however, WMI choked on servers with

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Mark Hammond
On 18/11/2009 6:29 AM, Randall Walls wrote: I don't believe so, but it seems like I'm in a catch 22, where I need to _winreg.OpenKey the key first before I can pass it to _winreg.DisableReflectionKey, but it doesn't exist, so I can't open it. I did find out that I can open the key using: hKey =

Re: Bug(s) in Python 3.1.1 Windows installation

2009-10-28 Thread Mark Hammond
On 29/10/2009 11:06 AM, Alf P. Steinbach wrote: So I suggest switching to some other more light-weight installer technology. Thanks for the suggestion, but I expect we will stick with MSI even with its shortcomings. Using MSI files has significant other advantages, particularly in "managed"

Re: where is ctrl+newline handled in pywin editor?

2009-09-23 Thread Mark Hammond
On 24/09/2009 10:25 AM, C or L Smith wrote: {Sorry about the no-wrap in the first post...} I use the pywin environment on Windows for python code editing and interactive environment. I've been able to find the place in the editor files where the enter key is handled and where the whitespa

Re: Class variable inheritance

2009-09-08 Thread Mark Hammond
On 9/09/2009 1:51 PM, HPJ wrote: Conceptually, Python checks for the presence of B.foo, and if it's not there it checks for foo's presence in the base classes. Yes, I have no problem believing you guys that this is what Python does. Still, my question remains about where in the Language Referen

Re: Distutils - can user designate install directory for windows installer?

2009-09-08 Thread Mark Hammond
On 9/09/2009 1:57 AM, Timothy W. Grove wrote: I have successfully built a windows installer for my python program using distutils, (python setup.py bdist_wininst), but is there a way to do it that will allow a user ('user' == 'boss', in this case!) to designate the installation directory, rather

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Mark Hammond
On 8/09/2009 9:16 AM, Grant Edwards wrote: On 2009-09-07, Mark Hammond wrote: CPython's GIL means that multithreading on multiple processors/cores has limitations. Each interpreter has its own GIL, so processor-intensive applications work better using the multiprocessing module than wit

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Mark Hammond
On 7/09/2009 10:50 PM, MRAB wrote: sturlamolden wrote: On 7 Sep, 13:53, ganesh wrote: I need to use these to get the proper concurrency in my multi-threaded application without any synchronization mechanisms. Why will multiple interpreters give you better concurrency? You can have more than

Re: [Python-Dev] Mercurial migration: help needed

2009-08-18 Thread Mark Hammond
nt item here is currently the win32text stuff. Mark Hammond said he would work on this; Mark, when do you have time for this? Then I could set apart some time for it as well. I can make time, somewhat spasmodically, starting fairly soon. Might I suggest that as a first task I can resurrect my old stale

Re: Windows 7 : any problems installing or running Python ?

2009-08-11 Thread Mark Hammond
On 9/08/2009 10:42 PM, Tim Roberts wrote: Dave WB3DWE wrote: Anybody tried it ? Is anything broken, ie is the whole shootin' match good to go ? I'm esp interested in WConio for 3.0/3.1 which I use heavily. I've been running the 32-bit builds of Python 2.5, PyWin32, and wxPython on Windows 7 6

Re: Managing a multiple threaded service

2009-06-16 Thread Mark Hammond
On 17/06/2009 4:23 PM, Paul Hemans wrote: Hi, New to Python I've got 2 threads 1 is the SimpleHTTPRequestHandler, the other polls a site for data. I want to run the program as a windows service. My questions are: Should both of them run as threads and then just have an infinite loop with a s

Re: Fwd: Re: Unable to install Pywin32 for Python 2.6.2

2009-05-13 Thread Mark Hammond
On 13/05/2009 2:18 PM, David Lyon wrote: On Wed, 13 May 2009 05:32:16 +0200, "Martin v. Löwis" wrote: I think this was a case of obscure misconfiguration of the system. It is always possible to configure a system in such a way that even the most resilient installation procedure will break. Te

Re: Fwd: Re: Unable to install Pywin32 for Python 2.6.2

2009-05-11 Thread Mark Hammond
Probably some import statement is finding a .pyd module built against Python 2.5 instead of Python 2.6; it might be that PYTHONPATH points somewhere wrong, or the registry for Python 2.6 is setup wrong, or something else entirely... Cheers, Mark On 12/05/2009 3:13 PM, David Lyon wrote: Hi,

Re: Installing Python 2.5.4 from Source under Windows

2009-04-30 Thread Mark Hammond
Paul Franz wrote: Mark, The problem is that the steps are not in the readme.txt for the building Python for Windows. The python.exe might work from the Win32Release directory where it is compiled. You should find the executables and DLLs directly in the PCBuild directory (for an x86 buil

Re: Installing Python 2.5.4 from Source under Windows

2009-04-29 Thread Mark Hammond
Paul Franz wrote: I have looked and looked and looked. But I can not find any directions on how to install the version of Python build using Microsoft's compiler. It builds. I get the dlls and the exe's. But there is no documentation that says how to install what has been built. I have read e

Re: pythoncom -- ImportError: DLL load failed - Solved, sort of.

2009-04-24 Thread Mark Hammond
Richard Whidden wrote: I installed a clean copy of Python 2.5, pywin32 and PyGreSQL and it works. I'll have to figure out what broke with my 2.6 install. Make sure you have 2.6.2 Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows Shell Extensions - Out of Proc

2009-04-24 Thread Mark Hammond
Thomas Heller wrote: Ralf schrieb: I think that for whatever reasons, explorer always tries to create shell extensions as InProc. CoCreateInstance, which is the usual API to create COM instances, allows to specify which one you want. Thomas So there is no way to do this, other than to create

Re: Would you support adding UNC support to os.path on Windows?

2009-04-22 Thread Mark Hammond
Aahz wrote: In article , Larry Hastings wrote: I've written a patch for Python 3.1 that changes os.path so it handles UNC paths on Windows. You can read about it at the Python bug tracker: http://bugs.python.org/issue5799 I'd like to gauge community interest in the patch. After all, it

Re: win32com python AttributeError!

2009-03-31 Thread Mark Hammond
My guess is that you have a hidden instance of excel running (ie, without a window). Check the task manager for instances of excel.exe and kill them. Cheers, Mark On 31/03/2009 3:17 PM, Michael wrote: Hi Python-list - Has anyone figured this out from Rebecca: Hi, I am having trouble with

Re: Unladen-Swallow: A faster python

2009-03-28 Thread Mark Hammond
On 28/03/2009 9:50 PM, andrew cooke wrote: Tim Roberts wrote: [...] IronPython has certainly shown that Python can be successfully implemented in a JIT compiled VM in a performant way, but it has issues running C extension modules. I'll be curious to see where this project goes. given the co

Re: please include python26_d.lib in the installer

2009-03-27 Thread Mark Hammond
Please note: I want to build my own code in Debug mode for debugging. I don't want to build or use the debug version of Python. I also can't Python does this on purpose so you don't accidentally mix different versions of the C runtime library. This would happen ff you defined DEBUG in your co

Re: py2exe - win32com - GetGeneratePath Error

2009-03-25 Thread Mark Hammond
On 26/03/2009 2:19 AM, Christopher Panici wrote: Has anyone solved the GetGeneratePath Error? I am getting this when I use win32com.client.DispatchWithEvents('iTunes.Application', customEventHandler). I have drilled down to the file and found it in that path. Does anyone have any ideas? HERE I

Re: Problem Python 2.6.1 vs 2.6 & pyWin32

2009-03-25 Thread Mark Hammond
On 25/03/2009 11:41 PM, John Machin wrote: This all sounds good. I presume that "this version of distutils" means the 2.6.2/3.1 version. Yep. In the meantime, until 2.6.2 final is released, is my suggestion of using Python 2.5 to build installers reasonable? Yep. Is there a better appro

Re: Problem Python 2.6.1 vs 2.6 & pyWin32

2009-03-25 Thread Mark Hammond
On 25/03/2009 11:06 AM, John Machin wrote: It would appear that the safest cover-most-bases option for a developer/packager of pure-Python packages (especially one intended to be runnable on older versions of Python, some as far back as 2.1) is to use Python 2.5 to make the bdist_wininst (the exe

Re: Safe to call Py_Initialize() frequently?

2009-03-23 Thread Mark Hammond
On 23/03/2009 12:14 PM, Graham Dumpleton wrote: On Mar 21, 10:27 am, Mark Hammond wrote: Calling Py_Initialize and Py_Finalize multiple times does leak (Python 3 has mechanisms so this need to always be true in the future, but it is true now for non-trivial apps. Mark, can you please clarify

Re: Safe to call Py_Initialize() frequently?

2009-03-20 Thread Mark Hammond
On 21/03/2009 4:20 AM, roschler wrote: I've created a Python server that embeds Python 2.5 and runs Python jobs. I want to be able to completely "flush" the interpreter between each job. That means resetting all variables, stopping all user created threads, and resetting the interpreter sys mod

Re: PyWin32 for Python 3.x

2009-03-15 Thread Mark Hammond
On 16/03/2009 6:05 AM, John Nagle wrote: Tim Golden wrote: John Nagle wrote: Any idea when PyWin32 will be available for Python 3.x? John Nagle Release 213 is out already: http://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063&release_id=661475 I think it's still con

Re: Eject a Removable USB drive

2009-03-10 Thread Mark Hammond
ython.org Subject: Re: Eject a Removable USB drive On Mar 9, 6:08 pm, Mark Hammond wrote: On 10/03/2009 8:20 AM, Rickey, Kyle W wrote: Thanks for the link! That code has got me on the right track. I've almost got it working with one small kink. After the code runs my drive still shows up on

Re: Mapping 64 bit int from C to Python-2.2

2009-03-10 Thread Mark Hammond
On 10/03/2009 2:51 AM, Explore_Imagination wrote: Hi I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have these four variables: unit32_t a,b,c; uint64_t w,x,y,z; I use

Re: Eject a Removable USB drive

2009-03-09 Thread Mark Hammond
On 10/03/2009 8:20 AM, Rickey, Kyle W wrote: Thanks for the link! That code has got me on the right track. I've almost got it working with one small kink. After the code runs my drive still shows up on Windows Explorer but as a removable drive. If I try to double click on it, it tells me to inse

Re: This application has failed to start because the application configuration is incorrect

2009-02-25 Thread Mark Hammond
On 26/02/2009 4:51 AM, Lorenzo wrote: PS: Mark, this could be added to a kind of "Deployment" entry in py2exe wiki, it would be useful. IIRC, I've never edited the py2exe wiki (despite appearances to the contrary sometimes, I don't formally maintain that package!). But that is the cool thin

Re: How does one get from "ImportError: DLL load failed:..." to a culprit .dll and symbol?

2009-02-23 Thread Mark Hammond
On 23/02/2009 11:41 PM, Chris Cormie wrote: If that not-very-technical description [all I've ever needed] doesn't help, you'll need to read the DW help file (HTFF1K) or wait till someone who knows what they are doing comes along :-) LOL, I am that person :p LOL sounds right! How do you ge

Re: This application has failed to start because the application configuration is incorrect

2009-02-17 Thread Mark Hammond
On 18/02/2009 5:49 AM, Sam Clark wrote: I am receiving the message "This application has failed to start because the application configuration is incorrect" when I attempt to run a compiled Python program on another machine. I have used py2exe on both a 2.6.1 and a 2.6.0 version of the .py and .p

Re: TTS in windows

2009-02-11 Thread Mark Hammond
On 12/02/2009 3:58 PM, Jonathan Chacón wrote: Hello, I need to use SAPI5 text to speech with python but I don't find anything that lets me manage speech, tone, volume, etc Does anybody know anything to do this? It appears this is doable from COM. With the pywin32 package: >>> import win32c

Re: Python binaries with VC++ 8.0?

2009-02-09 Thread Mark Hammond
On 9/02/2009 5:51 PM, Greg Ewing wrote: Is there anywhere I can download a set of Python binaries, of any version, that have been built with Visual C++ 8.0? IIRC, no. Python skipped that version of MSVC. I believe Python 2.5 builds easily with vc8 project files in svn though. I'm trying t

Re: WIn32api

2009-02-06 Thread Mark Hammond
On 7/02/2009 3:28 AM, K-Dawg wrote: You might like to seek out the python-win32 mailing list for stuff like this where more people tend to pay attention to windows problems. This works if I call run() specifically. But when I try to initiate the thread with .start() I get the following error

Re: Using multiprocessing from a Windows service

2009-02-06 Thread Mark Hammond
On 6/02/2009 4:21 PM, Volodymyr Orlenko wrote: In the patch I submitted, I simply check if the name of the supposed module ends with ".exe". It works fine for my case, but maybe this is too general. Is there a chance that a Python module would end in ".exe"? IIRC, py2exe may create executables

Re: Using multiprocessing from a Windows service

2009-02-05 Thread Mark Hammond
On 6/02/2009 2:50 PM, Mark Hammond wrote: On 6/02/2009 11:37 AM, Volodya wrote: Hi all, I think I've found a small bug with multiprocessing package on Windows. I'd actually argue its a bug in pythonservice.exe - it should set sys.argv[] to resemble a normal python process with arg

Re: Using multiprocessing from a Windows service

2009-02-05 Thread Mark Hammond
On 6/02/2009 11:37 AM, Volodya wrote: Hi all, I think I've found a small bug with multiprocessing package on Windows. I'd actually argue its a bug in pythonservice.exe - it should set sys.argv[] to resemble a normal python process with argv[0] being the script. I'll fix it... Cheers, Mar

  1   2   >