Re: how do "real" python programmers work?

2007-02-15 Thread Hendrik van Rooyen
"Tim Golden" <[EMAIL PROTECTED]> wrote: > Tyrrell, Wendy wrote: > > (Well, nothing) > 8<-- > Your organisation seems to deal with partnerships between > business and education; are you looking to promote the use > of programming in schools? Or is there something else you

I'm faint why this can't work

2007-02-15 Thread JStoneGT
Hello, I got this similar sample script from books: $ cat sampdict.py #!/usr/bin/python class SampDict(dict): def __init__(self, filename=None): self["name"] = filename But when I run it I got the errors: >>> from sampdict import SampDict >>> SampDict("/etc/passwd") Traceback (mo

Re: numpy, numarray, or numeric?

2007-02-15 Thread Frank
On Feb 15, 4:40 pm, "Christian Convey" <[EMAIL PROTECTED]> wrote: > I need to bang out an image processing library (it's schoolwork, so I > can't just use an existing one). But I see three libraries competing > for my love: numpy, numarray, and numeric. > > Can anyone recommend which one I should

Re: Enter Enter... troubles

2007-02-15 Thread Hendrik van Rooyen
Sorin Schwimmer wrote: 8<- > def handler(self,event): >self.aButton.unbind('') >self.aButton.unbind('') 8<- > >The idea is to prevent a fast user (like my boss) to press repeatedly the "enter" >key and create havoc with self.property and

Re: Pep 3105: the end of print?

2007-02-15 Thread Steven Bethard
Edward K Ream wrote: >> You could offer up a patch for Python 2.6 so that you can do:: >>from __future__ import print_function > > This would only work for Python 2.6. Developers might want to support Python > 2.3 through 2.5 for awhile longer :-) Python 3.0 is determined not to be hampered

Re: IOError: [Errno 4] Interrupted system call

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 23:57:29 -0300, <[EMAIL PROTECTED]> escribió: > i'm getting the same error when trying to read results from popen2 > within a pyQt window. is this a threading issue? is my pyQt window > responsible for interrupting the read? i'm fairly new to python so > i'm struggling to fig

PIL problems

2007-02-15 Thread Jamie Bohr
I am trying to allow JPEG's to be used for portraits inside of Plone. I have Googled and found I need to install the Pytphon Imaging Library (PIL); after that all should be good. I did that, but I an error that tells me there is a missing library. The below is a log of what I did. From what I

Re: IOError: [Errno 4] Interrupted system call

2007-02-15 Thread chadrik
i'm getting the same error when trying to read results from popen2 within a pyQt window. is this a threading issue? is my pyQt window responsible for interrupting the read? i'm fairly new to python so i'm struggling to figure this out. can you recommend any possible methods of preventing this? fo

Re: Tkinter __call__

