Biggles on Windows with python2.5

2008-04-04 Thread Charlie
Has anyone installed a version of biggles on Windows with python 2.5? The Martin Lamar version for python 2.3 was a big help, but I finally upgraded to python 2.5 and I am having trouble with the biggles build. Thanks, Charlie -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-04 Thread Kay Schluehr
On 2 Apr., 06:38, Aldo Cortesi <[EMAIL PROTECTED]> wrote: > Hi Ben, > > > > We are happy to announce the first release of Pry, a unit testing > > > framework. > > > Thanks for the announcement, and for the software. > > > If Pry is already incompatible with xUnit (i.e. Python's 'unittest'), > > cou

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Alex9968
Gabriel Genellina wrote: > En Fri, 04 Apr 2008 15:46:48 -0300, Alex9968 <[EMAIL PROTECTED]> > escribió: > >> Nebur wrote: >> > > >>> No, I can't reproduce it, and I don't know whom to blame (Pydev? >>> Eclipse ? The File System ? A Virus that only 2 times in half a year >>> deletes a s

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-04 Thread skanemupp
am i not doing that then? did u look at the code? where do i add the bind if this: btnDisplay = Button(self, text="1", command=self.Display) btnDisplay.grid(row=3, column=0, padx=5, pady=5) is not enough? def Display(self, event_obj): button = event_obj.widget text = but

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-04 Thread Gabriel Genellina
En Sat, 05 Apr 2008 02:02:45 -0300, <[EMAIL PROTECTED]> escribió: > one thing i dont rally get, i ahve to add my_button.bind() somewhere? > i changed the stuff u said though and i get this error(the program > executes though and i can press the buttons): Either use command, or bind. command requi

Re: variable scope in list comprehensions

2008-04-04 Thread Piotr Sobolewski
Duncan Booth wrote: > For the OP, in some languages (e.g. C) 'for' loops typically calculate > the value of the loop control variable based on some expression > involving the previous value. Python isn't like that. In Python the data > used to compute the next value is stored internally: you canno

Re: Pickle to Source - Gabriel Genellina?

2008-04-04 Thread Gabriel Genellina
En Fri, 04 Apr 2008 22:47:47 -0300, $P!D3R DelSol <[EMAIL PROTECTED]> escribió: > I found this 3 year old message asking about doing the same exact thing > I am trying to do. This is one wheel I REALLY don't want to re-invent. > Can anyone point me to code that does this? > >> I want to con

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-04 Thread skanemupp
On 5 Apr, 07:02, [EMAIL PROTECTED] wrote: > On 5 Apr, 05:57, [EMAIL PROTECTED] wrote: > > > > > On 5 Apr, 05:26, 7stud <[EMAIL PROTECTED]> wrote: > > > > On Apr 4, 7:06 pm, [EMAIL PROTECTED] wrote: > > > > > 1st question: > > > > > when i run this program 1 will be printed into the interpreter when

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-04 Thread skanemupp
On 5 Apr, 05:57, [EMAIL PROTECTED] wrote: > On 5 Apr, 05:26, 7stud <[EMAIL PROTECTED]> wrote: > > > > > On Apr 4, 7:06 pm, [EMAIL PROTECTED] wrote: > > > > 1st question: > > > > when i run this program 1 will be printed into the interpreter when i > > > run it BUT without me clicking the actual but

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-04 Thread skanemupp
On 5 Apr, 05:26, 7stud <[EMAIL PROTECTED]> wrote: > On Apr 4, 7:06 pm, [EMAIL PROTECTED] wrote: > > > > > 1st question: > > > when i run this program 1 will be printed into the interpreter when i > > run it BUT without me clicking the actual button. > > when i then click the button "1", nothing hap

Re: TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-04 Thread 7stud
On Apr 4, 7:06 pm, [EMAIL PROTECTED] wrote: > 1st question: > > when i run this program 1 will be printed into the interpreter when i > run it BUT without me clicking the actual button. > when i then click the button "1", nothing happens. > > obv i dont want any output when i dont push the button b

Re: Help me on function definition

2008-04-04 Thread Alan Isaac
aeneng wrote: > WHAT IS WRONG WITH MY CODE? > def cross(u,v) Missing colon. hth, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-04 Thread llothar
Thanks, my question was not how can i make python to it find. I don't have a problem. My question was: Why does setup.py generated sometimes a pyd and sometimes a so file? There must be a rule behind this. Unforunately setup.py is not well documented. Here i mean i need a specification not a tut

Re: ANN: pry unit testing framework

2008-04-04 Thread Aldo Cortesi
Hi Jim, Thus spake j vickroy ([EMAIL PROTECTED]): > > We are happy to announce the first release of Pry, a unit testing framework. > > > > Features > > > > > > * Built-in coverage analysis, profiling, and quick-and-dirty > > benchmarking > > * Assertion-based tests - no ugly

Re: Python-by-example - new online guide to Python Standard Library

2008-04-04 Thread ivan
Very cool. Have you thought about making a printable version that doesn't wrap any lines that shouldn't be and has page breaks at good spots? -- ivan -- http://mail.python.org/mailman/listinfo/python-list

Pickle to Source - Gabriel Genellina?

2008-04-04 Thread $P!D3R DelSol
Hello I found this 3 year old message asking about doing the same exact thing I am trying to do. This is one wheel I REALLY don't want to re-invent. Can anyone point me to code that does this? Thanks Ivan ( sunsp1der at yahoo dot com) > I want to convert from pickle format to python source code

Re: having list attribute to track max size

2008-04-04 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Lets say I have a dynamic list class (may be extended from list), | where I add and remove items during program. | a = [] | a.append(1) | | | I am trying to find is there easy way keep track of 'maximum size of | list reached" | s

TKinter, buttonwidget response problem(1) and all btns the same size(2)!

2008-04-04 Thread skanemupp
1st question: when i run this program 1 will be printed into the interpreter when i run it BUT without me clicking the actual button. when i then click the button "1", nothing happens. obv i dont want any output when i dont push the button but i want it when i do. what am i doing wrong here?

455 bloqueador veicular sem mensalidades - http://bloqueadorgsm.vilabol.uol.com.br 4555333208173502757727274

2008-04-04 Thread bloqueador sem mensalidade
Bloqueador veícluar com tecnologia gsm - Sem mensalidades Tenha toda segurança para seu carro com um preço justo. Apenas R$ 299,00 ( sem mensalidades ) http://bloqueadorgsm.vila.bol.com.br/ Compare e Compre. Rastreador de Veículo Rastreadores de Veículos Rastreador GPS Rastreadores GPS R

Re: Nonlinear least square problem

2008-04-04 Thread Michael Press
In article <[EMAIL PROTECTED]>, Uwe Kotyczka <[EMAIL PROTECTED]> wrote: > Hallo, sorry for multiposting, but I am really looking > for some hint to solve my problem. And no, I don't > use Matlab, but maybe the matlab people have an idea > nevertheless. No apology required, since you seem to hav

Re: Is there any way to say ignore case with "in"?

2008-04-04 Thread 7stud
On Apr 4, 2:43 pm, [EMAIL PROTECTED] wrote: > Is there any way in python to say > >     if string1 in string2: >         > > ignoring the case of string1 and string2? > > I know I could use:- > >     if lower(string1) in lower(string2): >         > > but it somehow feels there ought to be an easi

Re: Newbie Question - Overloading ==

2008-04-04 Thread Lie
On Apr 1, 2:22 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> Surely an A isn't equal to every other object which just happens to > >> have the same attributes 'a' and 'b'? > > > And why not ?-) > > >> I would have thoughts the tests want to be > >

Re: Python2.5 and MySQLdb

2008-04-04 Thread Carsten Haese
On Apr 4, 5:06 pm, writeson <[EMAIL PROTECTED]> wrote: > It > generates a huge lists of errors and warnings from gcc when I run the > python2.5 setup.py build script that comes with the tar file. Anyone > have any suggestions? I suggest you post a couple of those error messages here, so that we ca

Re: Importing a 3rd Party windows DLL for use within th Python

2008-04-04 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, > > I have recently started learing how to code/script in Python which I > am realy enjoying. I am new to this game as my background is RF/HW > design engineer so coding is not my first skillset , so please bare > with me! > > I am a little lost with how to procede

Re: Importing a 3rd Party windows DLL for use within th Python

2008-04-04 Thread sturlamolden
On Apr 5, 12:58 am, [EMAIL PROTECTED] wrote: > Is it possible for someone to provide the information on the steps > necessary to access this DLL and treat it like any other pyd library? > Maybe there is already a tutorial available for performing this task? > Is this task straight forward? Short

Importing a 3rd Party windows DLL for use within th Python

2008-04-04 Thread lee . walczak
Hi, I have recently started learing how to code/script in Python which I am realy enjoying. I am new to this game as my background is RF/HW design engineer so coding is not my first skillset , so please bare with me! I am a little lost with how to procede on this problem. I need to write a pytho

Re: displaying pgm file in python

2008-04-04 Thread Gabriel Genellina
En Fri, 04 Apr 2008 19:07:59 -0300, wilson <[EMAIL PROTECTED]> escribió: > i converted an 8bit rgb .jpg file into .pgm using adobe photoshop and > a plugin from > http://photoshop.pluginsworld.com/plugins/adobe/362/richard-rosenman/portable-pixmap-importer-exporter.html > I want to check if th

displaying pgm file in python

2008-04-04 Thread wilson
i converted an 8bit rgb .jpg file into .pgm using adobe photoshop and a plugin from http://photoshop.pluginsworld.com/plugins/adobe/362/richard-rosenman/portable-pixmap-importer-exporter.html I want to check if this file can be properly displayed. Image opening and show() in PIL fails to do it so

Re: python bisect questions

2008-04-04 Thread Gabriel Genellina
En Fri, 04 Apr 2008 18:08:57 -0300, <[EMAIL PROTECTED]> escribió: >> b) Define a function to extract a "key" from your items such that items >>   >> compare the same as their keys. For example, key(x) -> x.lower() may be >>   >> used to compare text case-insensitively. >> Then, use a tuple (ke

Re: Easy-to-install-and-use scientific graphics (plotting) package for Python 2.5.1 on Linux Ubuntu 7.1

2008-04-04 Thread Joshua Kugler
> Is there an easy scientific graphics (plotting) package for Python > 2.5.1 running on Ubuntu Linux 7.1 ("Gutsy Gibbon")? > > A few years ago I used PyLab (a MatLab-like plotting module for > Python) on a Windows machine, but I don't know if there is a similar > easy-to-install-and-use Python 2.5

Re: Python2.5 and MySQLdb

2008-04-04 Thread Jeffrey Froman
writeson wrote: > I'm running a CentOS 4 server and have installed Python2.5 on there > (it's our development machine) in preparation of moving to Python2.5 > everywhere. All looks good with our code and 2.5, except where it > comes to MySQLdb, I can't get that to install on the machine. It > gene

Re: python bisect questions

2008-04-04 Thread ankitks . mital
> > b) Define a function to extract a "key" from your items such that items   > compare the same as their keys. For example, key(x) -> x.lower() may be   > used to compare text case-insensitively. > Then, use a tuple (key, value) instead of the bare value. When extracting   > items from the queue,

