codecs.register_error for "strict", unicode.encode() and str.decode()

2012-07-26 Thread Alan Franzoni
the location of the error.", is there any reason why the standard "strict" handler cannot be replaced? Thanks for any clue. File links: https://dl.dropbox.com/u/249926/minimal_test_decode.py https://dl.dropbox.com/u/249926/minimal_test_encode.py -- Alan Franzoni contact me at public@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Behaviour-based interface/protocol implementation?

2011-01-28 Thread Alan Franzoni
t yes, __instancecheck__ on an ABC can actually be used in place of maybe_implemented_by and hooking into isinstance(). Thanks! -- Alan Franzoni -- contact me at public@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Behaviour-based interface/protocol implementation?

2011-01-27 Thread Alan Franzoni
nstead. Maybe some stack analysis could be performed, but I'd prefer to check as much as I can *before* calling. - Sometimes I'd like to group objects depending on their *behaviour* (not their type), and then feed them somewhere else without actually calling their methods. If I can know thei

Re: Behaviour-based interface/protocol implementation?

2011-01-27 Thread Alan Franzoni
. def method1(self, c, d): ... could satisfy or not the very same interface, depending whether the args are passed as postional or kw. -- Alan Franzoni -- contact me at public@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Behaviour-based interface/protocol implementation?

2011-01-27 Thread Alan Franzoni
On Thu, Jan 27, 2011 at 8:03 PM, Alan Franzoni wrote: > Yes, __instancecheck__ could be used as an alternative hook with > respect to maybe_implemented_by(), but there's no such logic for > signature checking. That's a minor detail, I think. On the contrary, now that I doubl

Re: Behaviour-based interface/protocol implementation?

2011-01-27 Thread Alan Franzoni
ant. Yes, __instancecheck__ could be used as an alternative hook with respect to maybe_implemented_by(), but there's no such logic for signature checking. That's a minor detail, I think. -- Alan Franzoni -- contact me at public@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Behaviour-based interface/protocol implementation?

2011-01-26 Thread Alan Franzoni
e_implemented_by(oo) # -> True MyInterface.maybe_implemented_by(to) # -> True MyInterface.maybe_implemented_by(SomeObj) # -> True That's just what I'd like and I suppose can't be currently done with current ABC, PyProtocols or zope.interface implementations, right? -- Alan Franzoni -- contact me at public@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Behaviour-based interface/protocol implementation?

2011-01-25 Thread Alan Franzoni
ht work as well (call the method and see whether it crashes) and I may finally pick that approach, but I'd like not to clutter my code with explicit try...except blocks. The very same approach might help. The chance for signature mismatch is of course high when using extreme runti

Behaviour-based interface/protocol implementation?

2011-01-24 Thread Alan Franzoni
hat already exist in the python ecosystem? b) can anybody see any flaw either in what I'd like to do ("you shouldn't do that because...") or in the way I want to do it ("It won't work because...") -- Alan Franzoni -- contact me at public@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: abc for generators?

2010-05-19 Thread Alan Franzoni
On 5/19/10 7:24 PM, Carl Banks wrote: > collections.Iterator That would just support the next() method. But enhanced generators interface - supporting coroutines as well - include send(), throw() and close(). -- Alan Franzoni contact me at pub...@[mysurname].eu -- http://mail.python.

abc for generators?

2010-05-19 Thread Alan Franzoni
ator, even though it could expose the very same interface as a builtin, yield-based generator. I think it would be pretty useful. comments? -- Alan Franzoni contact me at pub...@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: debugger on system with Python 2 and 3

2009-11-27 Thread Alan Franzoni
;ve never tested them in Python 3. -- Alan Franzoni contact me at pub...@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Using "setup.py" for an application, not a library module.

2009-11-18 Thread Alan Franzoni
n "setup.py install"? Where does the application get installed? Where > does > the main program go? Usually, just package the lib and from your "main program" (e.g. the script that goes in /usr/bin, for instance), do just something like that: #!/usr/bin/python from mylib impor