2007-02-15 Thread John McMonagle
Gigs_ wrote: > from Tkinter import * > from tkFileDialog import askopenfilename > from tkColorChooser import askcolor > from tkMessageBox import askquestion, showerror > from tkSimpleDialog import askfloat > > demos = { > 'Open': askopenfilename, > 'Color': askcolor, > 'Query':

Re: builtin set literal

2007-02-15 Thread Raymond Hettinger
>> What about "{,}"? For consistency "(,)" and "[,]" might >> also have to be permissible, and maybe even "{:}" for an >> empty dict. The notion of a set literal was rejected in PEP 218, http://www.python.org/dev/peps/pep-0218/ . One of the reasons for the rejection was that the small benefit of a

The Python Papers Volume 2 Issue 1 HTML now available

2007-02-15 Thread [EMAIL PROTECTED]
http://archive.pythonpapers.org/ThePythonPapersVolume2Issue1.html Hi Pythonistas! The HTML version of the latest edition of The Python Papers is now available from the above URL. The editors understand that the web layout lacks the sophistication of the PDF, or indeed that possible under HTML. Ho

The Python Papers Volume 2 Issue 1 HTML now available

2007-02-15 Thread [EMAIL PROTECTED]
http://archive.pythonpapers.org/ThePythonPapersVolume2Issue1.html Hi Pythonistas! The HTML version of the latest edition of The Python Papers is now available from the above URL. The editors understand that the web layout lacks the sophistication of the PDF, or indeed that possible under HTML. Ho

spam magnet

2007-02-15 Thread a a
Hello, I hear (from google) that people get a lot of spam after posting to this list. That's nice, because I, [EMAIL PROTECTED] , happen to want a lot of spam :) Anyone who would like to send me their spam is welcome to as well (full headers please, I'm trying to track & corellate those wascally bo

Re: numpy, numarray, or numeric?

2007-02-15 Thread RickMuller
On Feb 15, 5:40 pm, "Christian Convey" <[EMAIL PROTECTED]> wrote: > I need to bang out an image processing library (it's schoolwork, so I > can't just use an existing one). But I see three libraries competing > for my love: numpy, numarray, and numeric. > > Can anyone recommend which one I should

Re: Pep 3105: the end of print?

2007-02-15 Thread Ben Finney
"Edward K Ream" <[EMAIL PROTECTED]> writes: > > Isn't the very concept of major releases (1.x, 2.x, 3.x) that they > > *can* be not backwards-compatible with previous releases? > > Not at all. In the context of the question, this answer seems to say that a major release *must* be backwards-compat

Re: builtin set literal

2007-02-15 Thread MRAB
On Feb 15, 4:12 pm, Schüle Daniel <[EMAIL PROTECTED]> wrote: > [...] > > >>> In Python 3.0, this looks like:: > > >>> s = {1,2,3} > > >> jepp, that looks not bad .. as in a mathe book. > >> the only disadvantage I see, that one may confuse it with a dict. > > > Perhaps with a very cursory inspe

Re: Pep 3105: the end of print?

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 22:04:34 -0300, Edward K Ream <[EMAIL PROTECTED]> escribió: > In other words, the consequence of pep 3105 will be that *nobody* who > wants > their app to be portable will be able to use print until *everybody* has > converted to Python 3.x. I doubt that is what Guido had

Re: filecmp.cmp() cache

2007-02-15 Thread Steve Holden
Peter Otten wrote: > Mattias Brändström wrote: > >> On Feb 15, 5:56 pm, Peter Otten <[EMAIL PROTECTED]> wrote: >>> You can clear the cache with >>> >>> filecmp._cache = {} >>> >>> as a glance into the filecmp module would have shown. >> You are right, a quick glance would have enlighten me. Next t

Re: builtin set literal

2007-02-15 Thread Schüle Daniel
[...] >>> In Python 3.0, this looks like:: >>> >>> s = {1,2,3} >> >> jepp, that looks not bad .. as in a mathe book. >> the only disadvantage I see, that one may confuse it with a dict. > > Perhaps with a very cursory inspection. But the lack of any ':' > characters is a pretty quick clue-in

Re: SystemError: _PyImport_FixupExtension: module _types not loaded

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 21:49:56 -0300, <[EMAIL PROTECTED]> escribió: > After installing activestate python 2.4 and ctypes-1.0.1.win32- > py2.4.exe, everything just worked. So, I decided to stay with 2.4 > since I don't have time to figure out the problem. Glad to see it worked, at least on 2.4 --

Re: Pep 3105: the end of print?

2007-02-15 Thread Edward K Ream
> Isn't the very concept of major releases (1.x, 2.x, 3.x) that they *can* > be not backwards-compatible with previous releases? Not at all. Backwards compatibility means that one can still run old code provided the code eschews new features. Python releases have generally been backwards com

Re: Python's freeze.py utility

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 21:18:51 -0300, Mitko Haralanov <[EMAIL PROTECTED]> escribió: > OK, this might be a stupid question: for the life of me, I can't find > Python's freeze.py utility in the Python distribution that comes with > FC6. > > Has it been removed from the distribution? Has it been remo

Re: SystemError: _PyImport_FixupExtension: module _types not loaded

2007-02-15 Thread usenet1
After installing activestate python 2.4 and ctypes-1.0.1.win32- py2.4.exe, everything just worked. So, I decided to stay with 2.4 since I don't have time to figure out the problem. Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: output to console and to multiple files

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 19:35:10 -0300, Matimus <[EMAIL PROTECTED]> escribió: >> I think you should be able to use my or goodwolf's solution with the >> subprocess module. Something like this (untested): >> >> [code] >> class TeeFile(object): >> def __init__(self,*files): >> self.files = f

numpy, numarray, or numeric?

2007-02-15 Thread Christian Convey
I need to bang out an image processing library (it's schoolwork, so I can't just use an existing one). But I see three libraries competing for my love: numpy, numarray, and numeric. Can anyone recommend which one I should use? If one is considered the officially blessed one going forward, that w

Python's freeze.py utility

2007-02-15 Thread Mitko Haralanov
OK, this might be a stupid question: for the life of me, I can't find Python's freeze.py utility in the Python distribution that comes with FC6. Has it been removed from the distribution? Has it been removed from Python? I have FC6's python-2.4.4 rpms installed (python, python-devel, python-tools

Re: f---ing typechecking

2007-02-15 Thread Paul Rubin
"Paul McGuire" <[EMAIL PROTECTED]> writes: > Now what is it you want to do with args that you can't do with it as a > tuple? I'm ok with it being a tuple, but I'm not so wed to the notion that tuples are record structures. I think it would be lame to not be able to iterat through the arg list,

Re: f---ing typechecking

2007-02-15 Thread Paul McGuire
On Feb 15, 5:21 pm, Paul Rubin wrote: > How can there be a structure datatype with an unpredictable > number of members? > > It might have come across as a different question-sorry for any > confusion. This may be where the "tuple is like a struct" analogy isn't so good,

cmath, __float__ and __complex__

2007-02-15 Thread Mark Dickinson
I was a little surprised by the following behaviour: Python 2.5 (r25, Oct 30 2006, 20:50:32) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from cmath import sqrt >>> class NumericType1(object): ... def __float

Re: Method overloading?

2007-02-15 Thread placid
On Feb 16, 3:37 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-02-15, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > >> def multiAccept( argOfVariousTypes ): > >> if isinstance(argOfVariousTypes,int): > >> # treat like an int > >> elif isinstance(argOfVariousTypes,float): > >

Re: f---ing typechecking

2007-02-15 Thread Paul Rubin
Donn Cave <[EMAIL PROTECTED]> writes: > If t is a valid argument tuple for function f, then can t[1:] > also be a valid argument tuple for function f? > > For ordinary functions without special argument handling, no. > We know that without having to know anything about t, and not > much about f.

RE: Method overloading?

2007-02-15 Thread Delaney, Timothy (Tim)
Steven D'Aprano wrote: > This is an example of overloading: > > class Cheese(object): > def flavour(self): > return "tasty and scrumptious" > def colour(self): > return "yellow" > > Now we define a sub-class which overloads some methods: > > class BlueVein(Cheese): >

Re: f---ing typechecking

2007-02-15 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > My original comment was that tuples could be thought of more like > > C structs or Pascal records. > > Should f(*args) receive a list rather than a tuple arg? No, clearly not. Function

Tkinter __call__

2007-02-15 Thread Gigs_
from Tkinter import * from tkFileDialog import askopenfilename from tkColorChooser import askcolor from tkMessageBox import askquestion, showerror from tkSimpleDialog import askfloat demos = { 'Open': askopenfilename, 'Color': askcolor, 'Query': lambda: askquestion('Warning', '

Re: Pep 3105: the end of print?

2007-02-15 Thread massimo s.
Isn't the very concept of major releases (1.x, 2.x, 3.x) that they *can* be not backwards-compatible with previous releases? m. -- http://mail.python.org/mailman/listinfo/python-list

Re: filecmp.cmp() cache

2007-02-15 Thread Mattias Brändström
On Feb 15, 11:43 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Mattias Brändström wrote: > > Just one small tought/question. How likely am I to run into trouble > > because of this? I mean, by setting _cache to another value I'm > > mucking about in filecmp's implementation details. Is this generall

Re: Automated resizing of JPEG image + making slices?

2007-02-15 Thread Chuck Rhode
Michiel Sikma wrote this on Thu, 15 Feb 2007 22:21:34 +0100. My reply is below. -snip- > I initially hired someone to do it in PHP (don't bite, please :-) > but it seems that I forgot about one thing: the people updating the > site would have been able to upload a huge 30 MB JPEG image, which >

Re: filecmp.cmp() cache

2007-02-15 Thread Peter Otten
Mattias Brändström wrote: > On Feb 15, 5:56 pm, Peter Otten <[EMAIL PROTECTED]> wrote: >> You can clear the cache with >> >> filecmp._cache = {} >> >> as a glance into the filecmp module would have shown. > > You are right, a quick glance would have enlighten me. Next time I > will RTFS first. :-

Re: output to console and to multiple files

2007-02-15 Thread Matimus
On Feb 15, 8:51 am, "Matimus" <[EMAIL PROTECTED]> wrote: > On Feb 15, 7:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > On Feb 14, 5:10 pm, "goodwolf" <[EMAIL PROTECTED]> wrote: > > > > like this? > > > > class Writers (object): > > > > def __init__(self, *writers): > > >

Re: Pep 3105: the end of print?

2007-02-15 Thread Edward K Ream
> You could offer up a patch for Python 2.6 so that you can do:: >from __future__ import print_function This would only work for Python 2.6. Developers might want to support Python 2.3 through 2.5 for awhile longer :-) > why can't you use ``file.write()`` instead of ``print``? Precisely my

Re: Automated resizing of JPEG image + making slices?

2007-02-15 Thread Paul Rubin
Michiel Sikma <[EMAIL PROTECTED]> writes: > I know some Python (but not much since I've never actually written > that many things in it), and with some effort I could probably make a > simple image manipulator frontend in it, but only if I can find a > good library for doing the actual manipulation

Re: Pep 3105: the end of print?

2007-02-15 Thread Steven Bethard
Edward K Ream wrote: > The pros and cons of making 'print' a function in Python 3.x are well > discussed at: > > http://mail.python.org/pipermail/python-dev/2005-September/056154.html > > Alas, it appears that the effect of this pep would be to make it impossible > to use the name 'print' in a ba

Re: Automated resizing of JPEG image + making slices?

2007-02-15 Thread Steve Holden
Michiel Sikma wrote: > Hello everybody. > > I'm currently involved in a site building project in which we're > going to use the Google Maps API. The user will be able to browse the > site by looking over a really large image, similar to how Google Maps > itself works, except with the design

Re: filecmp.cmp() cache

2007-02-15 Thread Mattias Brändström
On Feb 15, 5:56 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > You can clear the cache with > > filecmp._cache = {} > > as a glance into the filecmp module would have shown. You are right, a quick glance would have enlighten me. Next time I will RTFS first. :-) > If you don't want to use the cache

ANNOUNCE: Mod_python 3.3.1

2007-02-15 Thread Gregory (Grisha) Trubetskoy
The Apache Software Foundation and The Apache HTTP Server Project are pleased to announce the 3.3.1 release of mod_python. Mod_python 3.3.1 is considered a stable release, suitable for production use. Mod_python is an Apache HTTP Server module that embeds the Python language interpreter within th

Automated resizing of JPEG image + making slices?

2007-02-15 Thread Michiel Sikma
Hello everybody. I'm currently involved in a site building project in which we're going to use the Google Maps API. The user will be able to browse the site by looking over a really large image, similar to how Google Maps itself works, except with the design of the site on the background r

Re: f---ing typechecking

2007-02-15 Thread Paul Rubin
[EMAIL PROTECTED] writes: > My original comment was that tuples could be thought of more like > C structs or Pascal records. Should f(*args) receive a list rather than a tuple arg? -- http://mail.python.org/mailman/listinfo/python-list

Pep 3105: the end of print?

2007-02-15 Thread Edward K Ream
The pros and cons of making 'print' a function in Python 3.x are well discussed at: http://mail.python.org/pipermail/python-dev/2005-September/056154.html Alas, it appears that the effect of this pep would be to make it impossible to use the name 'print' in a backward compatible manner. Indeed, i

Re: builtin set literal

2007-02-15 Thread Steven Bethard
Schüle Daniel wrote: > Steven Bethard schrieb: >> Schüle Daniel wrote: >>> it would be nice feature to have builtin literal for set type >>> maybe in P3 .. what about? >>> s = <1,2,3> >> >> In Python 3.0, this looks like:: >> >> s = {1,2,3} > > jepp, that looks not bad .. as in a mathe book. >

Re: Python code to do the *server* side of digest authentication?

2007-02-15 Thread Dan Lenski
On Feb 15, 3:19 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > I think that is because normally the web server does the authentication on the > server side. Why not use Apache to do the digest authentication? > > http://httpd.apache.org/docs/2.0/mod/mod_auth_digest.html > > -Larry Hi Larry, I'm so

Re: f---ing typechecking

2007-02-15 Thread skip
Sergey> posix.stat_result is CLASS, not regular tuple. >> I believe it morphed from being a tuple though. I wasn't suggesting >> that Sergey> It it morphed, the tuple nature of it is just history now. No, it is still full of tuple-fu: >>> import os >>> s = os.stat("/et

Re: Recursive calls and stack

2007-02-15 Thread Neil Cerutti
On 2007-02-15, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> I'm not sure what you mean. The above support is enough for >> tail recursion, mutual recursion, and any other tail call to >> be "optimized." > > I only want to say that tail *recursion* can be eliminated > trivially transforming the

Re: SystemError: _PyImport_FixupExtension: module _types not loaded

2007-02-15 Thread usenet1
> "works" in the sense that it prints something; but sys.path is incomplete, > it lacks site-packages and others (they are added by site.py). > It appears that you have installed Python on C:\Python25 and you build > your application executable into c:\temp\pytest\Debug - is that true? > Hmmm,

Re: Python code to do the *server* side of digest authentication?

2007-02-15 Thread Larry Bates
Dan Lenski wrote: > Hi all, > I've got a very simple HTML proxy server to access the web from my > cell phone (based on this code: http://www.okisoft.co.jp/esc/python/proxy/). > It's a very retarded phone that freezes if there's no Content-Length > header and some other circumstances, so I have to

Python code to do the *server* side of digest authentication?

2007-02-15 Thread Dan Lenski
Hi all, I've got a very simple HTML proxy server to access the web from my cell phone (based on this code: http://www.okisoft.co.jp/esc/python/proxy/). It's a very retarded phone that freezes if there's no Content-Length header and some other circumstances, so I have to tweak and modify the headers

Re: Recursive calls and stack

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 16:35:25 -0300, Neil Cerutti <[EMAIL PROTECTED]> escribió: > On 2007-02-15, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> En Thu, 15 Feb 2007 13:37:19 -0300, Neil Cerutti <[EMAIL PROTECTED]> >> escribió: >> >>> On 2007-02-15, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >>>

Re: Which Object Database would you recommend for cross platform application?

2007-02-15 Thread Bruno Desthuilliers
Thomas Ploch a écrit : > Hello folks, > > I am currently developing an open source Event Managment software > (events in real-life, like concerts, exhibitions etc. :-) ) using wx for > the GUI, and I need an Object database. "need" ? Why ? (I don't mean you shouldn't use one, just questionning

Re: Recursive calls and stack

2007-02-15 Thread Neil Cerutti
On 2007-02-15, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Thu, 15 Feb 2007 13:37:19 -0300, Neil Cerutti <[EMAIL PROTECTED]> > escribió: > >> On 2007-02-15, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >>> En Wed, 14 Feb 2007 10:41:53 -0300, Neil Cerutti <[EMAIL PROTECTED]> >>> escribió: >>

Re: f---ing typechecking

2007-02-15 Thread Ben Finney
James Stroud <[EMAIL PROTECTED]> writes: > I increasingly come to the decision to avoid tuples altogether > because, eventually, you end up turning them into lists anyway I don't. I end up extracting them to separate variables. >>> foo = (12, None, "spam") >>> # ... >>> # much code,

Re: reference data in a dictionary

2007-02-15 Thread Duncan Booth
"Wensui Liu" <[EMAIL PROTECTED]> wrote: > I know dict['row1'] will always work. but it will only get 1 row out > of the dict. is there anyway i can get multiple (>1) rows out of dict > by directly refeencing them, something like dict[['row1', 'row2']]. > [d[x] for x in ('row1', 'row2')] -- http:

Re: SystemError: _PyImport_FixupExtension: module _types not loaded

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 15:42:51 -0300, <[EMAIL PROTECTED]> escribió: > This is what I get: > > 'import site' failed; use -v for traceback > ['c:\\temp\\pytest\\Debug\\python25_d.zip', 'C:\\Python25\\Lib', 'C:\ > \Python25\\DLLs', 'C:\\Python25\\Lib\\lib-tk', '', 'c:\\temp\\pytest\ > \Debug'] > > In f

Re: rot13 in a more Pythonic style?

2007-02-15 Thread Andy Dingley
On 15 Feb, 17:55, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > Sounds more like a case for a parser/lexer wherein the emitted "code > tokens" are the "new style" identifiers... 8-(I'm trying not to think about that Fortunately I don't think it's _quite_ that bad. -- http://ma

RE engines and related matters

2007-02-15 Thread bearophileHUGS
>From Lambda the Ultimate blog, a link to an interesting article about such topics: http://swtch.com/~rsc/regexp/regexp1.html http://swtch.com/~rsc/regexp/ http://lambda-the-ultimate.org/node/2064 Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: SystemError: _PyImport_FixupExtension: module _types not loaded

2007-02-15 Thread usenet1
On Feb 12, 2:25 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 12 Feb 2007 15:44:36 -0300, <[EMAIL PROTECTED]> escribió: > > > I'm trying to write some "C" code that will run a python script that > > can in turn call some "C" functions. However I'm having a problem > > getting starte

Re: Recursive calls and stack

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 13:37:19 -0300, Neil Cerutti <[EMAIL PROTECTED]> escribió: > On 2007-02-15, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> En Wed, 14 Feb 2007 10:41:53 -0300, Neil Cerutti <[EMAIL PROTECTED]> >> escribió: >>> So the effect is that mutual recursion isn't actually any >>> hard

Re: TKinter newbie

2007-02-15 Thread Steve Holden
Gigs_ wrote: > Hi Im new to gui programming > > from Tkinter import * # get widget classes > from tkMessageBox import askokcancel # get canned std dialog > > class Quitter(Frame): # subclass our GUI > def __init__(self, parent=None)

Re: TKinter newbie

2007-02-15 Thread Peter Otten
Gigs_ wrote: > Hi Im new to gui programming > > from Tkinter import * # get widget classes > from tkMessageBox import askokcancel # get canned std dialog > > class Quitter(Frame): # subclass our GUI > def __init__(self, parent=None

Re: Which Object Database would you recommend for cross platform application?

2007-02-15 Thread johnf
Thomas Ploch wrote: > Hello folks, > > I am currently developing an open source Event Managment software > (events in real-life, like concerts, exhibitions etc. :-) ) using wx for > the GUI, and I need an Object database. Since this is the first time I > actually need doing this, I wondered if an

Which Object Database would you recommend for cross platform application?

2007-02-15 Thread Thomas Ploch
Hello folks, I am currently developing an open source Event Managment software (events in real-life, like concerts, exhibitions etc. :-) ) using wx for the GUI, and I need an Object database. Since this is the first time I actually need doing this, I wondered if anybody here could recommend on

TKinter newbie

2007-02-15 Thread Gigs_
Hi Im new to gui programming from Tkinter import * # get widget classes from tkMessageBox import askokcancel # get canned std dialog class Quitter(Frame): # subclass our GUI def __init__(self, parent=None): # constructor m

Re: re.search making no match == 0

2007-02-15 Thread Peter Otten
Lance Hoffmeyer wrote: > I have a search: > > VAR = re.search("PROVEN.*?\n[\sA-Za-z\(\)\/\-]+\d(.*?)\n.*?" , pcpT9, re.S > ).group(1) #.split()[1] > > that does not match (sometimes it will and sometimes it will not match) > > Traceback (most recent call last): > File "P:\Burke\TRACKERS\Orth

Re: list of range of floats

2007-02-15 Thread Steve
On Thu, 15 Feb 2007 05:57:45 -0800, Bart Ogryczak wrote: > On Feb 14, 6:12 pm, Steve <[EMAIL PROTECTED]> wrote: >> I'm trying to create a list range of floats and running into problems. > > I've tried it the easy way. Works. > map(float,range(a,b)) Thanks Bart, I'll give it a try Steve -- htt

Re: How to write a programe that include both pipe(low speed system call) and signal

2007-02-15 Thread Jordan
On Feb 15, 2:51 am, Marco <[EMAIL PROTECTED]> wrote: > Hi, > I have know that signal will interrupt some kind low speed system > call like pipe. But how to design a program that both support signal > and pipe? > > I have a mplayer.py to play movie via os.popen2() and mplayer > slave mode. A

Re: builtin set literal

2007-02-15 Thread Schüle Daniel
Steven Bethard schrieb: > Schüle Daniel wrote: >> Hello, >> >> lst = list((1,2,3)) >> lst = [1,2,3] >> >> t = tupel((1,2,3)) >> t = (1,2,3) >> >> s = set((1,2,3)) >> s = ... >> >> it would be nice feature to have builtin literal for set type >> maybe in P3 .. what about? >> s = <1,2,3> > > In Pyth

Re: builtin set literal

2007-02-15 Thread Schüle Daniel
faulkner schrieb: > On Feb 14, 11:55 am, Schüle Daniel <[EMAIL PROTECTED]> wrote: >> Hello, >> >> lst = list((1,2,3)) >> lst = [1,2,3] >> >> t = tupel((1,2,3)) >> t = (1,2,3) >> >> s = set((1,2,3)) >> s = ... >> >> it would be nice feature to have builtin literal for set type >> maybe in P3 .. what

Re: The Python interactive interpreter has no command history

2007-02-15 Thread Laurent Rahuel
Hi, You need to have readline installed. Laurent ThomasC wrote: > Hello, > > How to configure Python2.5's interactive interpreter to get command > history ? > > I always got ^[[A and ^[[B . > > Thank you !! > > Thomas# -- http://mail.python.org/mailman/listinfo/python-list

Re: The Python interactive interpreter has no command history

2007-02-15 Thread Eduardo \"EdCrypt\" O. Padoan
> Hello, > > How to configure Python2.5's interactive interpreter to get command > history ? > > I always got ^[[A and ^[[B . > Are you using Ubuntu? The last comes with 2.4.x and 2.5. This only occurs on 2.5. This happens when you compile Python with libreadline installed, AFAIK. FIll a bug in th

Re: multiple inheritance of a dynamic list of classes?

2007-02-15 Thread Neil Cerutti
On 2007-02-15, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Feb 13, 9:14 am, Peter Otten <[EMAIL PROTECTED]> wrote: >> "Avoid inheritance" would be almost as justified :-) > > In other words, if you are inheriting just two or three methods > it may works, but when you start having dozens of me

re.search making no match == 0

2007-02-15 Thread Lance Hoffmeyer
Hey all, I have a search: VAR = re.search("PROVEN.*?\n[\sA-Za-z\(\)\/\-]+\d(.*?)\n.*?" , pcpT9, re.S ).group(1) #.split()[1] that does not match (sometimes it will and sometimes it will not match) Traceback (most recent call last): File "P:\Burke\TRACKERS\Ortho-McNeil\Automation\Wave3\test.

Re: multiple inheritance of a dynamic list of classes?

2007-02-15 Thread Michele Simionato
On Feb 13, 9:14 am, Peter Otten <[EMAIL PROTECTED]> wrote: > "Avoid inheritance" would be almost as justified :-) Yep, I strongly agree. Inheritance is overrated, as Guido says. For what concerns the debate of multiple vs single inheritance, yes it is true that multiple inheritance is worse, but e

