Re: Python Equivalent to Java Interfaces?

2005-04-08 Thread Michele Simionato
Google for "Hettinger interface checking": the first hit is the cookbook recipe you are looking for. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

shelve and concurrency

2005-04-08 Thread Michele Simionato
" But what about threads? If a single program open a shelve and many threads try to write simultaneously to it, do I get an error? I would say yes, but after various attempts, I cannot get it, at least on Linux, where shelve is using dbhash as database. Can somebody share any light, please?

Re: Multiple inheritance: Interface problem workaround, please comment this

2005-04-09 Thread Michele Simionato
Look at the comment in the code! I have posted the "decorate" module in the this decorator thread: http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/60f22ed33af5dbcb/b7239b45da6a67ab#b7239b45da6a67ab -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzling OO design problem

2005-04-09 Thread Michele Simionato
Dirk wrote: > So I dug through the documentation and found that new-style classes > compute a monotonic linearization of the inheritance graph, observing >local precedence order, using the algorithm also used in Dylan > described here: >http://www.webcom.com/haahr/dylan/linearization-oopsla96.html

Re: singleton objects with decorators

2005-04-12 Thread Michele Simionato
the same parameters, I am returned an instance of the already opened database). Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: singleton objects with decorators

2005-04-12 Thread Michele Simionato
special case. It also gives you plenty of use case to illustrate it, even to beginner programmers. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: singleton objects with decorators

2005-04-12 Thread Michele Simionato
I did not put memoize on __new__. I put it on the metaclass __call__. Here is my memoize: def memoize(func): memoize_dic = {} def wrapped_func(*args): if args in memoize_dic: return memoize_dic[args] else: result = func(*args) mem

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-12 Thread Michele Simionato
Me too :-( I have already submitted my issues with the Italian keyboard on WinXP with no great success. It works on Linux, but this is not of a big help since my plan was to use ipython -p pysh on Windows as a replacement of the shell :-( Michele Simionato -- http://mail.python.org

Re: singleton objects with decorators

2005-04-12 Thread Michele Simionato
Uhm? If I pass different parameters I want to have different instances. The Singleton behaviour is recovered only when I pass always the same arguments, in particular when I pass 0-arguments: >>> class Foobar: ... __metaclass__ = Memoize ... >>> Foobar() <__main__.Foobar object at 0xb7defbcc>

PyChart into web site error

2005-04-12 Thread Michele Petrazzo
e 'argv' Why my script doesn't have sys.argv? Is there another way to use PyChart into my script? Thanks, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: PyChart into web site error

2005-04-13 Thread Michele Petrazzo
Lee Harr wrote: On 2005-04-12, Michele Petrazzo <[EMAIL PROTECTED]> wrote: I'm using PyChart like a module for create charts into a little web site, but when I try to create one, I have this error: /var/www/html/lgt/draw.py:19, in draw: can = canvas.init(self.file_name) /usr/lib/pyt

Re: win32 readline maintenance (was Re: IPython - problem with...

2005-04-13 Thread Michele Simionato
Switching to the US keyboard did not help for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonic use of properties?

2005-04-14 Thread Michele Simionato
feel that: 1) separation of concerns is of the utmost importance; 2) classes should be kept as short as possible. Notice that in this design getters and setters are really hidden from the user, which may be or may be not what you want. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorator pattern for new-style classes ?

2005-04-24 Thread Michele Simionato
port SF 729913 The discussion around the bug report is worth reading, Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

ACCU Conference (PyUK) 2005

2005-04-25 Thread Michele Simionato
od and actually they were surprised of how easy was to make the port. All in all, pretty good news, people! It seems a pretty good moment to be a Python programmer! I have something else to say, but I will make another post for that. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: ACCU Conference (PyUK) 2005

2005-04-25 Thread Michele Simionato
enlets. They are extremely cool, I don't know where I want to use them yet, but I am pretty sure I'll figure out something eventually ;) Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-26 Thread Michele Simionato
developers are familiar with Zope 3 yet). Quixote too has a small number of developers, but at least it is easy and you don't need much help to work with it. Michele Simionato Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: How to start python interactively from python script?