Re: Tokenizer inconsistency wrt to new lines in comments

2008-04-04 Thread George Sakkis
On Apr 4, 4:38 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > >> If it was a bug it has to violate a functional requirement. I can't > >> see which one. > > > Perhaps it's not a functional requirement but it came up as a real > > problem on a source colorizer I use. I count o

Re: Is there any way to say ignore case with "in"?

2008-04-04 Thread Torsten Bronger
Hallöchen! [EMAIL PROTECTED] writes: > Is there any way in python to say > > if string1 in string2: > > > ignoring the case of string1 and string2? You can "normalise" both first, i.e. converting to lower case. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Python2.5 and MySQLdb

2008-04-04 Thread writeson
Hi all, I'm running a CentOS 4 server and have installed Python2.5 on there (it's our development machine) in preparation of moving to Python2.5 everywhere. All looks good with our code and 2.5, except where it comes to MySQLdb, I can't get that to install on the machine. It generates a huge lists

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Fabio Zadrozny
On Fri, Apr 4, 2008 at 5:05 PM, Nebur <[EMAIL PROTECTED]> wrote: > Yes. Linux viruses are rare but useful :-) > Well, I don't think the problem a very dangerous one. The Pydev/ > Eclipse was used for much more than a year nearly daily and > intensively. The strange effect is very rare,obviously