Re: filecmp.cmp() cache

2007-02-15 Thread Peter Otten
Mattias Brändström wrote: > I have a question about filecmp.cmp(). The short code snippet blow > does not bahave as I would expect: > > import filecmp > > f0 = "foo.dat" > f1 = "bar.dat" > > f = open(f0, "w") > f.write("1:2") > f.close() > > f = open(f1, "w") > f.write("1:2") > f.close() > >

Re: output to console and to multiple files

2007-02-15 Thread Matimus
On Feb 15, 7:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Feb 14, 5:10 pm, "goodwolf" <[EMAIL PROTECTED]> wrote: > > > > > like this? > > > class Writers (object): > > > def __init__(self, *writers): > > self.writers = writers > > > def write(self, string): > >

Re: Recursive calls and stack

2007-02-15 Thread Neil Cerutti
On 2007-02-15, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Wed, 14 Feb 2007 10:41:53 -0300, Neil Cerutti <[EMAIL PROTECTED]> > escribió: >> So the effect is that mutual recursion isn't actually any >> harder. > > But some kind of language support is required in this case. At > least I don'

Re: Method overloading?

2007-02-15 Thread Neil Cerutti
On 2007-02-15, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> def multiAccept( argOfVariousTypes ): >> if isinstance(argOfVariousTypes,int): >> # treat like an int >> elif isinstance(argOfVariousTypes,float): >> # treat like a float >> elif isinstance(argOfVariousTypes,(l