2005-04-26 Thread Michele Simionato
$ python -i myscript.py Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-27 Thread Michele Simionato
I would also look at CherryPy, the new 2.0 version seems pretty interesting (I have not tried it, but I have seen a short presentation at the ACCU conference, and it looks really trivial to use). -- http://mail.python.org/mailman/listinfo/python-list

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-27 Thread Michele Simionato
red of components, hundreds of thousand of lines of code) or small? Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-28 Thread Michele Simionato
d small, in theory. But in practice there is, so I use Zope at work and Quixote at home ;) Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a list of classes in the current module/auto introspection

2005-04-28 Thread Michele Simionato
Any class has a .__module__ attribute giving the name of the module where the class was defined, so you need something like [c for c in globals() if inspect.isclass(c) and c.__module__ == "__main__"] Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: anonymous function objects?

2005-04-28 Thread Michele Simionato
Uwe Mayer: > Why does the "print" statement return a syntax error here? Google for "Python regrets" where Guido admits that 'print' should have been a function. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: anonymous function objects?

2005-04-29 Thread Michele Simionato
I have not access to Guido's time machine! M. S. -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest's ELLIPSIS

2005-04-29 Thread Michele Simionato
I think doctest believes the line starting with ... is a continuation line in a multiline statement. -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest's ELLIPSIS

2005-04-29 Thread Michele Simionato
I would file a bug report/documentation bug/feature request or whatever to sourceforge. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Binding

2015-09-10 Thread Michele Simionato
files, which was easy to add. It was also smaller, easier to understand and to customize. Its speed was more than enough. However I hear that everybody else is happy with lxml, so YMMV. Michele -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Object Systems

2014-08-13 Thread Michele Simionato
Years ago I wrote strait: https://pypi.python.org/pypi/strait I wonder who is using it and for what purpose, since surprisingly enough it has 50+ downloads per day. For me it was more of an experiment than a real project. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Object Systems

2014-08-14 Thread Michele Simionato
Il giorno mercoledì 13 agosto 2014 19:13:16 UTC+2, thequie...@gmail.com ha scritto: > What is the difference between traits and roles? People keep using the same names to mean different concepts. For me traits are the things described here: http://www.iam.unibe.ch/~scg/Archive/Papers/Scha03aTra

Re: Hierarchical commnd line parsing / help texts

2011-09-28 Thread Michele Simionato
plac is based on argparser and it is intended to be much easier to use. See http://plac.googlecode.com/hg/doc/plac.html Here is an example of usage. $ cat vcs.py class VCS(object): "A fictitious version control tool" commands = ['checkout', 'commit'] def checkout(self, url): r

Re: Decorating functions without losing their signatures

2013-04-03 Thread Michele Simionato
On Wednesday, April 3, 2013 3:05:31 AM UTC+2, Rotwang wrote: > After thinking about it for a while I've come up with the following > > abomination Alas, there is actually no good way to implement this feature in pure Python without abominations. Internally the decorator module does something s

Trying to understand the memory occupation of big lists

2013-05-03 Thread Michele Simionato
I have a memory leak in a program using big arrays. With the goal of debugging it I run into the memory_profiler module. Then I discovered something which is surprising to me. Please consider the following script: $ cat memtest.py import gc from memory_profiler import profile @profile def test

inserting/retriving dates in psycopg

2006-01-04 Thread Michele Simionato
e(d) and NOT a datetime.datetime. So I need an adaptation mechanism; alternatively it would be enough for me to be able to redefine the __str__ representation of psycopg DateTime objects ( which are defined at C level, so I cannot just override the __str__ method). Any hints? I am sure there is a custom way to do this. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Python article in Free Software Magazine

