Re: [Py2exe-users] py2exe 0.6.9 released

2008-11-16 Thread Chris Spencer
After I "compile" my program with py2exe 0.6.9 with Python 2.6, I'm still getting the "Application Did Not Initialize Properly" error dialog whenever I run my code. What am I doing wrong? Note that py2exe 0.6.9 with Python 2.5 works just fine. Help! Chris. On Sat, 15 Nov 2008 23:21:15 -0800,

Re: InteractiveConsole History on Linux

2006-07-16 Thread Chris Spencer
[EMAIL PROTECTED] wrote: > Chris> Yeah, "import readline" works just fine. My problem isn't hard to > Chris> replicate. Can anyone else on Linux get command history to work > Chris> with the following code? Note, it should be saved and run from a > Chris> file. > > Command history

Re: InteractiveConsole History on Linux

2006-07-15 Thread Chris Spencer
Robert Kern wrote: > Chris Spencer wrote: >> Robert Kern wrote: >>> Chris Spencer wrote: >>>> Why does code.InteractiveConsole support command history on Windows, >>>> but not in a Gnome terminal (all I get is ^[[A^[[B)? Or does it not >>>&

Re: InteractiveConsole History on Linux

2006-07-15 Thread Chris Spencer
Robert Kern wrote: > Chris Spencer wrote: >> Why does code.InteractiveConsole support command history on Windows, >> but not in a Gnome terminal (all I get is ^[[A^[[B)? Or does it not >> support history at all, and the Windows console is implementing it's >&

Re: InteractiveConsole History on Linux

2006-07-15 Thread Chris Spencer
vbgunz wrote: > vbgunz wrote: >>> Why does code.InteractiveConsole support command history on Windows, but >>> not in a Gnome terminal (all I get is ^[[A^[[B)? Or does it not support >>> history at all, and the Windows console is implementing it's own? Is >>> there any way to get command history wo

InteractiveConsole History on Linux

2006-07-14 Thread Chris Spencer
Why does code.InteractiveConsole support command history on Windows, but not in a Gnome terminal (all I get is ^[[A^[[B)? Or does it not support history at all, and the Windows console is implementing it's own? Is there any way to get command history working with InteractiveConsole on Linux? C

Object Persistence Using a File System

2006-07-11 Thread Chris Spencer
Before I get too carried away with something that's probably unnecessary, please allow me to throw around some ideas. I've been looking for a method of transparent, scalable, and human-readable object persistence, and I've tried the standard lib's Shelve, Zope's ZODB, Divmod's Axiom, and others

Remembering History in code.InteractiveConsole

2006-07-09 Thread Chris Spencer
I'd like to make code.InteractiveConsole function just like the normal Python console. However, when I try to use the arrow keys to recall command history, all I get is ^[[A^[[B. I've seen the example at http://docs.python.org/lib/readline-example.html but this doesn't seem to work at all, altho

Re: Dynamically Update Class Definitions?

2005-11-12 Thread Chris Spencer
Jean-Paul Calderone wrote: > There are lots of cases where you cannot rebind the __class__ > attribute. For a comprehensive treatment of this idea (but still not a > completely functionality implementation), take a look at >

Re: Dynamically Update Class Definitions?

2005-11-11 Thread Chris Spencer
Chris Spencer wrote: > Alex Martelli wrote: >> If you're in no hurry, you COULD loop over all of gc.get_objects(), >> identify all those which are instances of old_class and "somehow" change >> their classes to new_class -- of course, x.__class__ = new_cla

Re: Dynamically Update Class Definitions?

2005-11-11 Thread Chris Spencer
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > > >>Is there a way to loop through all instantiated objects and update >>their classes when a source file changes? I know about Michael Hudson's >>method >>(http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164), but >>you have to modif

Re: Recompile AST?

2005-11-10 Thread Chris Spencer
Leif K-Brooks wrote: > [EMAIL PROTECTED] wrote: > >>Is it possible to recompile the AST generated by compiler.parse, back >>into code or an executable code object? > > > Into a bytecode object: > > >>> from compiler.pycodegen import ModuleCodeGenerator > >>> from compiler.misc import set_file

Re: SPE IDE for Python

2005-11-08 Thread Chris Spencer
py wrote: > Anyone here use SPE (http://www.stani.be/python/spe/blog/). ...the IDE? > > Also, anyone know if it supports CVS or has a plugin for CVS? If not, > what do you use to get your code into CVS (via an IDE preferably)? I used to use SPE quite frequently, until it went nearly unmaintained

Lossless Number Conversion

2005-08-28 Thread Chris Spencer
Is there any library for Python that implements a kind of universal number object. Something that, if you divide two integers, generates a ratio instead of a float, or if you take the square root of a negative, generates a complex number instead of raising an exception? Lisp has something like

Re: Socket Troubles

2005-08-28 Thread Chris Spencer
Michael Sparks wrote: > Chris Spencer wrote: > > At one point in your code you do this: > self._socket.setblocking(0) > > This says "if we can't recieve or send data without blocking, fail rather > than succeed". One of the failure modes is t

Re: Socket Troubles

2005-08-28 Thread Chris Spencer
Chris Spencer wrote: > I've written a simple class to manage P2P socket connections. However, > whenever I try to receive data, the socket raises an exception with the > error message (11, 'Resource temporarily unavailable'). > > My code's fairly straight-fo

Socket Troubles

2005-08-28 Thread Chris Spencer
I've written a simple class to manage P2P socket connections. However, whenever I try to receive data, the socket raises an exception with the error message (11, 'Resource temporarily unavailable'). My code's fairly straight-forward, with much of it right out of the Python docs, so I'm not sur

Persistent XMLRPC Connection

2005-08-14 Thread Chris Spencer
I noticed the SimpleXMLRPCServer/ServerProxy creates a new socket for remote procedure call. I've written a simple IP based authentication scheme for the Server, and I'd like to include the port in the authentication, which is currently not possible since the port keeps changing. I've looked a

Rich Graphics?

2005-07-27 Thread Chris Spencer
I'm trying to write a Gui in Python for manipulating rich graphical representations, similar to something like Inkscape. I've tried tkinter, wxPython, pyGtk, and while they all do traditional widgets well enough, none of them really handle anti-aliased, transparent, transformed shapes typical o

Re: searching for IDE

2005-06-12 Thread Chris Spencer
jean-marc wrote: > if you are familiar with eclipse, you could use the PyDev python > plugin. > > jm Thanks for that reference. I had been using SPE for my Python editing, but it's gone unmaintained as of late, so I've been looking for an alternative. Aside from an autocomplete bug (which I've

Re: How to get/set class attributes in Python

2005-06-12 Thread Chris Spencer
Peter Dembinski wrote: > Chris Spencer <[EMAIL PROTECTED]> writes: > > >>Peter Dembinski wrote: >> >>Of course, in that Python is dynamically typed as opposed to the >>static typing of Java or C++. Please excuse my previous mis-wording :) > >

Re: How to get/set class attributes in Python

2005-06-12 Thread Chris Spencer
Peter Dembinski wrote: > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > >>Nope. Python *is* typed. But it doesnt confuse implementation >>with semantic. > > > Python is typed. And its type system may look strange for anyone who > did only Java or C++ programming before :> Of course, in tha

Re: How to get/set class attributes in Python

2005-06-12 Thread Chris Spencer
Bruno Desthuilliers wrote: > Chris Spencer a écrit : > >> I was providing the original poster with a simple way to ensure >> appropriate type. > > > s/appropriate type/specific implementation/ > > Hint : the appropriate type for print &g

Re: How to get/set class attributes in Python

2005-06-12 Thread Chris Spencer
Bruno Desthuilliers wrote: > And *this* is highly unpythonic. And un-OO too, since it makes foo() > dependant on *class* Bar, when it should most probably be enough that it > only depends on (probably part of) the *interface* of class Bar. I was providing the original poster with a simple way t

Re: ElementTree Namespace Prefixes

2005-06-12 Thread Chris Spencer
Andrew Dalke wrote: > On Sun, 12 Jun 2005 15:06:18 +0000, Chris Spencer wrote: > > >>Does anyone know how to make ElementTree preserve namespace prefixes in >>parsed xml files? > > > See the recent c.l.python thread titled "ElemenTree and namespaces&q

Re: How to get/set class attributes in Python

2005-06-12 Thread Chris Spencer
Kalle Anke wrote: > On Sun, 12 Jun 2005 13:59:27 +0200, deelan wrote > (in article <[EMAIL PROTECTED]>): > > void doSomething( data : SomeClass ){ ... } > > and I would be sure at compile time that I would only get SomeClass objects > as parameters into the method. Being an untyped language, Py

ElementTree Namespace Prefixes

2005-06-12 Thread Chris Spencer
, which it seems to do correctly for everything except namespace prefixes. The docs mention "proper" output can be achieved by using the Qname object, but they don't go into any detail. Any help is appreciated. Thanks, Chris Spencer -- http://mail.python.org/mailman/listinfo/python-list