Re: f---ing typechecking

2007-02-15 Thread Neil Cerutti
On 2007-02-15, Paul McGuire <[EMAIL PROTECTED]> wrote: > Since tuples are immutable, I think of them as fixed data objects with > some simple sequential structure, as opposed to lists which are much > more dynamically accessible/updateable data containers. Me, too. There are plenty of things tha

Re: f---ing typechecking

2007-02-15 Thread Neil Cerutti
On 2007-02-14, Farshid Lashkari <[EMAIL PROTECTED]> wrote: > Szabolcs Nagy wrote: > L=[1] > L.extend((1,)) > L >> [1, 1] > > Are list.extend() and list concatenation supposed to behave > differently? I always thought concatenation was just shorthand > for calling extend(). They are dif

The Python interactive interpreter has no command history

2007-02-15 Thread ThomasC
Hello, How to configure Python2.5's interactive interpreter to get command history ? I always got ^[[A and ^[[B . Thank you !! Thomas# -- http://mail.python.org/mailman/listinfo/python-list

Re: output to console and to multiple files

2007-02-15 Thread [EMAIL PROTECTED]
On Feb 14, 6:52 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 14 Feb 2007 19:28:34 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > I'm looking for a way to output stdout/stderr (from a subprocess or > > spawn) to screen and to at least two different files. > > Look at

