Is it possible to reload a module from a different file?

2008-03-12 Thread ilochab
I mean ... The main module makes this import: import moduleX later other modules make different import to an other module named moduleX like this: from pack.subdir import moduleX What I want is that the second import of moduleX in some way must be redirected onto the first one. Is

How to import a module that must override a standard one

2008-03-11 Thread ilochab
I'm writing a python package that will contain a logging service for twisted in python style. I'm using some modules I downloaded from a twisted trunk, that are not released with twisted but have the same names. One of them is log.py that is usually imported from twisted modules like: from

Py2exe with PyQt4 and sqlite

2007-10-11 Thread ilochab
I wrote an application that uses PyQt4 to access a sqlite DB. Now I'm trying to convert it using py2exe and I found some problems. The last one, that I'm not able to avoid, is that when I launch the application's binary on a PC (that contains only a Python 2.5 installation and no QT4) I get an

Re: Really strange behavior

2006-11-05 Thread IloChab
Il Sun, 05 Nov 2006 04:19:36 +1100, Steven D'Aprano ha scritto: Why don't you add some temporary print statements into your code to try to narrow it down? I did it and I followed the script with the dubugger and what I saw is that it gets lost in the simulate method of QTReactor instead if

Really strange behavior

2006-11-04 Thread IloChab
Sorry I wasn't able to be more specific on my topic but I really do not know how to classify my problem, I mean that I can't understand if it's a python or a twisted or a Qt4 problem I'm trying to run a simple application with Twisted and Qt4. To do this I downloaded this:

Implementing a circular counter using property / descriptors?

2006-10-08 Thread IloChab
I'd like to implement an object that represents a circular counter, i.e. an integer that returns to zero when it goes over it's maxVal. This counter has a particular behavior in comparison: if I compare two of them an they differ less than half of maxVal I want that, for example, 0 maxVal gives

Re: Reading output from a child process non-blockingly

2005-06-29 Thread ilochab
Yuan HOng ha scritto: In my program I have to call an external program and parse its output. For that I use the os.popen2 function, and then read the output stream. But the complexity is that the external program gives back its output in a piecemeal manner, with long delays between the