Re: Pyfora, a place for python

2009-11-04 Thread Alan Franzoni
ps; I think THAT would be a good idea. What about trying to "channel" comp.lang.python and a forum? -- Alan Franzoni contact me at pub...@[mysurname].eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-31 Thread Alan Franzoni
rts and write unit tests for them. Typos are very common but should very easy to catch. If you're not catching them until a very long run of your program, then your code coverage is probably too low. -- Alan Franzoni contact me at pub...@[mysurname].eu -- http://mail.python.org/mailman/

Re: Python Socket Issues with VirtualBox

2009-05-22 Thread Alan Franzoni
something more. -- Alan Franzoni - Remove .xyzz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

PyCon Italy 2009: Late Bird Deadline

2009-04-25 Thread Alan Franzoni
look at the schedule: http://www.pycon.it/pycon3/schedule/ A simultaneous interpretation service is available for the main track: http://www.pycon.it/pycon3/non-italians See you in Florence! -- Alan Franzoni - Remove .xyzz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3

Re: Why can function definitions only use identifiers, and not attribute references or any other primaries?

2009-04-23 Thread Alan Franzoni
... I suppose the reason behind this is that it's not really needed. There're plenty of ways to do this sort of things in python; if you just declare methods in a class you can just use the plain def in order to achieve this, and you can inherit from your container and specialize

PyCon Italy 2009: Early Bird Deadline

2009-04-07 Thread Alan Franzoni
Cangiano. Feel free to take a look at the schedule: http://www.pycon.it/pycon3/schedule/ A simultaneous interpretation service is available for the main track: http://www.pycon.it/pycon3/non-italians See you in Florence! -- Alan Franzoni - Remove .xyzz from my email in order to contact me. - GPG

PyCon Italy 2009: Early Bird Deadline

2009-04-07 Thread Alan Franzoni
Cangiano. Feel free to take a look at the schedule: http://www.pycon.it/pycon3/schedule/ A simultaneous interpretation service is available for the main track: http://www.pycon.it/pycon3/non-italians See you in Florence! -- Alan Franzoni - Remove .xyzz from my email in order to contact me. - GPG

Re: time

2008-10-07 Thread Alan Franzoni
;t see your IP since I'm reading this through gmane and you appear to have posted via the python ml, but if your utc+1 means "Central Europe" , you're proably missing the daylight saving. 17.00 CEST is 15.00 UTC during summer, when daylight saving is employed. -- Alan Franzoni <

Re: starting gazpacho on windows

2008-08-30 Thread Alan Franzoni
nntpman68 was kind enough to say: [cut] I didn't check, but if c:\python25 is your python install dir, you'll very likely find it in c:\python2.5\bin or c:\python25\scripts. -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key F

Re: email parsing

2008-08-27 Thread Alan Franzoni
" " > else: > str2 = str2+ val+" " > return str2 I'm not 100% sure what you're doing there, BTW I'd suggest you to use as many Unicode objects as you can while working in Python, and encoding them just when you're outp

Re: GUI programming with python

2008-08-26 Thread Alan Franzoni
xPython as well. GUI Designers are widget-set related - I can suggest gazpacho for GTK+. -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: SSH utility

2008-08-11 Thread Alan Franzoni
stions on their > respective mailing lists haven't been answered... Twisted conch seems to be your last chance :-) -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't import work?

2008-08-05 Thread Alan Franzoni
package, you must create a (possibly empty) __init__.py file in that dir. then you can do something like from pdfminer import pythonfile1 or you can follow Sean's advice and export the __all__ name in order to directly access any module you like. -- Alan Franzoni <[EMAIL PROTECTED]> - R

Re: sip.so: undefined symbol: PyUnicodeUCS4_AsWideChar