Re: rot13 in a more Pythonic style?

2007-02-15 Thread [EMAIL PROTECTED]
On Feb 14, 11:46 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 14 Feb 2007 14:04:17 -0300, Andy Dingley <[EMAIL PROTECTED]> > escribió: > > > I still don't understand what a lambda is _for_ in Python. I know what > > they are, I know what the alternatives are, but I still haven't fou

filecmp.cmp() cache

2007-02-15 Thread Mattias Brändström
Hello! I have a question about filecmp.cmp(). The short code snippet blow does not bahave as I would expect: import filecmp f0 = "foo.dat" f1 = "bar.dat" f = open(f0, "w") f.write("1:2") f.close() f = open(f1, "w") f.write("1:2") f.close() print "cmp 1: " + str(filecmp.cmp(f0, f1, False)) f

Re: output to console and to multiple files

2007-02-15 Thread [EMAIL PROTECTED]
On Feb 14, 5:10 pm, "goodwolf" <[EMAIL PROTECTED]> wrote: > like this? > > class Writers (object): > > def __init__(self, *writers): > self.writers = writers > > def write(self, string): > for w in self.writers: > w.write(string) > > def flush(self): >

Re: Method overloading?

2007-02-15 Thread Grant Edwards
On 2007-02-15, placid <[EMAIL PROTECTED]> wrote: >> > Is it possible to be able to do the following in Python? >> >> > class Test: >> > def __init__(self): >> > pass >> >> > def puts(self, str): >> > print str >> >> > def puts(self, str,str2): >> > print str,str