2006-01-04 Thread Michele Simionato
Kirk Strauser: > I wrote this article which was published in Free Software Magazine: > http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/ If find funny your headline """ Zope's biggest distinguishing characteristic is how closely it models the language it is written in: Python

Re: inserting/retriving dates in psycopg

2006-01-05 Thread Michele Simionato
he type checking I would like to avoid :-/ Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Python article in Free Software Magazine

2006-01-05 Thread Michele Simionato
Some of the reasons are explained here: http://www.amk.ca/python/writing/why-not-zope.html I am using the last Zope (2.8.4) at work, and the situation is slightly better now than in the past, but only slightly. Zope 3 looks better, but I am not sure how much better. Michele Simionato

Re: inserting/retriving dates in psycopg

2006-01-05 Thread Michele Simionato
Frank Millan: > Perhaps if you explain what you are trying to do, I may be able to > suggest something. I am looking for an adaptation/type cast mechanism and looking at the sources I think I have found it in doc/examples/usercast.py. I am doing some experiment now ... Michele Sim

Re: decorator question

2006-01-09 Thread Michele Simionato
Schüle Daniel wrote: > Can someone give me some pointers to the metaprogramming in Python? > links etc Check the Python Wiki. For the decorators in particular I wrote a module that you may find useful. See http://www.phyast.pitt.edu/~micheles/python/decorator.zip http://www.phyast.pitt.edu/~miche

Re: Spelling mistakes!

2006-01-09 Thread Michele Simionato
emory optimization trick and should NOT be used as declarations. You can find a few posts of the Martellibot on the subject. I even wrote a recipe to tell people who want static declarations how to implement them without slots: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252158

Re: Spelling mistakes!

2006-01-09 Thread Michele Simionato
I like to play devil's advocate here, so I will say that in this case using automatic testing will increase your probability of spelling mistakes: I do most of my spelling mistakes in the test cases! <0.5 wink> Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: testing units in a specific order?

2006-01-09 Thread Michele Simionato
You could use py.test -- http://mail.python.org/mailman/listinfo/python-list

Re: testing units in a specific order?

2006-01-09 Thread Michele Simionato
be found in the tool directory of > the py-lib. This looks new. Can you comment on how utestconvert.py work and how reliable is it? Thanks, Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Failing unittest Test cases

2006-01-10 Thread Michele Simionato
> Scott David Daniels about marking expected failures: I am +1, I have wanted this feature for a long time. FWIW, I am also +1 to run the tests in the code order. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Client side web programming

2006-01-10 Thread Michele Simionato
> Pramod Subramanyan asked aboyt urllib2: Look at this article: http://www.voidspace.org.uk/python/articles/urllib2.shtml Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Failing unittest Test cases

2006-01-11 Thread Michele Simionato
[EMAIL PROTECTED] wrote: > Michele> I am also +1 to run the tests in the code order. > > Got any ideas how that is to be accomplished short of jiggering the names so > they sort in the order you want them to run? > > Skip Well, it could be done with a decorator, bu

Re: how do "real" python programmers work?

2006-01-13 Thread Michele Simionato
As many others, I use emacs for programming and ipython for interactive experiments. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

ANN: FreeImagePy 1.2.0

2006-01-20 Thread Michele Petrazzo
anges from 1.1.0: Start the port to a more pythonic interface. See Image class documentation (or the examples) A bug in *nix mode that cause a problem when getStatus are called Michele Petrazzo -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining if an object is a class?

2006-07-12 Thread Michele Simionato
[EMAIL PROTECTED] wrote: > I need to find out if an object is a class. > Which is quite simply awful...does anyone know of a better way to do > this? inspect.isclass M.S. -- http://mail.python.org/mailman/listinfo/python-list

look for a module without import it

2006-07-14 Thread Michele Petrazzo
Hi list, I have to know if a module are present on the system, but I don't want to import it. Only know if it is present. I think that a loop on the site-packages directory can do the work, but is there another solution? Thanks, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: look for a module without import it

2006-07-14 Thread Michele Petrazzo
Fredrik Lundh wrote: >> more module.py > print "I'M MODULE!" > >> python >>>> import imp imp.find_module("os") It was! Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Dispatch with multiple inheritance

2006-07-18 Thread Michele Simionato
pt. of Computer Science > http://www.dartmouth.edu/~sting/ | Dartmouth College, Hanover, NH, USA Look at http://www.python.org/download/releases/2.3/mro Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Using super()

2006-07-19 Thread Michele Simionato
yle) == type There should be something more on http://www.python.org/download/releases/2.2.3/descrintro (I have seen somewhere how type.__new__ works, and how the metaclass is chosen, so I am pretty sure sure there are no issue, at least for pure Python classes). Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Partial classes

2006-07-19 Thread Michele Simionato
attr, if you don't want to use inheritance. It would be still better that magically transform your classes with a metaclass. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Using super()

2006-07-19 Thread Michele Simionato
Michele Simionato ha scritto: > I believe the new style system was designed to allows this sort of > mixing and > that there are no issues at all. Thinking a bit more, there are no issues at all if you know what a new style class is and if you do not expect it to work as an old-style o

Re: Need a compelling argument to use Django instead of Rails

2006-07-25 Thread Michele Simionato
Joe Knapka ha scritto: > Classes are effectively open in Python, too, at least > where methods are concerned, since one can do > klass.__dict__["myMethod"]=myMethod. Yes, but builtin classes in Python are closed and this is the relevant point. Michele

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Michele Simionato
he attributes of a metaclass are available to its instances, but not to the instances of the instances. Just this is the main difference between metaclasses and superclasses.""" Since this happens for real attributes, it looks natural that the same should happen for 'virtual' attributes implemented via '__getattr__' or '__getattribute__'. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Info on continuations?