Re: Is there any way to say ignore case with "in"?

2008-04-04 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Is there any way in python to say > > if string1 in string2: > > > ignoring the case of string1 and string2? if string1.lower() in string2.lower(): ... (there's no case-insensitive version of the "in" operator in stock Python) -- http:

having list attribute to track max size

2008-04-04 Thread ankitks . mital
Lets say I have a dynamic list class (may be extended from list), where I add and remove items during program. a = [] a.append(1) I am trying to find is there easy way keep track of 'maximum size of list reached" so for example len(a) goes from 0->3->4->3 If I call a.max_size_ever(), I will g

Re: Self in Interactive Interpreter

2008-04-04 Thread Fredrik Lundh
kj7ny wrote: > For years it has been a slight annoyance that every time I wanted to > test a snippet of code from a class by running it in the interactive > interpreter, I had to remove all of the self. instances from the > code. After I got it working correctly, I had to put all the self.'s > ba

Is there any way to say ignore case with "in"?

2008-04-04 Thread tinnews
Is there any way in python to say if string1 in string2: ignoring the case of string1 and string2? I know I could use:- if lower(string1) in lower(string2): but it somehow feels there ought to be an easier (tidier?) way. -- Chris Green -- http://mail.python.org/m

Re: Python in High School

2008-04-04 Thread Aahz
In article <[EMAIL PROTECTED]>, Jan Claeys <[EMAIL PROTECTED]> wrote: > >There are at least 3 books about game programming in python: > STAY AWAY Speaking as half of the tech-editing team for this book (the formal title

Re: Tokenizer inconsistency wrt to new lines in comments

2008-04-04 Thread Fredrik Lundh
George Sakkis wrote: >> If it was a bug it has to violate a functional requirement. I can't >> see which one. > > Perhaps it's not a functional requirement but it came up as a real > problem on a source colorizer I use. I count on newlines generating > token.NEWLINE or tokenize.NL tokens in order

Re: Tokenizer inconsistency wrt to new lines in comments

2008-04-04 Thread George Sakkis
On Apr 4, 3:18 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: > I guess it's just an artifact of handling line continuations within > expressions where a different rule is applied. For compilation > purposes both the newlines within expressions as well as the comments > are irrelevant. There are even

Self in Interactive Interpreter

2008-04-04 Thread kj7ny
Hope this hasn't been posted hundreds of times. I have never seen it before, but could have missed it. For years it has been a slight annoyance that every time I wanted to test a snippet of code from a class by running it in the interactive interpreter, I had to remove all of the self. instances f

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Nebur
Yes. Linux viruses are rare but useful :-) Well, I don't think the problem a very dangerous one. The Pydev/ Eclipse was used for much more than a year nearly daily and intensively. The strange effect is very rare,obviously (plus the chance that it's in my brain, as I mentioned ;-D ) so you probably

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Gabriel Genellina
En Fri, 04 Apr 2008 15:46:48 -0300, Alex9968 <[EMAIL PROTECTED]> escribió: > Nebur wrote: >> No, I can't reproduce it, and I don't know whom to blame (Pydev? >> Eclipse ? The File System ? A Virus that only 2 times in half a year >> deletes a single file I'm busy working with, and seems to do no

Re: Any fancy grep utility replacements out there?

2008-04-04 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Thanks to everyone who responded, and sorry for my late response. > > Grin seems like the perfect solution for me. I finally had a chance > to download it and play with it today. It's great. > > Robert...you were kind enough to ask if I had any requests. Just the > o

Re: Any fancy grep utility replacements out there?

2008-04-04 Thread Robert Kern
Floris Bruynooghe wrote: > I tried to find something similar a while ago and found ack[1]. I do > realise it's written in perl but it does the job nicely. Never needed > to search in zipfiles though, just unzipping them in /tmp would always > work... Yup, I used ack for a little while before wri

Re: Classes in modules

2008-04-04 Thread Gabriel Genellina
En Thu, 03 Apr 2008 18:00:54 -0300, <[EMAIL PROTECTED]> escribió: > Yeah, I was a little embarrassed putting my code up to be examined. > Thanks for the reply. I typed up some classes, but I seemed to have > run into some more problems. One of the classes keeps getting an > error that it can't p

Re: RELEASED Python 2.6a2 and 3.0a4

2008-04-04 Thread Martin v. Löwis
> The Windows x86 MSI installer is missing for both 2.6 and 3.0. And likely will continue to do so for some time. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Examples using msilib to build windows installers

2008-04-04 Thread Martin v. Löwis
> It would appear to me that the msilib library included with standard > python 2.5 would allow be to do this. I found the source code that > builds the python distrubition installer packages, but I was wondering > if there were other examples that I can learn from. Actually, the installer itself

Re: Tokenizer inconsistency wrt to new lines in comments

2008-04-04 Thread Kay Schluehr
On 4 Apr., 18:22, George Sakkis <[EMAIL PROTECTED]> wrote: > The tokenize.generate_tokens function seems to handle in a context- > sensitive manner the new line after a comment: > > >>> from StringIO import StringIO > >>> from tokenize import generate_tokens > > >>> text = ''' > > ... # hello world

Re: generator functions: why won't this work?

2008-04-04 Thread Arnaud Delobelle
On Apr 2, 11:04 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 02 Apr 2008 14:11:30 -0300, <[EMAIL PROTECTED]> escribió: > > > On Apr 1, 10:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> En Tue, 01 Apr 2008 23:56:50 -0300, <[EMAIL PROTECTED]> escribió: > > >>    yield

Re: Looking for Advanced Python Tutorials

2008-04-04 Thread lbonafide
On Apr 4, 6:58 am, [EMAIL PROTECTED] wrote: > I was wondering if anyone knew of some online (free if possible) > advanced tutorials, especially ones that provides tasks and ideas for > small projects. The issue for myself is I want to improve my python > programming level, and my ability to program

Re: generator functions: why won't this work?

2008-04-04 Thread Robert Lehmann
On Wed, 02 Apr 2008 19:04:30 -0300, Gabriel Genellina wrote: > En Wed, 02 Apr 2008 14:11:30 -0300, <[EMAIL PROTECTED]> escribió: > >> On Apr 1, 10:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >>> En Tue, 01 Apr 2008 23:56:50 -0300, <[EMAIL PROTECTED]> >>> escribió: >>> >>>    yield *iter

Training course in Los Angeles?

2008-04-04 Thread Student
Is there a training course in advanced-level Python in the Los Angeles area? We are looking for web-development in particular. -- http://mail.python.org/mailman/listinfo/python-list

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Alex9968
Nebur wrote: > No, I can't reproduce it, and I don't know whom to blame (Pydev? > Eclipse ? The File System ? A Virus that only 2 times in half a year > deletes a single file I'm busy working with, and seems to do nothing > else? Myself beeing schizophrenic ??) A virus created to remind you 2 times

Re: collecting results in threading app

2008-04-04 Thread George Sakkis
On Apr 4, 1:54 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Apr 4, 11:27 am, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > > There is an approach in which i can 'sum' after *any* thread finish? > > > Could a Queue help me there? > > Yes, you can push each result to a queue and have the main thr

Re: collecting results in threading app

2008-04-04 Thread George Sakkis
On Apr 4, 11:27 am, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > John Nagle wrote: > >Gerardo Herzig wrote: > > >>Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant > >>figure out which one. > > >>This little peace of code executes a 'select count(*)' over every table > >>in

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Nebur
> Are you using svn? I did have a problem once related to that (but it's Hi Fabio, No, there's no version control plugin. I use Mercurial, but externally only. I've considered a problem with version control, too. But all external reasons (file sytem, virus, version control) seem unplausible becau

Re: collecting results in threading app

2008-04-04 Thread John Nagle
Gerardo Herzig wrote: > John Nagle wrote: > >> Gerardo Herzig wrote: > Thanks John, that certanly works. According to George's suggestion, i > will take a look to the Queue module. > One question about > > for mythread in mythreads:# for all threads > mythread.join()

Re: troll poll

2008-04-04 Thread Aahz
In article <[EMAIL PROTECTED]>, alex23 <[EMAIL PROTECTED]> wrote: > >That is awesome, thank you so much for posting this. The usual >response to complaining about the lack of a killfile for Google Groups >has been "use a decent client", but as I'm constantly moving between >machines having a consi

Re: developing web spider

2008-04-04 Thread Kenji Noguchi
Attached is a essence of my crawler. This collects tag in a given URL HTML parsing is not a big deal as "tidy" does all for you. It converts a broken HTML to a valid XHTML. From that point there're wealth of XML libraries. Just write whatever you want such as element handler. I've extended it

Re: Looking for Advanced Python Tutorials

2008-04-04 Thread 3c273
Thanks for this. Louis "Ravi Kotecha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Apr 4, 12:58 pm, [EMAIL PROTECTED] wrote: > > I was wondering if anyone knew of some online (free if possible) > > advanced tutorials, especially ones that provides tasks and ideas for > > small

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-04 Thread Fredrik Lundh
llothar wrote: > On windows everything is '.pyd' but there seems to be two ways to get > this on unix? If you attempt to import the module "spam" on Windows, Python looks for "spam.dll" and "spam.pyd" (in addition to "spam.py/spam.pyw/spam.pyc" etc) On most Unix platforms, Python looks for "spa

Re: *.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Fabio Zadrozny
Hi Nebur, Are you using svn? I did have a problem once related to that (but it's more related to the svn plugin than to pydev)... I think that for some reason the undo seems to be mapped to a creation of a file that came from svn (I don't remember exactly how to reproduce it, but I do remember it

Tokenizer inconsistency wrt to new lines in comments

2008-04-04 Thread George Sakkis
The tokenize.generate_tokens function seems to handle in a context- sensitive manner the new line after a comment: >>> from StringIO import StringIO >>> from tokenize import generate_tokens >>> >>> text = ''' ... # hello world ... x = ( ... # hello world ... ) ... ''' >>> >>> for t in generate_tok

Re: Is there an official way to add methods to an instance?

2008-04-04 Thread Charles Mason
And for such a behavior they've termed "monkeying" Thus, the coinage "Monkeypatching" for what you want to do: http://mail.python.org/pipermail/python-dev/2008-January/076194.html There are a group of people who think "monkeypatching is destroying ruby." You still probably should avoid it for p

UML reverse engineering

2008-04-04 Thread pierre-yves . dupont
Hello, Do you know a free software witch can compute a UML class diagram from a python code. I tested many free UML softwares like BoUML, ArgoUML, Dia, PNSource (not found), UMLet and others ... But I didn't found what I needed. -- Pierre-Yves Dupont-- http://mail.python.org/mailman/listinf

Re: collecting results in threading app

2008-04-04 Thread Gerardo Herzig
John Nagle wrote: >Gerardo Herzig wrote: > > >>Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant >>figure out which one. >> >>This little peace of code executes a 'select count(*)' over every table >>in a database, one thread per table: >> >>class TableCounter(threading

*.py source file surprisingly deleted with Pydev/Eclipse. Who else experienced this ?

2008-04-04 Thread Nebur
Hi folks developing with Pydev/Eclipse, this is the second time in about half a year that the following surprise bites me: I've switched between some files in Pydev/Eclipse using the FileNavigator, and when I want to go back to my last-edited *.py file, it is missing. No more in the FileNavigator

Re: collecting results in threading app

2008-04-04 Thread George Sakkis
On Apr 4, 10:42 am, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant > figure out which one. > > This little peace of code executes a 'select count(*)' over every table > in a database, one thread per table: > > class TableCount

Re: Is there an official way to add methods to an instance?

2008-04-04 Thread John Nagle
Bruno Desthuilliers wrote: > Paul Rubin a écrit : >> Brian Vanderburg II <[EMAIL PROTECTED]> writes: >>> I've checked out some ways to get this to work. I want to be able to >>> add a new function to an instance of an object. >> >> Ugh. Avoid that if you can. > > Why so ? OO is about objects,

Re: collecting results in threading app

2008-04-04 Thread John Nagle
Gerardo Herzig wrote: > Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant > figure out which one. > > This little peace of code executes a 'select count(*)' over every table > in a database, one thread per table: > > class TableCounter(threading.Thread): >def __init_

Re: Nonlinear least square problem

2008-04-04 Thread Peter Spellucci
In article <[EMAIL PROTECTED]>, Uwe Kotyczka <[EMAIL PROTECTED]> writes: >Hallo, sorry for multiposting, but I am really looking >for some hint to solve my problem. And no, I don't >use Matlab, but maybe the matlab people have an idea >nevertheless. > >I have to solve a nonlinear least squa

collecting results in threading app

2008-04-04 Thread Gerardo Herzig
Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant figure out which one. This little peace of code executes a 'select count(*)' over every table in a database, one thread per table: class TableCounter(threading.Thread): def __init__(self, conn, table): self.co

Re: Unicode conversion problem (codec can't decode)

2008-04-04 Thread Eric S. Johansson
> > Almost there: use string-escape instead; it takes a byte string and > returns another byte string in ASCII. perfect. Exactly what I wanted. thank you so very much. > >> I really don't care about the character set used. I'm looking for a >> matched set >> of operations that converts t

Re: Looking for Advanced Python Tutorials

2008-04-04 Thread André
On Apr 4, 8:58 am, [EMAIL PROTECTED] wrote: > I was wondering if anyone knew of some online (free if possible) > advanced tutorials, especially ones that provides tasks and ideas for > small projects. The issue for myself is I want to improve my python > programming level, and my ability to program

Re: Looking for Advanced Python Tutorials

2008-04-04 Thread Ravi Kotecha
On Apr 4, 12:58 pm, [EMAIL PROTECTED] wrote: > I was wondering if anyone knew of some online (free if possible) > advanced tutorials, especially ones that provides tasks and ideas for > small projects. The issue for myself is I want to improve my python > programming level, and my ability to progra

Re: wsdl (soap) without code generation

2008-04-04 Thread Thomas Guettler
... Thank you for your answers. I tried to parse the wsdl with two libraries. (axis2 (java) and SOAPPy). Both fail because there is no entry for 'service'. The wsdl is from SAP XI. Has someone hints? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guett

Re: Python in High School

2008-04-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > I think I agree with all of the positive, supporting posts about > Python. I would just like to add that Python (and PyGame) are open > source And run on most common platforms AFAIK. > and so your students can download it at home and have fun > exploring it on

Looking for Advanced Python Tutorials

2008-04-04 Thread cokofreedom
I was wondering if anyone knew of some online (free if possible) advanced tutorials, especially ones that provides tasks and ideas for small projects. The issue for myself is I want to improve my python programming level, and my ability to program in general, but come up blank thinking of a possibl

Re: Python-by-example - new online guide to Python Standard Library

2008-04-04 Thread AK
shurik wrote: > that's great! thanks for putting this together. what about the inspect > module? and particularly getsource :) > Glad you like it! I will add every module eventually, but I'll put inspect up on top of todo list. -- -ak Tobu | http://tobu.lightbird.net/ | Freeform DB / Tagger

Re: Is there an official way to add methods to an instance?

2008-04-04 Thread Bruno Desthuilliers
Peter Otten a écrit : (snip) > Anyway, here is one more option to add too the zoo: > class A(object): > ... def __init__(self, f, x): > ... self._f = f > ... self.x = x > ... @property > ... def f(self): > ... return self._f.__get__(self) > ... def __d

Re: Ignoring windows registry PythonPath subkeys

2008-04-04 Thread Thomas Heller
Floris Bruynooghe schrieb: > Hi > > We basically want the same as the OP in [1], i.e. when python starts > up we don't want to load *any* sys.path entries from the registry, > including subkeys of the PythonPath key. The result of that thread > seems to be to edit PC/getpathp.c[2] and recompile.

Re: Any fancy grep utility replacements out there?

2008-04-04 Thread Floris Bruynooghe
On Mar 19, 2:44 am, Peter Wang <[EMAIL PROTECTED]> wrote: > On Mar 18, 5:16 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] wrote: > > > So I need to recursively grep a bunch of gzipped files. This can't be > > > easily done with grep, rgrep or zgrep. (I'm sure given the r

Ignoring windows registry PythonPath subkeys

2008-04-04 Thread Floris Bruynooghe
Hi We basically want the same as the OP in [1], i.e. when python starts up we don't want to load *any* sys.path entries from the registry, including subkeys of the PythonPath key. The result of that thread seems to be to edit PC/getpathp.c[2] and recompile. This isn't that much of a problem sinc

Re: RELEASED Python 2.6a2 and 3.0a4

2008-04-04 Thread Giampaolo Rodola'
On 4 Apr, 03:47, Barry Warsaw <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On behalf of the Python development team and the Python community, I'm   > happy to announce the second alpha release of Python 2.6, and the   > fourth alpha release of Python 3.0. > > Ple

Re: Is there an official way to add methods to an instance?

2008-04-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : > Brian Vanderburg II <[EMAIL PROTECTED]> writes: >> I've checked out some ways to get this to work. I want to be able to >> add a new function to an instance of an object. > > Ugh. Avoid that if you can. Why so ? OO is about objects, not classes, and adding methods on a

Python, Mysql, insert NULL

2008-04-04 Thread Pallavi Kale
Hello there, I was going through the thread of conversation happening around inserting null using python into mysql. I am facing a similar problem here. I have to insert say 8 values into a table using a stored procedure. Of the 8 values 2 are not null and the remaining can be null, most

Re: Unicode conversion problem (codec can't decode)

2008-04-04 Thread M.-A. Lemburg
On 2008-04-04 08:18, Jason Scheirer wrote: > On Apr 3, 9:35 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote: >> I'm having a problem (Python 2.4) converting strings with random 8-bit >> characters into an escape form which is 7-bit clean for storage in a >> database. If you don't want to proces

Re: object-relational mappers

2008-04-04 Thread Michael Ströder
M.-A. Lemburg wrote: > On 2008-04-01 22:40, Aaron Watters wrote: >> I've been poking around the world of object-relational >> mappers and it inspired me to coin a corellary to the >> the famous quote on regular expressions: >> >> "You have objects and a database: that's 2 problems. >> So: get an ob

urllib and bypass proxy

2008-04-04 Thread kc
Under MS Windows, I encountered a problem with the proxy bypass specification. In windows, the bypass specification for the proxy uses semi-colons to delimit entries. Mine happens to have two semi-colons back-to-back. Internet explorer handles this just fine but urllib equates this with ALWAYS bypa

Re: Is there an official way to add methods to an instance?

2008-04-04 Thread Paul Rubin
Brian Vanderburg II <[EMAIL PROTECTED]> writes: > I've checked out some ways to get this to work. I want to be able to > add a new function to an instance of an object. Ugh. Avoid that if you can. But see: http://en.wikipedia.org/wiki/Monkey_patch -- http://mail.python.org/mailman/listinf

Re: variable scope in list comprehensions

2008-04-04 Thread Duncan Booth
Steve Holden <[EMAIL PROTECTED]> wrote: >> For a moment I thought that maybe list comprehension has its own >> scope, but it doesn't seem to be so: >> print [[y for y in range(8)] for y in range(8)] >> print y >> >> Does anybody understand it? >> >> > This isn't _a_ list comprehension, it's *tw

INDIAN TAJ-MAHAL

2008-04-04 Thread TAJMAHAL TEMPLE
http://ttdtemple.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there an official way to add methods to an instance?

2008-04-04 Thread Peter Otten
Brian Vanderburg II wrote: > I don't know if this is the correct place to send this question. It is. > I've checked out some ways to get this to work. I want to be able to > add a new function to an instance of an object. I've tested two > different methods that cause problems with 'deleting'