Re: f---ing typechecking

2007-02-15 Thread skip
Sergey> posix.stat_result is CLASS, not regular tuple. I believe it morphed from being a tuple though. I wasn't suggesting that there is some other way to approximate records. I was trying to demonstrate the use of a tuple as a record. It eventually became so compelling that a new struct_t

Re: threading and multicores, pros and cons

2007-02-15 Thread skip
Maric> Le mercredi 14 février 2007 16:24, [EMAIL PROTECTED] a écrit : >> "Some time back, a group did remove the GIL from the python core, and >> implemented locks on the core code to make it threadsafe. Well, the >> problem was that while it worked, the necessary locks it made sin

Re: builtin set literal

2007-02-15 Thread Steven Bethard
Schüle Daniel wrote: > Hello, > > lst = list((1,2,3)) > lst = [1,2,3] > > t = tupel((1,2,3)) > t = (1,2,3) > > s = set((1,2,3)) > s = ... > > it would be nice feature to have builtin literal for set type > maybe in P3 .. what about? > s = <1,2,3> In Python 3.0, this looks like:: s = {1,2

list of strings-newline

2007-02-15 Thread kavitha thankaian
Hi i have a list as follows list="a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3, I would like to print as a1,b1,c1,d1, a2,b2,c2,d2, a3,b3,c3,d3, and then i would like to delete the comma at the end,,say like,, a1,b1,c1,d1 a2,b2,c2,d2 a3,b3,c3,d3 (its always

Re: AUX File Writing Error

2007-02-15 Thread Gabriel Genellina
En Thu, 15 Feb 2007 11:34:53 -0300, John Machin <[EMAIL PROTECTED]> escribió: >> > Probably not. AUX, CON, NUL, PRN, LPT, COM1, COM2 etc (with or without >> > an extension) are reserved in Windows for specific devices for >> > compatibility with MS-DOS 1.00 programs, which did that for >> > comp

Re: f---ing typechecking

2007-02-15 Thread Marc
On 15 feb, 07:21, James Stroud <[EMAIL PROTECTED]> wrote: > I guess we differ on what is obvious. This seems obvious to me: > > [1] + (1,) => [1, 1] > (1,) + [1] => (1, 1) > > simply becuase the operand on the left should take precendence because > its "__add__" is called and its "__add__" returns

Re: AUX File Writing Error

2007-02-15 Thread Jean-Paul Calderone
On Thu, 15 Feb 2007 10:13:17 -0300, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >En Thu, 15 Feb 2007 03:34:59 -0300, John Machin <[EMAIL PROTECTED]> >escribió: > >> On Feb 15, 4:03 pm, [EMAIL PROTECTED] wrote: >>> Is there any way I can create an "AUX.csv" file without the error? >> >> Probably no

Re: AUX File Writing Error

2007-02-15 Thread John Machin
On Feb 16, 12:13 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 15 Feb 2007 03:34:59 -0300, John Machin <[EMAIL PROTECTED]> > escribió: > > > On Feb 15, 4:03 pm, [EMAIL PROTECTED] wrote: > >> Is there any way I can create an "AUX.csv" file without the error? > > > Probably not. AUX, C

  1   2   >