Re: How to decompile an exe file compiled by py2exe?

2005-09-26 Thread Chris Lambacher
On Sat, Sep 24, 2005 at 09:29:30PM +0800, Leo Jay wrote: > Thanks for all of your replies. > > but my problem is not how to decompile .pyo or .pyc files. Eventually that is what the problem will become. hjparser.exe is a python interpreter that runs a python module that it extracts from itself.

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-18 Thread Chris Lambacher
The shell that comes with MSys (from the MinGW guys). Is pretty good, although it does have a bit of a problem with stdout output before a process exits, ie it will hold back output until the process exits. As a bonus, the file system is a little more sane, and if you are interested in compiling s

Re: How do I pass args using Python Windows

2005-10-18 Thread Chris Lambacher
Have a main function that you pass the arguments into. This entry on Guido's blog should help you out: http://www.artima.com/forums/flat.jsp?forum=106&thread=4829 -Chris On Mon, Oct 17, 2005 at 09:02:10PM -0400, Ross Reyes wrote: >Hi - >I wonder if someone might be able to lend a quick

Re: Vim capable IDE?

2005-10-18 Thread Chris Lambacher
I would second that. I use Vim for editing. I find I don't need an IDE (not even for C/C++). Vim does everything I need. If I want a debugger I will use the shell debugger. Most other things can be added to Vim, though I tend to run with very few plugins. -Chris On Tue, Oct 18, 2005 at 05:1

Vim IS a capable IDE [was Re: Vim capable IDE?]

2005-10-18 Thread Chris Lambacher
ut following along with Greg Wilson's Software > Carpentry has made me realize that I could be more productive using the > additional, apparently now-standard tools of a good IDE. I just don't > want to sacrifice productivity in in keystrokes. It just seems like a > compromise pro

Re: python gc performance in large apps

2005-10-24 Thread Chris Lambacher
A couple of strategic gc.collect() calls can be useful. You can also tweak how the garbage collector gets run by changing settings in the gc module. -Chris On Fri, Oct 21, 2005 at 04:13:09PM -0400, Robby Dermody wrote: > > Hey guys (thus begins a book of a post :), > > I'm in the process of wri

Re: win32 process information, using win32 extension

2005-10-24 Thread Chris Lambacher
I started down the win32process path trying to solve the same problem. That only ended in misery for me. Try this recipie instead: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442477 -Chris On Fri, Oct 21, 2005 at 07:12:34AM -0700, Java and Swing wrote: > i need to get information ab

Re: Why doesn't this work? :)

2005-10-28 Thread Chris Lambacher
I think what you really want is: try: # this will fail and be caught # below, w import foobar except ImportError, error: class foobarclass: def __getattr__(*args, **kargs): return None foobar = foobarclass() print fo

Re: improving pypi / setuptools

2005-11-30 Thread Chris Lambacher
On Wed, Nov 30, 2005 at 11:49:14AM +0100, Fredrik Lundh wrote: > Alia Khouri wrote: > > > What ideas do people out there have for making the installation of > > python module more reliable? > > judging from the support load it's causing me these days, setuptools is a > piece of utter crap. if yo

Re: Using swig to use an existing dll/library

2005-06-19 Thread Chris Lambacher
You should be able to access regular dlls and handle callbacks with the ctypes module without needing to resort to any real c code: http://starship.python.net/crew/theller/ctypes/ -Chris On 18 Jun 2005 02:10:59 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi together, > > i have a Windo

Re: Detect windows shutdown