2008-08-04 Thread Alan Franzoni
han 10 ^ 6, it's ucs4. -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Strong/weak typing

2008-08-01 Thread Alan Franzoni
ped. You're talking about dynamic typing, but that's not about "name reuse". -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to have multiple loop variables?

2008-07-31 Thread Alan Franzoni
2 = {'managed1':(7019:8020), 'managed2':(7020:8021)} depending on what you want, and then iterate over such structure just like Marc suggested. Otherwise, you can create a custom class which returns three-tuples when iterated, in such case you can just extract m, lp, ssl_lp in the

Re: undo a dictionary

2008-07-30 Thread Alan Franzoni
20 x3=30 q6=40 def make_dict(regex, nsmapping): output_dict = {} compiled_regex = re.compile(regex) for key, value in nsmapping.items(): if compiled_regex.match(key): output_dict[key] = value return output_dict d = make_dict("x[123]", locals()) print

Re: Syntax error in my script

2008-07-30 Thread Alan Franzoni
laredotornado was kind enough to say: [cut] Indentation counts in Python. You're probably doing something wrong with whitespace/tab/carriage return. -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A2

Re: Continuous integration for Python projects

2008-07-30 Thread Alan Franzoni
then define the usual targets (build, dist, test), ecc. and then use xmlrunner to publish them in a junit-like format which can be read through cruisecontrol or other CI tools. -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9

Re: static variables in Python?

2008-07-30 Thread Alan Franzoni
do something like that: >> f = getfunc(lambda: 1, lambda x,y:x*y) >> f(2) 6 -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Alan Franzoni
Scott David Daniels was kind enough to say: > Alan Franzoni wrote: > Please don't pass this misinformation along. > > In the struct module document, see the section on the initial character: > Character Byte order Size and alignment >@ n

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Alan Franzoni
Not in the struct module; such functions are available in the socket module, and should be employed indeed. -- Alan Franzoni <[EMAIL PROTECTED]> - Remove .xyz from my email in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Python iPod challenge

2007-11-11 Thread Alan Franzoni
letters as the output (this should be related to scripteaze problem) without any other character. Error messages are pretty counter-intuitive. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Finge

Re: interesting threading result..

2007-10-29 Thread Alan Franzoni
would expect: {2: 3, 3: 4} [{2: 3, 3: 4}] -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Memory leak issue with complex data structure