2006-08-08 Thread Michele Simionato
supports them. For instance this is a recent reference for continuations in Scheme: http://www-128.ibm.com/developerworks/linux/library/l-advflow.html?ca=dgr-lnxw02FlowControl Ruby should have support for continuations too, but I am quite ignorant about the Ruby literature. Michele S

Re: The Semicolon Wars as a software industry and human condition

2006-08-18 Thread Michele Dondi
C." It's "Look what a paradise Python offers you!" (I think maybe I liked the old sermons better.) Michele -- {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^http://mail.python.org/mailman/listinfo/python-list

Re: py2exe: cannot identify image file

2006-08-21 Thread Michele Petrazzo
nd_20py2exe > > Thank you -Daniel > Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for EXIF-info-additions ?

2006-08-21 Thread Michele Petrazzo
FreeImagePy. It's not so difficult, but now I haven't time to do it. If you want to spend some hours for make enjoying yourself and all the python community, email me! :) > /BJ > > Bye, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for EXIF-info-additions ?

2006-08-21 Thread Michele Petrazzo
ly this! All the tags code for add/remove/modify them are already inside freeimage! > See you, > > Dilly > Bye, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: creating many similar properties

2006-10-17 Thread Michele Simionato
rc.pwm02 # 127 rc.pwm02 = 1312 print rc.pwm02 # 32 This is a bit hackish, but I would prefer this over a metaclass solution. since it does not add any hidden magic to your class. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: creating many similar properties

2006-10-18 Thread Michele Simionato
s (i.e. extensions classes), or try to use multiple metaclasses. I wrote a paper about metaclasses abuses which should be published soon or later; you can see the draft here: http://www.phyast.pitt.edu/~micheles/python/classinitializer.html Michele Simionato -- http://mail.python.org/mailman/listinfo/

Re: creating many similar properties

2006-10-18 Thread Michele Simionato
k and you will avoid all issues of custom metaclasses. This is exactly the approach I advocate in the paper I referred before, so I think your solution is pretty safe in that respect. Still I think in this particular problem avoiding the __metaclass__ at all is possible and it should be preferred, just

Re: creating many similar properties

2006-10-18 Thread Michele Simionato
h the class dict upon creation); > whereas if you use Michele Simionato's hack, the icky feeling of using > a stack frame object goes away after the property is created: you are > left with a clean untainted class. Yep, exactly. > Personally, the former doesn't make me feel icky a

Re: creating many similar properties

2006-10-18 Thread Michele Simionato
Carl Banks wrote: > Come on, I don't think anyone's under the impression we're being > indiscriminate here. Ok, but I don't think that in the case at hand we should recommend a metaclass solution. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Save/Store whole class (or another object) in a file

2006-10-18 Thread Michele Simionato
he documentation: http://docs.python.org/dev/lib/pickle-inst.html Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: creating many similar properties

2006-10-19 Thread Michele Simionato
om/ASPN/Cookbook/Python/Recipe/204197) but I would rather avoid it altogether. The problem with metaclasses is that you are adding magic to the classes of your USERS, and the users are known to play any kind of dirty tricks. You (speaking in general of you as the author of a framework) should strive to keep things clean as much as possible. I agree that the problems are rare: but just for this reason they are prone to very subtle bugs, the hardest to find. And there is no documentation of metaclass pittfall AFAIK :-( Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: creating many similar properties

2006-10-19 Thread Michele Simionato
and using 'type' instead (i.e. use the __metaclass__ hook, but not custom metaclasses). It is the same trick used by George Sakkis in this same thread. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: FreeImagePy creating thumbnails from TIFF

2006-10-31 Thread Michele Petrazzo
TO32 ), and it'll work. Or update to the new svn version (r21), that adds the __iter__ method for the Image class. Now you can do this: fname = "01-PJ2306.tif" img = FIPY.Image(fname) for bmp in img: new_img = bmp.thumbnail(300) Bye, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: how is python not the same as java?