2005-06-22 Thread Chris Lambacher
There is an event that win32 sends to each thread to tell it to shut down. You can grab that with the win32all extension (I am not on windows right now so I can't look it up in the documentation). -Chris On 6/22/05, Konstantin Veretennicov <[EMAIL PROTECTED]> wrote: > On 6/22/05, Austin <[EMAIL

Re: Life of Python

2005-06-25 Thread Chris Lambacher
On the accessor function topic. Here is a good description of why you don't need accessors in python (among other things) written by the main PEAK(http://peak.telecommunity.com/) developer (Phillip J. Eby): http://dirtsimple.org/2004/12/python-is-not-java.html Some other useful articles in a simi

Re: Embedding python in C

2005-06-28 Thread Chris Lambacher
s may link with it. > > Regards, > > Philippe > > > > On Tuesday 28 June 2005 04:53 pm, Philippe C. Martin wrote: > > Sounds like it, thanks. > > > > Philippe > > > > On Tuesday 28 June 2005 09:10 pm, Chris Lambacher wrote: > > > Pyre

Re: Problem building Python bindings for subversion

2005-06-28 Thread Chris Lambacher
You will probably get more help with this on subversion mailing list. -Chris On 28 Jun 2005 12:59:24 -0700, Arthur Chereau <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to setup viewcvs to work with subversion 1.2.0 on Linux with > Python 2.4.1. The last viewcvs (from CVS) needs subversion pyt

Re: System Independent Wallpaper Changer

2005-07-05 Thread Chris Lambacher
you probably want if sys.platform == 'win32': instead of if os.name in ['nt', 'win98', 'me']: -Chris On 7/5/05, Terrance N. Phillip <[EMAIL PROTECTED]> wrote: > This is what I've got... the code should work on a typical Windows > system, I think... > >

Re: DNS access

2005-07-13 Thread Chris Lambacher
reverse dns lookup is not really special compared to a regular dns lookup. you just need to look up a special name: http://www.dnsstuff.com/info/revdns.htm to format the ip address properly use something like: def rev_dns_string(ip_str): nums = ip_str.split('.').reverse() nums.extend(('in-

Re: Changing size of Win2k/XP console?

2005-07-14 Thread Chris Lambacher
Referring to the documenation you will have to use that function and SetConsoleWindowInfo to get the effect you want. Basically SetConsoleScreenBufferSize sets the size for the console and SetConsoleWindowInfo sets the size for the window containing the console. The window size can't be bigger th

Re: How can I import a py script by its absolute path name?

2005-07-15 Thread Chris Lambacher
You probably actually want: import sys sys.path.instert(0, r'c:\xxx\yyy') m = __import__('zzz', globals(), locals(), []) del sys.path[0] Because if another module named zzz exists in your path. Appending will pick those versions up first. Then you delete the path you just added so that you don

win32ui CreatePrintDialog

2005-07-15 Thread Chris Lambacher
Hi, This question has come up a few times on the list with no one giving a public answer. How do you use CreatePrintDialog from win32ui? About a year ago someone posted that: dlg = win32ui.CreatePrintDialog(1538) dlg.DoModal() will give you the window, but the ok button does not work. Diging i

Re: Python vs. Access VBA

2005-07-17 Thread Chris Lambacher
If you are going to go with Python, don't include Access in the mix at all. If you want a small light-weight, serverless database back-end, you would be better to go with SQLite. Its cross platform and well proven. I think Firebird will give you that too, though I have never used it. Most peop

Re: win32ui CreatePrintDialog

2005-07-18 Thread Chris Lambacher
On Mon, Jul 18, 2005 at 09:18:45AM +0200, Eric Brunel wrote: > On Fri, 15 Jul 2005 18:08:35 -0400, Chris Lambacher <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > This question has come up a few times on the list with no one giving a > > public > > answ

Re: Python IDE

2005-07-19 Thread Chris Lambacher
I use Vim. It does code completion and jump to variable/function definition. Emacs does this too. You just need to read the documentation about on how to set this up to your liking. The only feature that Vim does not have that I would like is the function argument pop up, but I want that more fo

Re: is this pythonic?

2005-07-22 Thread Chris Lambacher
On Thu, Jul 21, 2005 at 10:27:24AM -0400, Bill Mill wrote: > On 7/21/05, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > On Wed, 20 Jul 2005 16:30:10 -0400, Bill Mill wrote: > > > > > On 7/20/05, Simon Brunning <[EMAIL PROTECTED]> wrote: > > >> On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: > > >> > O

Re: Terminate a thread that doesn't check for events

2005-08-02 Thread Chris Lambacher
Yeah I will sure post it if I can find an elegant solution. > > Thank you, > LS > > > -Original Message- > > From: Chris Lambacher [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 02, 2005 11:50 AM > > To: Liu Shuai > > Subject: Re: Terminate a t

Re: pre subprocess help needed

2005-08-02 Thread Chris Lambacher
There is a version of subprocess for 2.3. http://www.lysator.liu.se/~astrand/popen5/ http://effbot.org/downloads/#subprocess On Tue, Aug 02, 2005 at 10:05:00AM -0700, chuck wrote: > I need to execute a command shell process obtain the return code and > capture stdout from that shell process. I'v

Re: Creating custom event in WxPython

2005-09-08 Thread Chris Lambacher
You should be derriving from PyCommandEvent since only CommandEvents are set to propegate, which is probably what you want (see the wxwidgets Event handling overview). In order to use Bind you will need an instance of PyEventBinder. For the example below that would be something like: EVT_INVOKE

Re: py2exe 0.6.1 released

2005-09-08 Thread Chris Lambacher
I am also getting this. In my case I think it is related to win32com.shell since when building I get the following error: error: C:\work\...\build\bdist.win32\winexe\collect-2.4\win32com.shell\shell.pyd: No such file or directory ... is a place holder for a very long path. The problem is fixed

Re: IDE, widget library

2005-09-15 Thread Chris Lambacher
PyGTK works beatifully on Win32. If you want anything more than the generic GTK widgets on win32 you are going to have to jump through some hoops or not be successful. I tend to hate the GTK file chooser so I am using win32all to get the Native windows one. There is no print dialog and win32all

Re: SVG rendering with Python

2005-12-15 Thread Chris Lambacher
You might be able to use AGG (anti grain geometry) to do svg to raster image conversion. I think there are python bindings for AGG. I know matplotlib uses AGG, but not for SVG rendering. -Chris On Wed, Dec 14, 2005 at 10:59:17PM +0100, Dennis Benzinger wrote: > Hi! > > Does anybody know of a SV

Re: bizarre id() results

2005-12-15 Thread Chris Lambacher
a.m1 returns a bound method which gets freed before you try checking a.m2, which ends up getting the same peice of memory. If you save a reference to the bound methods, they are forced to have separate objects. >>> class A: ... def m1(self): print "m1" ... def m2(self): print "m2" ... >>> a =

Re: SVG rendering with Python

2005-12-16 Thread Chris Lambacher
On Fri, Dec 16, 2005 at 01:58:40PM +1100, richard wrote: > Andreas Lobinger wrote: > > richard wrote: > >> Dennis Benzinger wrote: > >>>Does anybody know of a SVG rendering library for Python? > >> Google "python svg" > > > > ... to find what? > > The answer to the OP's question. The OP's questi

Re: using NamedTemporaryFile on windows

2005-12-29 Thread Chris Lambacher
On Thu, Dec 29, 2005 at 12:40:34AM -0500, Peter Hansen wrote: > > What I don't understand is why you _can't_ reopen the NamedTemporaryFile > under Windows when you can reopen the file created by mkstemp (and the > files created by TemporaryFile are created by mkstemp in the first place). Basica

Re: Python WSDL Generation Tools

2006-07-14 Thread Chris Lambacher
You will probably have more result on the pywebsvcs-talk mailing list. http://pywebsvcs.sf.net/ That said, ZSI will generate code from wsdl. I am not sure what it is you are asking for, but this is probably what you actually want. -Chris On Tue, Jul 11, 2006 at 11:15:45AM +0530, Vedanta Barooa

Re: WSDL and SOAP?

2006-07-19 Thread Chris Lambacher
If you want to do it in python, pywebsvcs is the place for both SOAPpy and ZSI, two SOAP frameworks. The WSDL defines the service's API. Both SOAPpy and ZSI allow you to use that to construct SOAP messages and handle the conversion from basic python types (int, string, etc) to SOAP encoding of th

Re: ConfigParser: what read('non-existent-filename') returns in 2.3.x?

2006-07-20 Thread Chris Lambacher
On Thu, Jul 20, 2006 at 10:50:40AM -0700, Danil Dotsenko wrote: > Wrote a little "user-friedly" wrapper for ConfigParser for a KDE's > SuperKaramba widget. > (http://www.kde-look.org/content/show.php?content=32185) > > I was using 2.4.x python docs as reference and > ConfigParser.read('non-existen

Re: ConfigParser: what read('non-existent-filename') returns in 2.3.x?

2006-07-21 Thread Chris Lambacher
On Thu, Jul 20, 2006 at 02:01:08PM -0700, Danil Dotsenko wrote: > Chris Lambacher wrote: > > On Thu, Jul 20, 2006 at 10:50:40AM -0700, Danil Dotsenko wrote: > >> Wrote a little "user-friedly" wrapper for ConfigParser for a KDE's > >> SuperKaramba wid

Re: Python newbie needs constructive suggestions

2006-07-24 Thread Chris Lambacher
On Sat, Jul 22, 2006 at 09:31:26PM +0200, Bruno Desthuilliers wrote: > Lawrence D'Oliveiro a ?crit : > > In message <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] wrote: > > > > > >> b) give up on using an anonymous function and create a named "successor" > >> function with "def", > > > > > > Thi

Re: PySNMP Thread unsafe?

2006-07-24 Thread Chris Lambacher
On Mon, Jul 24, 2006 at 02:21:10AM -0700, [EMAIL PROTECTED] wrote: > I'm trying to monitor about 250 devices with SNMP, using PySNMP version > 4. I use the threading.Thread to create a threadpool of 10 threads, so > devices not responding won't slow down the monitoring process too much. > > > Her

Re: list of indices

2006-07-24 Thread Chris Lambacher
On Mon, Jul 24, 2006 at 08:14:35AM -0700, Julien Ricard wrote: >hi, > >is there any method to get only some elements of a list from a list of >indices. Something like: > >indices=[0,3,6] >new_list=list[indices] new_list = [list[x] for x in indicies] > >which would cre

Re: self question

2006-07-26 Thread Chris Lambacher
On Tue, Jul 25, 2006 at 08:08:32PM +0200, Sch?le Daniel wrote: > [EMAIL PROTECTED] schrieb: > >> cnt = 1 > >> def foo(): > >>global cnt > >>cnt += 1 > >>return cnt > >> > >> def bar(x=foo()): > >>print x > >> > >> bar() # 2 > >> bar() # 2 > >> bar() # 2 > > > > Looks

Re: extender method

2006-07-26 Thread Chris Lambacher
On Wed, Jul 26, 2006 at 09:21:10AM -0700, [EMAIL PROTECTED] wrote: > 'Learning Python' by Lutz and Ascher (excellent book by the way) > explains that a subclass can call its superclass constructor as > follows: > > class Super: >def method(self): ># do stuff > > class Extender(Super): >

Re: Using iterators to write in the structure being iterated through?

2006-07-26 Thread Chris Lambacher
I think you are going to need to provide some python minimal code as an example of what is not working for you. -Chris On Wed, Jul 26, 2006 at 11:39:36AM -0400, Pierre Thibault wrote: > Hello! > > I am currently trying to port a C++ code to python, and I think I am stuck > because of the very dif

Re: Mouse LED Control in Python

2006-07-31 Thread Chris Lambacher
There is not enough information in that post to be able to reimpliment what he did in any language. You will have to try and get in touch with the author. -Chris On Sun, Jul 30, 2006 at 01:26:40PM -0700, [EMAIL PROTECTED] wrote: > I found this link that describes the byte arrays to control the

Re: getting debug from urllib2

2006-07-31 Thread Chris Lambacher
On Mon, Jul 31, 2006 at 02:43:36PM +0100, Ben Edwards wrote: > Have been experimenting with HTTP stuff in python 2.4 and am having a > problem getting debug info. If I use utllib.utlopen I get debug but if I > user utllib2 I do not. Below is the probram and the output I am > getting. > > Any insi

Re: Extending/Embedding Confusion

2006-08-08 Thread Chris Lambacher
Depending on what you are trying to do you might be better off to start by using Pyrex, Boost::Python or Swig. http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ http://www.boost.org/libs/python/doc/ http://www.swig.org/ -Chris On Fri, Aug 04, 2006 at 11:51:14AM -0700, jeremito wrote: > I

Re: Backup GMAIL Messages with Python

2006-08-08 Thread Chris Lambacher
fetchmail worked for me. You have to be patient though because it takes a while for all of your mail to become available for pop download. -Chris On Sat, Aug 05, 2006 at 08:43:32PM -0400, Gregory Pi?ero wrote: > On 8/5/06, Neil Hodgson <[EMAIL PROTECTED]> wrote: > > While you can write a scri

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread Chris Lambacher
How is your data stored? (site was not loading for me). test = 'blah = [1,2,3,4,5]' >>> var,val = test.split('=') >>> print var,val blah [1,2,3,4,5] >>> val = val.strip('[] ') >>> print val 1,2,3,4,5 >>> vals = [int(x) for x in val.split(',')] >>> print vals [1, 2, 3, 4, 5] More sophisiticated

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread Chris Lambacher
There were some mistakes in here. Thats what I get for repurposing existing code for an example. The uncommented lines are changed. On Wed, Aug 09, 2006 at 11:04:32AM -0400, Chris Lambacher wrote: from pyparsing import Suppress, Regex, delimitedList, Forward, QuotedString, Group

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread Chris Lambacher
On Wed, Aug 09, 2006 at 11:51:19AM -0400, Brendon Towle wrote: >On 9 Aug 2006, at 11:04 AM, Chris Lambacher wrote: > > How is your data stored? (site was not loading for me). > >In the original source HTML, it's like this (I've deleted all but the >

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread Chris Lambacher
If you mean that you are building Python2.4 and get an error during the configure step, you need to install libc6-dev. You are likely to find lots of issues unless you install some basic developer tools. There are some metapackages that get the right things for you, but I can't remember what it i

Re: is there an easy way to create a database on the fly and let the user input values

2006-10-12 Thread Chris Lambacher
I've heard good things about Dabo: http://dabodev.com/ On Wed, Oct 11, 2006 at 09:44:37PM -0700, [EMAIL PROTECTED] wrote: > I don't realy care what database I use wx.grid or whatever. I > wan't it to look at a line > > 128 9023 23428 exc and create the database or pick something out of the >

Re: Where can I find good python code?

2006-10-13 Thread Chris Lambacher
On Sat, Oct 14, 2006 at 01:08:37AM +0900, js wrote: > Hi, > > I've learned basics of Python and want to go to the next step. > So I'm looking for good python examples > I steal good techniques from. > > I found Python distribution itself contains some examples in Demo directory. > I spent some

Re: python2.5 importerror on md5

2006-10-23 Thread Chris Lambacher
On Mon, Oct 23, 2006 at 01:28:46PM -0700, samn wrote: > i think the problem is different versions of openssl on the two > machines , 0.9.7a and 0.9.8b I second that this is the likely culprit. I got bit by it while trying to do cross compile. The module build process assumes a couple of locations

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Nov 7)

2006-11-07 Thread Chris Lambacher
On Tue, Nov 07, 2006 at 04:15:39PM -0500, John Salerno wrote: > Cameron Laird wrote: > > > Fredrik Lundh collects pyidioms: > > http://effbot.org/zone/python-lists.htm > > Not working? perhaps http://effbot.org/zone/python-list.htm ? -- http://mail.python.org/mailman/listinfo/python-lis

Re: Help with installing soappy module on Python 2.4.3 (windows machine)

2006-11-08 Thread Chris Lambacher
On Tue, Nov 07, 2006 at 07:30:49AM -0800, [EMAIL PROTECTED] wrote: > Hi Folks, > > > I want to install the SOAPpy module on my windows box. I have python > 2.4.3 > > Can you help me with the steps and the URL from where can I get the > download..?? http://pywebsvcs.sourceforge.net/ > > TIA. >

Re: plasTeX doesn't load LaTeX packages

2006-11-15 Thread Chris Lambacher
On Sat, Nov 11, 2006 at 01:23:30PM +0100, giovanni gherdovich wrote: > Hello, > > first of all: > Is this the right place to ask plastek-related > questions? I would suspect that the plastex-users mailing list would be the right forum for plasTeX related questions: http://sourceforge.net/mail/?gro

Re: Add file to zip, or replace file in zip

2006-06-01 Thread Chris Lambacher
Skip over the file in question when you first are zipping the directory. Unfortunately you cannot replace or remove a file from a zip without unzipping and rezipping all the contents. -Chris On Wed, May 31, 2006 at 03:10:53PM +0800, majj81 wrote: >hi: > Good afternoon. > Has this pr

Re: Python for Visual Basic or C# programmers

2006-06-02 Thread Chris Lambacher
On Fri, Jun 02, 2006 at 10:26:28AM +0200, Laurent Pointal wrote: > A.M a ?crit : > > Hi, > > > > > > > > I am trying to find the equivalent functions such as vb's str or asc in > > Python. Is there any resource that help me to find these kinds of functions > > in Python faster? > > > > I'v

Re: how to switch from os.tmpnam to os.tmpfile

2006-06-08 Thread Chris Lambacher
You should be able to find exactly what you need in the tempfile module. http://docs.python.org/lib/module-tempfile.html os.tmpfile() is no good whether you want the filename or not since on Windows it is likely to break if you are not a privileged user. Its a windows problem, not an actual bug i

Re: TKinter

2006-06-10 Thread Chris Lambacher
GTK+ + Glade http://pygtk.org/ WxPython has several GUI editors http://wxpython.org PyQt has the ability to generate code from the Qt GUI designer http://www.riverbankcomputing.co.uk/pyqt/ I personally have used GTK+ and Glade with great success. I found WxPython to be lacking in polish. I h

Re: TKinter

2006-06-11 Thread Chris Lambacher
til you are connected to the >power that created you" - Shri Mataji Nirmala Devi. [1]www.tnsahaj.org. > >- Original Message >From: Chris Lambacher <[EMAIL PROTECTED]> >To: V Sivakumar <[EMAIL PROTECTED]> >Cc: python-list@python.org >

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-15 Thread Chris Lambacher
On Thu, Jun 15, 2006 at 08:36:21PM +0200, Jarek Zgoda wrote: > Fredrik Lundh napisa?(a): > > > hint: most people who provide third-party extensions to Python support > > more than just the latest Python version... > > We're happy with your support for us, Windows users, but you are an > exception

Re: Problem on win xp and run time error

2006-06-16 Thread Chris Lambacher
On Fri, Jun 16, 2006 at 06:11:53PM +, Michele Petrazzo wrote: > Hi list, > just found in this moment that my applications stop to work with win xp > and receive this error: > > """ > This application has requested the Runtime to terminate it in an unusual > way. Please contact the application'

Re: Problem on win xp and run time error

2006-06-20 Thread Chris Lambacher
On Sat, Jun 17, 2006 at 07:32:34AM +, Michele Petrazzo wrote: > Chris Lambacher wrote: > > On Fri, Jun 16, 2006 at 06:11:53PM +, Michele Petrazzo wrote: > >> Hi list, just found in this moment that my applications stop to > >> work with win xp and receive this

Re: Augument assignment versus regular assignment

2006-07-08 Thread Chris Lambacher
Looks like x=x+[2] creats a new list to me: >>> b = [8,5,6] >>> x = b >>> x = x + [2] >>> print b,x [8, 5, 6] [8, 5, 6, 2] -Chris On Sat, Jul 08, 2006 at 11:56:11AM -0700, nagy wrote: > Thanks, Kirk. > I considered the += as only a shorthand notation for the assignment > operator. > Since for list

Re: soap comlex data to plain xml

2006-08-25 Thread Chris Lambacher
You would probably get more responses on the pywebsvcs mailing list http://pywebsvcs.sf.net SOAP goes over HTML, so you can use httplib to do what you want. Just go look up the protocol details (hint use Google). You will probably want to use ZSI or SOAPpy to serialize the request body to xml f

Re: latex openoffice converter

2006-09-14 Thread Chris Lambacher
http://latex2rtf.sourceforge.net/ -Chris On Thu, Sep 14, 2006 at 08:29:19PM +0200, Fabian Braennstroem wrote: > Hi, > > I would like to use python to convert 'simple' latex > documents into openoffice format. Maybe, anybody has done > something similar before and can give me a starting point!? >

Re: Python programs always open source?

2006-09-19 Thread Chris Lambacher
On Tue, Sep 19, 2006 at 09:46:13PM +1000, Ben Finney wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > > > Ben Finney schrieb: > > > My claim (and IANAL) is that it doesn't matter *what* license > > > Python is distributed under; unless you do something with Python > > > that is a right of

Re: Programmatically replacing an API for another module

2006-11-22 Thread Chris Lambacher
On Tue, Nov 21, 2006 at 05:00:32PM -0800, Tom Plunket wrote: > Bruno Desthuilliers wrote: > > > > I've got a bunch of code that runs under a bunch of unit tests. It'd > > > be really handy if when testing I could supply replacement > > > functionality to verify that the right things get called wi

Re: Programmatically replacing an API for another module

2006-11-22 Thread Chris Lambacher
> > I'm just a bit loathe to download and install more stuff when > > something simpler appears to be near-at-hand. ...especially > > considering the page describing this module doesn't offer any download > > links! http://python-mock.sourceforge.net/ > How about mini-mock: > http://blog.ianbicki

Re: PyParsing and Headaches

2006-11-22 Thread Chris Lambacher
On Wed, Nov 22, 2006 at 11:17:52AM -0800, Bytter wrote: > Hi, > > I'm trying to construct a parser, but I'm stuck with some basic > stuff... For example, I want to match the following: > > letter = "A"..."Z" | "a"..."z" > literal = letter+ > include_bool := "+" | "-" > term = [include_bool] liter

Re: SOAP Server with WSDL?

2006-12-07 Thread Chris Lambacher
On Thu, Dec 07, 2006 at 12:49:09PM -0800, tobiah wrote: > I'm having trouble finding information > about writing a SOAP server. I get the client > part. There is much information about writing > a client, but not so much about writing the server. > Are there some good tutorials? > > I'm checking

Re: SOAP Server with WSDL?

2006-12-07 Thread Chris Lambacher
On Thu, Dec 07, 2006 at 01:52:59PM -0800, tobiah wrote: > > > You want ZSI. If you already have a wsdl you then use wsdl2py and > > wsdl2dispatch to create your server classes. The server classes get used > > with ZSI.ServiceContainer. Unfortunately there is not much documentation > > about thi

Re: Wrapping classes with pure virtual functions

2006-12-17 Thread Chris Lambacher
On Thu, Dec 14, 2006 at 01:57:10PM -0800, [EMAIL PROTECTED] wrote: > Hi, > I'm having problems wrapping a hierarchy of classes, actually having > problems wrapping the base class. I don't need to use the WrapClass > mechanism since I don't want to override classes in Python. My code > boils down to

Re: def index(self):

2006-12-18 Thread Chris Lambacher
On Mon, Dec 18, 2006 at 08:40:13PM +0100, Gert Cuykens wrote: > Is there a difference between Yes. The first one causes an exception and the second one doesn't. > > > class HelloWorld: > def index(self): > index.exposed = True index is not defined. HelloWorld.index is and self.index is, but in

Re: Why does Python never add itself to the Windows path?

2007-01-02 Thread Chris Lambacher
On Sat, Dec 30, 2006 at 04:55:09PM -0800, Ben Sizer wrote: > Martin v. L?wis wrote: > > > Ben Sizer schrieb: > > > I've installed several different versions of Python across several > > > different versions of MS Windows, and not a single time was the Python > > > directory or the Scripts subdirec

Re: Why does Python never add itself to the Windows path?

2007-01-02 Thread Chris Lambacher
On Tue, Jan 02, 2007 at 09:08:41AM -0800, Ben Sizer wrote: > Chris Lambacher wrote: > > > On Sat, Dec 30, 2006 at 04:55:09PM -0800, Ben Sizer wrote: > > > > Yet many scripts and applications require parameters, or to be executed > > > from a certain directo

Re: Newbie XML SAX Parsing: How do I ignore an invalid token?

2007-01-05 Thread Chris Lambacher
What exactly is invalid about the XML fragment you provided? It seems to parse correctly with ElementTree: >>> from xml.etree import ElementTree as ET >>> e = ET.fromstring(""" ... ... ... Tampa ... A great city ^^ and place to live ... ... ... Clearwater ... Beautiful be

Re: Python on a public library computer

2005-05-16 Thread Chris Lambacher
usb key and moveable python. http://www.voidspace.org.uk/python/movpy/ On 5/16/05, Timothy Smith <[EMAIL PROTECTED]> wrote: > John J. Lee wrote: > > >"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > > > > > >>Here's my situation: > >> > >>I'm typing this in a public library on a computer wit

Re: dirrection for simple record keeping app.

2005-05-26 Thread Chris Lambacher
As much as I hate to suggest anything Microsoft, you would probably save yourself a lot of work by using MS Access. That is what it is designed for. That said mySQL is probably a bit of a sledgehammer solution to the problem. If you want a database, you might want to look at SQLite. Is is prett

Re: thread vs GC

2005-06-02 Thread Chris Lambacher
You probably have one or more of several problems. If a __del__ method exists, the object might be stuck in the gc.garbage list. In general you are better off explicitly stopping it my adding a method that is called to set your threading.Event. Likely you will still be stuck waiting on your que

Re: [python-gtk] problem with multiple inheritance

2005-06-02 Thread Chris Lambacher
One way to get around this would be to omit the TreeSortable interface and use TreeModelSort to do the sorting instead. It doesn't look like GenericTreeModel is designed to also support the TreeSortable interface (you would need something like GenericTreeSortable since you would need some magic to

Re: GUI builders considered harmful (Was: anygui, anydb, any opinions?)

2005-06-05 Thread Chris Lambacher
I think you missed looking at several GUI builders. I have not used a GUI builder in 5 years that had you nail down positions. Swing(for Java), GTK, Qt, and wxWidgets(to a lesser degree) all use a sizer metaphore. You lay out he sizers and put your widgets in various sizer layouts. This means t

Re: Destructive Windows Script

2005-06-05 Thread Chris Lambacher
The reason they are slow and tedious is that they need to write to every byte on the disk. Depending on the size of the disk, there may be a lot of data that needs to be written, and if they are older computers, write speed may not be particularly fast. -Chris On 6/5/05, rbt <[EMAIL PROTECTED]>

Re: array problems.. OverflowError

2005-06-08 Thread Chris Lambacher
You probably want to look at using struct.pack. That will allow you to back heterogenious groups of data into a string that can be saved to disk or sent over the network. It also does a really good job of taking care of byte order for you(if you tell it to). -Chris On 8 Jun 2005 10:40:43 -0700,

Allocating an array.array of a specific length in pyrex

2005-06-08 Thread Chris Lambacher
Hi, I have to do some data manipulation that needs to be fast. I had a generator approach (that was faster than a list approch) which was taking approximately 5 seconds to run both encode and decode. I have done a conversion to pyrex and have gotten it down to about 2 seconds to run both encode

Re: [Pyrex] Allocating an array.array of a specific length in pyrex

2005-06-08 Thread Chris Lambacher
of PyString_AsString in order for my changes to get propegated back to the string object? -Chris On 6/8/05, Adam Langley <[EMAIL PROTECTED]> wrote: > On 6/8/05, Chris Lambacher <[EMAIL PROTECTED]> wrote: > > My question is, is there a better way to > > allocate the

Re: [Pyrex] Allocating an array.array of a specific length in pyrex

2005-06-08 Thread Chris Lambacher
so this is not going to work for me :( Is there a way to allocate a python buffer object and give that to array.array or a string object? -Chris On 6/8/05, Chris Lambacher <[EMAIL PROTECTED]> wrote: > The memory is not temporary, I am passing it out as an array, thus the > malloc

Re: [Pyrex] Allocating an array.array of a specific length in pyrex

2005-06-08 Thread Chris Lambacher
out_str[a_off+2] = in_str[str_off+3] out_str[a_off+3] = (in_str[str_off+2] + in_str[str_off+5])/2 str_off = str_off + 6 a_off = a_off + 4 return a On 6/8/05, Chris Lambacher <[EMAIL PROTECTED]> wrote: > I replaced: > a = array.array('B', , [

Re: Remove duplicates from list

2005-06-09 Thread Chris Lambacher
It is very unclear what you are trying to do. Why not explain what you want the output to be. You will get better answers. As a first stab at what you are doing wrong: collect = item.Monday + item.Tuesday + item.Wednesday + item.Thursday + item.Friday + item.Saturday + item.Sunday The above is

Re: Remove duplicates from list

2005-06-09 Thread Chris Lambacher
8am - 9pm8am - 9pmClosed8am - 5pm9am - 5pm6pm - 10pm', '8am - 9pm8am - > 9pm8am - 9pm8am - 9pm8am - 5pm9am - 5pmClosed', '9am - 8pm9am - 8pm9am - > 8pm9am - 8pm9am - 8pm9am - 6pm12pm - 6pm', '9am - 5pm9am - 5pm9am - 5pm9am - > 5pm9am - 5pmClosedClosed', '10am - 5

Single Application Instance Example

2005-06-14 Thread Chris Lambacher
Does anyone know of an example of how to make a Python program only run a single instance. I am specifically looking for examples for win32. I think I should be able to do this with win32all but the method is not obvious. Preferably I would like to be able to get a handle to the already running

python-list@python.org

2007-01-30 Thread Chris Lambacher
On Mon, Jan 29, 2007 at 03:12:37PM -0800, Pappy wrote: > SHORT VERSION: > Python File B changes sys.stdout to a file so all 'prints' are written > to the file. Python file A launches python file B with os.popen("./B > 2>&^1 >dev/null &"). Python B's output disappears into never-never > land. >

python-list@python.org

2007-01-30 Thread Chris Lambacher
ris > >Actually, I got around this problem by using an intermediate process that >happens to handle output on its own (bsub). > > On 1/30/07, Chris Lambacher <[EMAIL PROTECTED]> wrote: > > The subprocess module is probably a good starting point: >

Re: OSS and ALSA

2007-02-02 Thread Chris Lambacher
On Fri, Feb 02, 2007 at 12:08:22AM -0200, Silver Rock wrote: >Hi all, > >I've seen that python comes by default with a module for communication >with OSS. > >I've looked for a ALSA module too (pyalsa) but it seems to handle only >limited operations. how about http://sourceforg

Re: Getting a class name from within main

2007-02-08 Thread Chris Lambacher
On Wed, Feb 07, 2007 at 01:02:39AM -0800, [EMAIL PROTECTED] wrote: > Hi, > > Lets say I have the following class - > > class MyClass: > def __init__(self): > print (__name__.split("."))[-1] I would spell this: print self.__class__.__name__ > > if __name__ == '__main__

Re: 2.5 excitement (was Re: Java Developer Exploring Python)

2006-04-18 Thread Chris Lambacher
At least on windows. PySqlite is statically linked with the sqlite library. This can be done because it is quite small. -Chris On Tue, Apr 18, 2006 at 06:51:24PM +, Jon Ribbens wrote: > In article <[EMAIL PROTECTED]>, Aahz wrote: > > On that front, I think that pysqlite is much more importan

Re: Looking for resources for making the jump from Java to Python easier and more productive

2006-04-22 Thread Chris Lambacher
http://dirtsimple.org/2004/12/python-is-not-java.html http://dirtsimple.org/2004/12/java-is-not-python-either.html http://dirtsimple.org/2004/12/python-interfaces-are-not-java.html This link seems to be down at the moment. http://naeblis.cx/rtomayko/2004/12/15/the-static-method-thing The above a

Re: Can one query full name (or version) of selected packages at pypi?

2006-04-28 Thread Chris Lambacher
On Thu, Apr 20, 2006 at 02:26:02AM -0700, Caleb Hattingh wrote: > I could do these steps myself with normal http access and > screen-scraping, but is there already such a system/script somewhere? > Alternatively, how do you all keep versions of python addons > up-to-date? Manually? I use easy_ins

Re: What is wrong with the Python home page?

2006-05-02 Thread Chris Lambacher
Works for me with FireFox 1.5.2, but I am on WinXP at the moment. -Chris On Tue, May 02, 2006 at 01:43:58PM -0700, fuzzylollipop wrote: > I am using FireFox 1.5.2 on OS X 10.4.6 and the www.python.org ends up > being only text with just the nasa picture with the guy in the space > suit. > > It lo

  1   2   >