2007-07-04 Thread Alan Franzoni
my problem without seeing the actual code (which I can't post) but I'm asking if there's any tool/debugger I could employ in order to track what's happening. Thanks! -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address

Re: c[:]()

2007-05-31 Thread Alan Franzoni
p() to achieve the very same result. Or you could define a function of your own like: def call_elems(iterable): for elem in iterable: elem() and just do call_elems(c) when needed. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi.

Re: Basic Class/Instance Question

2007-05-23 Thread Alan Franzoni
lt value of the function (which is part of the definition, not of the body) is a mutable object, because it's the very same default value that gets modified at each time. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in

Re: Basic Class/Instance Question

2007-05-23 Thread Alan Franzoni
7;shared' between all instances. If you don't want that, do something like: def __init__(self, defaultvalue=None): if defaultvalue is None: defaultvalue=[] http://docs.python.org/tut/node6.html#SECTION006710000 -- Alan Franzoni <[EMAIL PROTECTED

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Alan Franzoni
ibile encoding for any reader, a kind of translittering (is that a proper english word) system out-of-the-box, not requiring any other tool that's not included in the Python distro. This will let people to retain their usual working environments even though they're dealing with source code

Re: vim e autoindentazione commenti

2007-05-11 Thread Alan Franzoni
Il Fri, 11 May 2007 13:15:01 GMT, Neil Cerutti ha scritto: >:help format-comments > > (Spiacente per la mia scrittura difettosa. Sto utilizzando il > traduttore di altavista.) Really sorry ^_^ I thought I was posting in it.comp.lang.python Thank you BTW! -- Alan Franzoni <[

vim e autoindentazione commenti

2007-05-11 Thread Alan Franzoni
a) questa aggiunta è automatica e la trovo molto, molto comoda. Dovrei andae a intaccare il file di indentazione? o quello di sintassi? -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint

Re: Can I use Python instead of Joomla?

2007-05-02 Thread Alan Franzoni
u just download it, follow the instructions, plug in any pre-packed addon, and use it. You could probably do the very same with some of the Python CMSes around. Django is different: you must be able to program Python in order to use it. Nothing works from the beginning, since it's not a C

Re: python QT or python-GTK

2007-03-18 Thread Alan Franzoni
for their actual visual performance wherever they should be employed. Also, GTK+ seems to still need an X server on macosx (don't know about QT) Both have IDEs to create GUIs; take a look at Glade or Gazpacho for GTK+. Also, remember GTK+ is a community project while QT is a fully commercial p

Re: Python Source Code Beautifier

2007-03-08 Thread Alan Franzoni
I would agree it would be useful. But if there're such methods, do we really need this syntactic sugar to introduce confusion? -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Source Code Beautifier

2007-03-07 Thread Alan Franzoni
hat I want to use in place of a list, to carefully craft an __iadd__ method which works just like the a list's own __iadd__ method; if I forget, I may introduce a subtle error. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my add

Re: Python Source Code Beautifier

2007-03-05 Thread Alan Franzoni
my own programs. At least, this is I what I think today; tomorrow, when I'm more experienced, I could think about them and say 'Hey! They're really cute, why haven't I used them before?' Bye! -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email pe

Re: Python Source Code Beautifier

2007-03-02 Thread Alan Franzoni
n.org/ref/augassign.html But... I don't know, still think it's confusing and not going to use it. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Eric on XP for Newbie

2007-02-28 Thread Alan Franzoni
N.B: you need first to install python, then pyqtgpl, then eric. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3

Re: Python Source Code Beautifier

2007-02-28 Thread Alan Franzoni
a = a + [2] >>>> a > [1, 2] >>>> b > [1] This is a really nasty one! I just answered to Tim above here, and then I saw your example... I had never realized that kind of list behaviour. That's probably because i never use + and += on lists (i prefer the more explicit

Re: Python Source Code Beautifier

2007-02-28 Thread Alan Franzoni
Il Wed, 28 Feb 2007 07:53:47 +1100, Delaney, Timothy (Tim) ha scritto: > Alan Franzoni wrote: >> the += operator is syntactic sugar just to save time... if one >> doesn't use it I don't think it's a matter of beauty. > > This change can have semantic differ

Re: Python Source Code Beautifier

2007-02-27 Thread Alan Franzoni
; => if not string That's impossibile! Python is dynamically typed! How could the 'beautifier' understand what the 'string' name is bound to? It could be whatever object! > detect mixed line ending > detect tabs mixed with space > trim trailing whitespaces. Th

Re: gtk.mainquit is deprecated

2007-02-27 Thread Alan Franzoni
; Very strange. But does then the application end, as if gtk.main_quit() were called? If it's the case, it's very likely you connected the 'destroy' signal on that very window and you set gtk.mainquit() as the callback. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .

Re: The Python interactive interpreter has no command history

2007-02-16 Thread Alan Franzoni
s well both with 2.4 and 2.5 with my config. If it's really an Edgy glitch, it must be configuration-related! -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E):

Re: Ubunu - Linux - Unicode - encoding

2007-02-01 Thread Alan Franzoni
. Try appending this options in your fstab as hda1 mount options: iocharset=iso8859-15 unmount & remount and check what does happen. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerpr

Re: Ubunu - Linux - Unicode - encoding

2007-02-01 Thread Alan Franzoni
xp may be installed on fat32 or ntfs partitions) and b) which driver are you using to read that partition (may be vfat, ntfs or fuse/ntfs-3g) and, last but not least, c) which options are passed to that driver? -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattar

Re: How to use MySQL without MySQLdb module

2006-12-06 Thread Alan Franzoni
l database and just write raw sql and pull raw data from it, but this will prevent you from the chance of using more enhanced db tools like sqlalchemy, and it's highly discouraged as well as it's really prone to errors. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla m

Re: A python IDE for teaching that supports cyrillic i/o

2006-11-19 Thread Alan Franzoni
Kirill Simonov si è divertito a scrivere: > On Sun, Nov 19, 2006 at 12:33:39PM +0100, Alan Franzoni wrote: > No, I would prefer the editor to save the .py files with non-ASCII > characters in UTF-8 encoding adding the BOM at the beginning of the > file. This will allow the in

Re: A python IDE for teaching that supports cyrillic i/o

2006-11-19 Thread Alan Franzoni
ATE: I tried with Eclipse+Pydev, and using koi8_r I seems to be able to simply copy&paste a piece of the ixbt.com homepage in the editor I can save and use it correctly. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in or

Re: Change on file

2006-10-24 Thread Alan Franzoni
and changes frequent, it could put the system under severe workload. If you just need to know if a file has changed, you can check via date/time, or if you don't trust somebody who's got access to it (because he could have manually altered the datetime) you could go for a simpler algo

Re: Compile python on Solaris 64bit

2006-10-12 Thread Alan Franzoni
ally using? I think there could be some configuration mismatch between running binaries and environment variables that could confuse the compiler. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Rremove .xyz from my address in order to contact me. - GPG Ke

Re: Converting MSWord Docs to PDF

2006-10-10 Thread Alan Franzoni
If you're doing this in Linux, you should consider something like Crossover Office in order to run ms word and convert its output. The openoffice.org based solution will surely work, but you'll heavily rely on the conversion quality of that suite. -- Alan Franzoni <[EMAIL PROTECTED]>

Re: Dive Into Python -- Still Being Updated?