2006-11-10 Thread Michele Simionato
gavino wrote: > both are interpreted oo langauges.. Notice that gavino has a long history of asking trollish questions in Lisp and Scheme newsgroups and he displays the typical behavior of a troll. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: explicit self revisited

2006-11-13 Thread Michele Simionato
a while one gets used to it and if you think a bit it makes quite a lot sense. Also, having the self explicit, makes Python object system better (i.e. it goes more in the direction of CLOS and less in the direction of Java). Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: article on Python 2.5 features

2006-11-13 Thread Michele Simionato
t IndexError: if token != '': yield token if __name__=='__main__': print '--- Smart Python 2.2+ tokenizer ---' g = read_eval_yield_loop(tokenizer3, text, ' ') for t in g: print t if t == 'comma': g.send(',') Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: handling many default values

2006-11-13 Thread Michele Simionato
vars(self).update(kwargs) Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: handling many default values

2006-11-14 Thread Michele Simionato
Gabriel Genellina wrote: > At Monday 13/11/2006 13:33, Michele Simionato wrote: > > >Alan Isaac wrote: > > > Also, as an aside, no one objected to using > > > self.__dict__.update(kwargs) > > > in the __init__ function of the parameter holding class. >

Re: ctypes pointers and SendMessage

2006-06-01 Thread Michele Petrazzo
method: >>> class X(Structure): ... _fields_ = [("x", c_int), ] ... >>> x1 = X(1) >>> x1.x 1 >>> http://starship.python.net/crew/theller/ctypes/tutorial.html -> Structures and Unions Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to get FreeImagePy to work.

2006-06-01 Thread Michele Petrazzo
Iain King wrote: > Michele Petrazzo wrote: >> Iain King wrote: >>> Michele Petrazzo wrote: >>> >>> I downloaded and installed 0.9.9.3, and it now works. Thanks! >>> >> I advice you to don't use that ctypes version... Better is to use

Re: Trying to get FreeImagePy to work.

2006-06-01 Thread Michele Petrazzo
Iain King wrote: >> Can you download the last svn version from sf.net? Otherwise I'll send >> you the last sources privately. >> >> Bye, >> Michele > > I got the TortoiseSVN client though, and > checked out your newest build, copied it over the to

Re: Trying to get FreeImagePy to work.

2006-06-03 Thread Michele Petrazzo
mage at: http://www.snakebomb.com/misc/example.tif > > Iain > Yes it's min-is-white:: michele:~$ tiffinfo example.tif TIFFReadDirectory: Warning, example.tif: unknown field with tag 37680 (0x9330) encountered. TIFF Directory at offset 0x1520 (5408) Subfile Type: (0 = 0x0) Im

Re: FreeImagePy and PIL

2006-06-05 Thread Michele Petrazzo
David Isaac wrote: > I am just starting to think about image processing. What are the > overlaps and differences in intended functionality between > FreeImagePy and PIL? > > Thanks, Alan Isaac > > http://tinyurl.com/m5kal For any other questions, I'm here

Re: Trying to get FreeImagePy to work.

2006-06-05 Thread Michele Petrazzo
ccess, to make the "convertToPil" function work with 1, 8, 16 bpp... Seem that only 24/32 work, but I don't know why. I know that PIL doesn't have problems! > > > Hope that this can explain better the situation. Bye, Michele -- http://mail.python.org/mailman/listinfo/python-list

tracking dependencies

2006-06-08 Thread Michele Simionato
there should be an option to turns off the visualization of certain modules, for instance the ones in given subpackages. I guess somebody has already written it, maybe even with a nice visual backend. Any hint? Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: tracking dependencies

2006-06-09 Thread Michele Simionato
Dennis Benzinger wrote: > > I've never tried it, but http://www.tarind.com/depgraph.html looks like > what you are looking for. This is EXACTLY what I had in mind :-) Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Correctly reading stdout/stderr from subprocess