2006-07-24 Thread Alan Franzoni
ve some *special* methods, (any python object has) but they have no method of their own. I think this is pretty clear, it's employed to emphasize the contrast with the list object. BTW, you can see last update is 20 May 2004; it's right on the homepage. -- Alan Franzoni <[EMAIL PRO

Re: Inheritance error: class Foo has no attribute "bar"

2006-07-09 Thread Alan Franzoni
dictionary > just for Character, the attributes are listed. Are you sure attrib_dict is a class attribute? Aren't you defining it in charachter's __init__ method, thus making it an instance attribute? -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contat

Re: compiling python (or ironpython) to .exe or .dll for or not for .NET

2006-06-28 Thread Alan Franzoni
Il 28 Jun 2006 06:29:58 -0700, per9000 ha scritto: > Is the newest Ironpython really as old as from 2004 July 28 (as stated > on http://www.ironpython.com/)? Sorry again, the up to date page is the following one: http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython -- Alan Fr

Re: compiling python (or ironpython) to .exe or .dll for or not for .NET

2006-06-28 Thread Alan Franzoni
7-ab1e-4bcb-99c0-57ac5a3a9742 -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Rremove .xyz from my address in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E - Blog: http://laterradeglieroi.verdiperronchi.

Re: performance degradation when looping through lists

2006-04-07 Thread Alan Franzoni
Joachim Worringen on comp.lang.python said: > I use Python 2.3.4 (#1, Sep 3 2004, 12:08:45) > [GCC 2.96 2731 (Red Hat Linux 7.3 2.96-110)] on linux2 Check Peter Otten's answer, and remember as well that GCC 2.96 can lead to highly strange issues whenever used. -- Alan Franz

Re: pondering about the essence of types in python

2006-03-26 Thread Alan Franzoni
d, and it's often useful to have it as such, (unexpected errors and behaviours might rise everywhere if not so), but you're never forced to use that. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Rremove .xyz from my address in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: __dict__ strangeness

2006-03-20 Thread Alan Franzoni
Georg Brandl on comp.lang.python said: > It's 2.4.2, on Linux. The 2.5 SVN trunk has the same symptom. Yes, I confirm this. I think I had done something strange on my system (probably misspelled something). -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email p

Re: __dict__ strangeness

2006-03-18 Thread Alan Franzoni
Georg Brandl on comp.lang.python said: >>>> d.__dict__ > {} Which Python version, on which system? I can see the properly inserted attribute in __dict__, both with old style and new style classes. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per cont

Re: Which GUI toolkit is THE best?

2006-03-14 Thread Alan Franzoni
see a cent anyway. Personally, I don't like Qt licensing, since I think there're good widget sets around that don't have such limitations, but I don't think that people at Trolltech are really trolls :-= -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per

Re: Which GUI toolkit is THE best?

2006-03-10 Thread Alan Franzoni
t I can't tell you if it's production-stable since I've tested it just a couple of times. It may be the funniest and more productive toolkit ever. FLTK was interesting but seems to lack maintenance and support, pyQT is a bit 'unfree' for most uses. Tkinter is quite old

Re: Psychic bug

2006-02-22 Thread Alan Franzoni
, old value: %s, new value: %s " % ( letter, gen[letter], base) in place of your two prints in the if block, it should help you. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. To contact me, remove .xyz from my email

Re: yet another list compr. suggestion

2006-01-22 Thread Alan Franzoni
for x in y if z(x)] You've got to stick to the present syntax. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Rremove .xyz from my address in order to contact me. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- htt

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-19 Thread Alan Franzoni
ld be getting a Q1 results from a certain state in the DB, while Q2 from a different state, thus misleading you to take an inopportune action. committing the connection syncs the state you're looking at with the actual DB state. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia e

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Alan Franzoni
you tried just creating a new cursor object at every query? If you want to do a quick-test, try any ORM, like sqlalchemy or sqlobject, and check the results. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. To contact me, remove .xyz from my ema

Re: Recursive tree list from dictionary

2006-01-14 Thread Alan Franzoni
; to map the list position to the root element: def convertList(dictlist): helpdict={} for elem in dictlist: helpdict.setdefault(elem['parent'],[]) helpdict[elem['parent']].append(elem['title']) return [k,v for k,v in helpdict.items() if k

Re: Cross Compile Mips / Linux

2006-01-10 Thread Alan Franzoni
, but those machines are so memory-limited (mine had 8MB I think) I couldn't have it work. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. To contact me, remove .xyz from my email address. - GPG Key Fingerprint: 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: python for with double test

2005-12-30 Thread Alan Franzoni
ant to make it shorter, you can define a function instead of the 'for' code block and use the list comprehension directly: def myfunction(x): ... [myfunction(x) for x in range(0,10) if f[x]==1] and you'll end up with a list of the return values of myfunction. -- Alan F

Re: Difference between ActivePython and Python.org

2005-12-14 Thread Alan Franzoni
e Win32 extensions. The interpreter is a compile of their own, but I don't think it to be that different from the 'official' binary. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Rremove .xyz from my address in order to contact me. - GPG K

Re: Amara (XML) problem on Solaris

2005-12-13 Thread Alan Franzoni
nt() or doc = binderytools.create_document() or simply create_document() depending on the way you imported the module, but your previous code, if really working on Windows, makes me think you did something like: import amara.binderytools as amara or something like that? Please post some mo

Re: NoneType to unicode

2005-12-12 Thread Alan Franzoni
i can't do because it crashes the application) NoneType is just the type of None. It should mean that your ID3 library returns 'None' when trying to read non-ascii ID3s. I think you should check your ID3 library, not your main program. -- Alan Franzoni <[EMAIL PROTECTED]> -