2006-06-15 Thread Michele Simionato
Maric Michaud wrote: I would consider avoiding threads via Twisted utils.getProcessOutput: http://twistedmatrix.com/projects/core/documentation/howto/process.html#auto6 Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is fun (useless social thread) ;-)

2006-06-15 Thread Michele Simionato
thon&rnum=3#3d77eba36a97751d Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is fun (useless social thread) ;-)

2006-06-15 Thread Michele Simionato
corator.zip http://www.phyast.pitt.edu/~micheles/python/documentation.html Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: a good programming text editor (not IDE)

2006-06-16 Thread Michele Simionato
about arguing for Emacs since everything is already explained here: http://www.dina.kvl.dk/~abraham/religion Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Problem on win xp and run time error

2006-06-16 Thread Michele Petrazzo
ay occur when you use the /GR and the /MD compiler switches """ so my question are: python are compiled with that switches? If yes, can someone try to compile it without that switches, if it can of course, and publish the new installer? I'm can't work until microsoft solve

Re: Problem on win xp and run time error

2006-06-17 Thread Michele Petrazzo
Chris Lambacher wrote: > On Fri, Jun 16, 2006 at 06:11:53PM +0000, 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 Ru

Re: Problem on win xp and run time error

2006-06-17 Thread Michele Petrazzo
Normally py2exe catch that messages and show them when the program are closed, but in this case, I don't see any message :( Is it possible that some, but I don't know what, can be modified from py2.3 to py2.4 and now my program wont work? Is there some tried that I can do for try to solve my issue? > > > Thanks, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: code is data

2006-06-19 Thread Michele Simionato
spectful of all the work people like Steven Bethard and others did :-( Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic inheritance

2006-06-21 Thread Michele Simionato
in a running program with a problem you can add debug methods and possibily even fix the problem without restarting the program). Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem on win xp and run time error

2006-06-22 Thread Michele Petrazzo
Chris Lambacher wrote: > On Sat, Jun 17, 2006 at 07:32:34AM +0000, 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 sto

Re: Using metaclassed to dynamically generate a class based on a parameter to the objects init function.

2006-06-23 Thread Michele Simionato
classname, *attributes): cls = type(classname, mybases, mydic) for name, value in attributes: setattr(cls, name, attr) return cls is the typical solution for your use case. OTOH, if you are looking for use classes for metaclasses, look at the Python Wiki and use Google. Michele Simionato

Re: TypeError: Cannot create a consistent method resolution order (MRO) for bases object

2006-06-27 Thread Michele Simionato
[EMAIL PROTECTED] wrote: > What are the reason one would get this error: TypeError: Cannot create > a consistent method resolution order (MRO) for bases object ?? See http://www.python.org/download/releases/2.3/mro/ Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you use this list ?

2006-06-27 Thread Michele Simionato
want to ask > how do you use this list , reading every mail come in or just read what > you think > interesting ? > > Thank you ! > > > Best Regard ! I use the newsgroup: http://groups.google.com/group/comp.lang.python Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: python for windows internet filter / firewall

2006-06-30 Thread Michele Petrazzo
get started? > (e.g. win32 COM?) win32COM for do what? You can do it in not so difficult manner: Take twisted and its proxy class, make some outline code (for filter the pages) and enjoy! (work also on win) > > Thanks much -- matthew > P.s. Don't forgot to share your code, wh

Way for see if dict has a key

2006-06-30 Thread Michele Petrazzo
Hi ng, what the preferred way for see if the dict has a key? We have a lot of solutions: key in dict key in dict.keys() dict.has_key(key) ... but what the better or the more "pythonic"? Thanks, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Way for see if dict has a key

2006-06-30 Thread Michele Petrazzo
Fredrik Lundh wrote: > Michele Petrazzo wrote: > >> what the preferred way for see if the dict has a key? >> We have a lot of solutions: >> >> key in dict > > new syntax (2.3 and later). > So, following it, it can be used for the operations like len?

Re: Way for see if dict has a key

2006-06-30 Thread Michele Petrazzo
Bruno Desthuilliers wrote: >> but what the better > > Depends on the context. > If know only one context: see if the key are into the dict... What other context do you know? Michele -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >