Re: random.py

2007-04-26 Thread Gabriel Genellina
En Thu, 26 Apr 2007 02:08:42 -0300, Bill Jackson <[EMAIL PROTECTED]> escribió: > In random.py (Python 2.5.1), line 86 says: > > VERSION = 2# used by getstate/setstate > > Then, in the definition of Random.setstate, we have: > > if version == 2: > > Why is it not: > > if version =

Re: Now()

2007-04-26 Thread Hendrik van Rooyen
Robert Rawlins - Think Blue wrote: >With time depicted to the nearest second, from my background in ColdFusion development we used to have a >datetimeformat() function that I could use as > >DateTimeFormat(now(), “-mm-dd HH:mm:ss”) > >Which would give the current time a mask. Here is a hack

Re: conditional print statement ?

2007-04-26 Thread Antoon Pardon
On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > > As part of a procedure I've a number sequences like this: > > > if Print_Info: print Datafile.readline() > else:Datafile.readline() > > > Is there a more compressed way to write such a statement, > espec

Access to raw command line?

2007-04-26 Thread Pieter Edelman
Hi, I'm currently writing a command-line program in Python, which takes commands in the form of: ./myprog.py [OPTIONS] ARGS So pretty standard stuff. In my case, ARGS is a list of image files. One of the possible options is to specify a file holding information about the photos. You'd specify it

Re: If Dict Contains a particular key

2007-04-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > On Apr 24, 1:41 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Steven Howe wrote: >> >> > or try: >> > thedict = { 'a': 1, 'b':2, 'c':3 } >> > if 'a' in thedict.keys(): >> >print thedict['a'] >> >> Better yet, just: >> >> if 'a' in thed

Re: If Dict Contains a particular key

2007-04-26 Thread Gabriel Genellina
En Thu, 26 Apr 2007 03:56:17 -0300, John Nagle <[EMAIL PROTECTED]> escribió: > On Tue, 2007-04-24 at 18:28 +0100, Robert Rawlins - Think Blue wrote: >> I'm Looking to build a quick if/else statement that checks a >> dictionary for a key like follows. > > It would be useful if th

Re: lowercase class names, eg., qtgui ? (PyQt4)

2007-04-26 Thread Tina I
Glen wrote: > Hello, > > In the file generated by pyuic4 from Designer's .ui file I noticed the use > of lower case class names (I'm assuming these are the names of classes, > not modules). For example: > > It imports thusly: > > from PyQt4 import QtGui > > then uses things like: > sel

Re: PIL and font colour

2007-04-26 Thread [EMAIL PROTECTED]
Steve Thank you for your reply. Is there a way how to find out a complementary colour for an area where I will write the text, so that the text will be  seen clearly?Is there a routine in PIL or in Python somewhere? Thank you for help L. > Johny wrote: > >  I use PIL to write some text to

Re: Access to raw command line?

2007-04-26 Thread Laurent Pointal
Pieter Edelman a écrit : > One possible way to work around this is to get the raw command line > and do the shell expansions ourselves from within Python. Ignoring the > question of whether it is worth the trouble, does anybody know if it > is possible to obtain the raw (unexpanded) command line?

Re: PIL and font colour.

2007-04-26 Thread [EMAIL PROTECTED]
Steve Thank you for your reply. Is there a way how to find out a complementary colour for an area where I will write the text, so that the text will be seen clearly?Is there a routine in PIL or in Python somewhere? Thank you for help Lad. > > I use PIL to write some text to a pict

Re: Access to raw command line?

2007-04-26 Thread Gabriel Genellina
En Thu, 26 Apr 2007 04:04:30 -0300, Pieter Edelman <[EMAIL PROTECTED]> escribió: > Now, one of the users has quite a lot of info files, and asked me if > it's possible to use a wildcard in specifying these, so he would just > have to do: > ./myprog.py -t *.gpx *.jpg > > This seems like a sensibl

Re: Would You Write Python Articles or Screencasts for Money?

2007-04-26 Thread placid
On Apr 25, 12:00 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Jeff Rush wrote: > > There is discussion by the Python Software Foundation of offering cash > > bounties or perhaps periodic awards to the "best of" for magazine articles, > > video/screencast clips and such. I would like to see more s

ICFP Programming Contest 2007

2007-04-26 Thread johan . t . jeuring
Want to show off your programming skills? Your favorite programming language? Your best programming tools? Join the ICFP Programming Contest 2007! The 10th ICFP Programming Contest celebrates a decade of contests. This is one of the world's most advanced and prestiguous programming contest you can

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread Paul McGuire
You might try looking at references between objects, especially if there are any cyclic refs. For instance, if you have a data structure in which child nodes have back refs to their parents, try changing these to use weakref's. This may help the garbage collector to better reclaim discarded objec

str() and repr() question

2007-04-26 Thread adima
Hi All! Sorry, my English isnt good, but get a try to describe my problem. Today we wrote next script: import os, glob, time, string files_to_test = ( "J:\\BWNEW\\!Unerase\\test.test", "L:\\Temp\Nick\ \test.test", "F:\\TRANSIT\\nick\\test.test") outfile="c:\\temp\\statistic" def DoTestTime(file

Re: Coding conventions for class names

2007-04-26 Thread Kay Schluehr
On 25 Apr., 12:32, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Kay Schluehr wrote: > > My question is: does anyone actually follow guidelines here > > Yes. > > > and if yes > > which ones and are they resonable ( e.g. stable with regard to > > refactoring etc. )? > > All of them that I know of. Wh

Re: str() and repr() question

2007-04-26 Thread Thomas Krüger
adima schrieb: > str = DoTestTime(EachFile) ^^^ > print type(str) > for s in str: > print s > out.write(str(s)) ^^^ > Where is the problem here? > Thanks in advan

Scheduler Module Help

2007-04-26 Thread Robert Rawlins - Think Blue
Hello Guys, I'm using the sched module to create a set of functions that run every 10 or 20 minutes whilst the application is running, however it would seem that the moment I run scheduler.run() it prevents any other operations in my application from running, its sits dormant until it runs the

Re: Coding conventions for class names

2007-04-26 Thread Martin v. Löwis
Kay Schluehr schrieb: > set, int, float, list, object,... > > Don't see any of the basic types following the capitalized word > convention for classes covered by PEP 08. These aren't classes, they are types. PEP 8 doesn't specify any convention for types; it is common to either apply the convent

How to find complementary colour for pixel

2007-04-26 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it wil

Re: conditional print statement ?

2007-04-26 Thread stef
Antoon Pardon wrote: > On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote: > >> hello, >> >> >> As part of a procedure I've a number sequences like this: >> >> >> if Print_Info: print Datafile.readline() >> else:Datafile.readline() >> >> >> Is there a more compress

Re: Tutorial creates confusion about slices

2007-04-26 Thread Antoon Pardon
On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote: >>> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: The following is part of the explanation on slices in the tutorial: The best way to rem

simplest install procedure for Python + packages under winXP ?

2007-04-26 Thread stef
hello, I'm still in the transition of going from MatLab to Scipy, and installed previous week a SciPy on a PC twice, through the new "Enstaller". It's a pitty that there will be no old installer versions anymore (although I can understand why). Although I succeeded, the behavior of the Enstaller

Re: simplest install procedure for Python + packages under winXP ?

2007-04-26 Thread Laurent Pointal
stef a écrit : > hello, > > I'm still in the transition of going from MatLab to Scipy, > and installed previous week a SciPy on a PC twice, > through the new "Enstaller". > It's a pitty that there will be no old installer versions anymore > (although I can understand why). > > Although I succeede

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread TimC
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Maybe delegating the actual processing to an external python > process you feed through the macro might work. Thanks for the idea. I'll check it out soon and will report about possible improvements. -- http://mail.python.org/mailman/listinfo/pytho

Re: Video: Professor of Physics, Phd at Cal Tech says: 911 Inside Job

2007-04-26 Thread James Stroud
[EMAIL PROTECTED] wrote: > Video: Professor of Physics, Phd at Cal Tech says: 911 Inside Job > > Cal Tech is the ELITE of ELITE in physics. > > If Feynman were alive, he would point his finger straight at the 911 > criminal operators, the yank bastards themselves ... > > http://www.911blogge

Re-ocurring Events

2007-04-26 Thread Robert Rawlins - Think Blue
Hello Chaps, A bit more of a complex one this time, and I thought I'd get your opinions on the best way to achieve this. Basically I'm looking for a way to describe a re-occurring event, like a calendar event or appointment I guess. I'm likely to use an XML file for the definition of the events

Parsing HTML/XML documents

2007-04-26 Thread [EMAIL PROTECTED]
I need to parse real world HTML/XML documents and I found two nice python solution: BeautifulSoup and Tidy. However I found pyXPCOM that is a wrapper for Gecko. So I was thinking Gecko surely handles bad html in a more consistent and error-proof way than BS and Tidy. I'm interested in using Mozil

Re: How to find complementary colour for pixel

2007-04-26 Thread Bjoern Schliessmann
Johny wrote: > As pictures maybe different, colour, in the position where I > write the text, is also different. > Is there a way how to set the font colour so that it will be seen > very clearly in the picture? > For example, if the picture is bright ( for example yellow), the > font colour shou

Re: Coding conventions for class names

2007-04-26 Thread Michael Hoffman
Kay Schluehr wrote: > What happens when an enthusiast re-implements a stdlib module e.g. > decimal s.t. it becomes a builtin module? Will the stdlib module serve > as a wrapper to conform the current API or will the builtin module > conform to the current interface. Well, the best example is prob

Re: Access to raw command line?

2007-04-26 Thread Bjoern Schliessmann
Pieter Edelman wrote: > ./myprog.py -t *.gpx *.jpg > > This seems like a sensible option at first sight, but it's > difficult to implement because the wildcard is expanded by the > shell, (in *nix only) > so sys.argv gets a list containing "-t", all .gpx files and > all .jpg files. With this

How does Jython compile python modules that can be used by the JVM?

2007-04-26 Thread ChrisW
Hi, I need a relatively technical answer to the above question - I've looked through the Jython docs / FAQs and Googled it but to no avail... if anyone can let me know I'd be most grateful, Thanks, Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Feedback on Until recipe

2007-04-26 Thread Antoon Pardon
On 2007-04-24, Thomas Nelson <[EMAIL PROTECTED]> wrote: > Occasionally someone posts to this group complaining about the lack of > "repeat ... until" in python. I too have occasionally wished for such > a construct, and after some thinking, I came up with the class below. > I'm hoping to get some

Re: My python annoyances so far

2007-04-26 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this > thread to post, from time to time, my annoyances with python. I > hope someone will clarify things to me where I have misunderstood > them. > > Annoyances: > > 1. Underscores! What's the deal with that? Es

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread Martin v. Löwis
> I'm a bit fuzzy on this, but I don't think there _is_ a > practical way to "return memory to the OS" in many OSes. That's not true at all. Most C libraries these days manage to return memory to the operating system. On Win32 (which the OP is most likely to use), the operating system offers the

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread Martin v. Löwis
> The moment I close the application that launched the macro, my > ressources get freed. > > So is there a way to free my memory inside my nested loops? Yes. Most likely, it is your algorithm itself which is flawed (not Python, not the application that embeds Python): You keep, most likely, refer

Re: Re-ocurring Events

2007-04-26 Thread Daniel Nogradi
> A bit more of a complex one this time, and I thought I'd get your opinions > on the best way to achieve this. Basically I'm looking for a way to describe > a re-occurring event, like a calendar event or appointment I guess. I'm > likely to use an XML file for the definition of the events, but ima

Re: Access to raw command line?

2007-04-26 Thread Michael Hoffman
Pieter Edelman wrote: > Hi, > > I'm currently writing a command-line program in Python, which takes > commands in the form of: > ./myprog.py [OPTIONS] ARGS > So pretty standard stuff. In my case, ARGS is a list of image files. > > One of the possible options is to specify a file holding informati

Problem with Matplotlib and the Tk-Backend

2007-04-26 Thread thorstenkranz
Hi everyone, I'm new here and I have a question ( I guess as everybody who is new here ;-) ), I'm having some strange problem with Matplotlib, using it in a Tkinter application. I create a Canvas, a figure, subplot and then a toolbar. It works fine, but only without the toolbar! When I want to

Re: kwarg references

2007-04-26 Thread Steve Holden
Gabriel Genellina wrote: > En Tue, 24 Apr 2007 22:31:59 -0300, Calvin Spealman <[EMAIL PROTECTED]> > escribió: > >> In the internal API when a C function is called and passed a kwarg >> dictionary, is there any case where anything else has a reference to >> it? I checked with the following code

Re: If Dict Contains a particular key

2007-04-26 Thread Steve Holden
Gabriel Genellina wrote: > En Thu, 26 Apr 2007 03:56:17 -0300, John Nagle <[EMAIL PROTECTED]> > escribió: > >> On Tue, 2007-04-24 at 18:28 +0100, Robert Rawlins - Think Blue wrote: >>> I'm Looking to build a quick if/else statement that checks a >>> dictionary for a key like follows.

Re: Tutorial creates confusion about slices

2007-04-26 Thread Steve Holden
Antoon Pardon wrote: > On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote: [...] >>> >> Most people reading a tutorial are aware that they are being given the >> knowledge they need to put the subject matter to immediate use, and that >> there may well be refinements that are glossed over or c

Re: Would You Write Python Articles or Screencasts for Money?

2007-04-26 Thread Steve Holden
placid wrote: > On Apr 25, 4:40 pm, "Tennessee Leeuwenburg" > <[EMAIL PROTECTED]> wrote: >> Firstly, let me put up my hand and say that I would be happy to write >> Python articles for cash. >> > > I would be happy to write Python articles for a T-shirt with the > Python logo printed on it. Maybe

Re: PIL and font colour.

2007-04-26 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Steve > Thank you for your reply. > > Is there a way how to find out a complementary colour for an area where I > will write the text, so > that the text will be seen clearly?Is there a routine in PIL or in Python > somewhere? > Thank you for help > > Lad. >

Which are your favorite UML tools?

2007-04-26 Thread Anastasios Hatzis
Hello, I'm working on the light-weight MDA tool pyswarm, http://pyswarm.sourceforge.net/ (it is about a code-generator for Python/PostgreSQL-based software. I plan to add support of UML CASE tools other than the one supported currently. I would like to learn which UML tools you use (if any), p

Re: File not read to end

2007-04-26 Thread andrew . jefferies
On Apr 25, 3:03 pm, Facundo Batista <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > My log is around 200,000 lines but it is stopping at line 26,428. I > > checked that line and there aren't any special characters. > > Are you in Windows? Just in case, put "rb" as the mode of the open. >

Re: My python annoyances so far

2007-04-26 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. I hope someone > will clarify things to me where I have misunderstood them. > > Annoyances: > > 1. Underscores! What's the deal with that? Espec

Re: File not read to end

2007-04-26 Thread andrew . jefferies
On Apr 25, 2:51 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > I'm trying to write a simple log parsing program. I noticed that it > > isn't reading my log file to the end. > > > My log is around 200,000 lines but it is stopping at line 26,428. I > > checked tha

Re: Scheduler Module Help

2007-04-26 Thread Steve Holden
Robert Rawlins - Think Blue wrote: > Hello Guys, > > > > I’m using the sched module to create a set of functions that run every > 10 or 20 minutes whilst the application is running, however it would > seem that the moment I run scheduler.run() it prevents any other > operations in my applica

Re: conditional print statement ?

2007-04-26 Thread Dustan
On Apr 26, 1:58 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote: > > > hello, > > > As part of a procedure I've a number sequences like this: > > > > > if Print_Info: print Datafile.readline() > > else:Datafile.readline(

Re: File not read to end

2007-04-26 Thread Facundo Batista
[EMAIL PROTECTED] wrote: > I've attached the whole script. Thanks again for your help. > > --Andrew Andrew, tip: If you attach the whole script, what you get is that a lot of people goes away from the thread. Me for example. I won't read 100 lines of code to see where is the problem, and then tr

Re: How does Jython compile python modules that can be used by the JVM?

2007-04-26 Thread Diez B. Roggisch
ChrisW schrieb: > Hi, > > I need a relatively technical answer to the above question - I've > looked through the Jython docs / FAQs and Googled it but to no > avail... if anyone can let me know I'd be most grateful, The jython mailing list is the better place to ask this. However, actually this

Re: Now()

2007-04-26 Thread Carsten Haese
On Thu, 2007-04-26 at 08:42 +0200, Hendrik van Rooyen wrote: > Robert Rawlins - Think Blue wrote: > >With time depicted to the nearest second, from my background in ColdFusion > development we used to have a >datetimeformat() function that I could use as > > > >DateTimeFormat(now(), -mm-dd HH:

Re: File not read to end

2007-04-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, andrew.jefferies wrote: > On Apr 25, 2:51 pm, Larry Bates <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > Hi, >> >> > I'm trying to write a simple log parsing program. I noticed that it >> > isn't reading my log file to the end. >> >> > My log is around 200,000

Store variable name in another variable

2007-04-26 Thread loial
I need to store a list of variable names in a dictionary or list. I then later need to retrieve the names of the variables and get the values from the named variables. The named variables will already have been created and given a value. I hope thats clear!!! How can I do this? -- http://mail.p

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > Our (python-)macro uses massively nested loops which are unfortunately > necessary. These loops perform complex calculations in this commercial > tool. To give you a quick overview how long this macros runs: > > The outer loop takes 5-7 hours for one cycle. Each cycle cr

Re: Modules for peer-to-peer chat program

2007-04-26 Thread billiejoex
On 24 Apr, 19:51, "Viewer T." <[EMAIL PROTECTED]> wrote: > I would like to know which modules I would need in order to create > peer-to-peer chat program in python using Tkinter. > > If I would need modules that do not come packaged with python, I would > appreciate information on where I can get t

Re: Store variable name in another variable

2007-04-26 Thread Larry Bates
loial wrote: > I need to store a list of variable names in a dictionary or list. I > then later need to retrieve the names of the variables and get the > values from the named variables. The named variables will already have > been created and given a value. > > I hope thats clear!!! > > How can

Re: Store variable name in another variable

2007-04-26 Thread Laurent Pointal
loial a écrit : > I need to store a list of variable names in a dictionary or list. I > then later need to retrieve the names of the variables and get the > values from the named variables. The named variables will already have > been created and given a value. "Named variables will already have b

Re: Access to raw command line?

2007-04-26 Thread Grant Edwards
On 2007-04-26, Pieter Edelman <[EMAIL PROTECTED]> wrote: > Hi, > > I'm currently writing a command-line program in Python, which takes > commands in the form of: > ./myprog.py [OPTIONS] ARGS > So pretty standard stuff. In my case, ARGS is a list of image files. > > One of the possible options is to

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread Grant Edwards
On 2007-04-26, Martin v. Löwis <[EMAIL PROTECTED]> wrote: >> I'm a bit fuzzy on this, but I don't think there _is_ a >> practical way to "return memory to the OS" in many OSes. > > That's not true at all. Most C libraries these days manage > to return memory to the operating system. [...] Thanks

Re: Tutorial creates confusion about slices

2007-04-26 Thread Neil Cerutti
On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote: > On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> The following is part of the explanation on slices in the >> tutorial: >> >> The best way to remember how slices work is > ... >> +---+---+---+---+---+ >> | H | e | l | p | A | >> +

Re: Convert a string to a list

2007-04-26 Thread Paul McGuire
On Apr 25, 9:02 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Apr 24, 12:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > > > > Someone normally chimes in with pyparsing at this point... > > Well it *is* a short pyparsing routine, after all... > > -- Someone > > tests = """\ > ("." ".." "cd

Re: Tutorial creates confusion about slices

2007-04-26 Thread Michael Hoffman
Neil Cerutti wrote: >> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: >>> The following is part of the explanation on slices in the >>> tutorial: >>> >>> The best way to remember how slices work is >> ... >>> +---+---+---+---+---+ >>> | H | e | l | p | A | >>> +---+---+---+---+-

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-26 Thread Dave L. Renfro
[EMAIL PROTECTED] wrote: >> Cal Tech is the ELITE of ELITE in physics. >> >> If Feynman were alive, he would point his finger straight at >> the 911 criminal operators, the yank bastards themselves ... >> >> http://www.911blogger.com/node/8101 >> >> No self-respecting scientist should keep his

Re: str() and repr() question

2007-04-26 Thread Mark T
"adima" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All! > Sorry, my English isnt good, but get a try to describe my problem. > > Today we wrote next script: > > import os, glob, time, string > files_to_test = ( "J:\\BWNEW\\!Unerase\\test.test", "L:\\Temp\Nick\ > \test.test",

Re: Would You Write Python Articles or Screencasts for Money?

2007-04-26 Thread Michele Simionato
On Apr 26, 7:23 am, Michele Simionato <[EMAIL PROTECTED]> wrote: > I would be +1 for offering symbolic prices Oops, I meant prizes! M. S. -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing HTML/XML documents

2007-04-26 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I need to parse real world HTML/XML documents and I found two nice python > solution: BeautifulSoup and Tidy. There's also lxml, in case you want a real XML tool. http://codespeak.net/lxml/ http://codespeak.net/lxml/dev/parsing.html#parsers > However I found pyXPCOM th

Re: simplest install procedure for Python + packages under winXP ?

2007-04-26 Thread kyosohma
On Apr 26, 4:41 am, Laurent Pointal <[EMAIL PROTECTED]> wrote: > stef a écrit : > > > > > hello, > > > I'm still in the transition of going from MatLab to Scipy, > > and installed previous week a SciPy on a PC twice, > > through the new "Enstaller". > > It's a pitty that there will be no old instal

Re: Preferred Random Library

2007-04-26 Thread Alan Isaac
"Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > numpy.random does not implement jumpahead(). Which may be removed from the random API: http://www.python.org/dev/peps/pep-3100/#standard-library Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Pradnyesh Sawant
Hello, I have a pyqt4 code in which i'm trying the signal/slot mechanism. The (stripped) code is as follows: class D(QtCore.QThread): def __init__(self): QtCore.QThread.__init__(self) tpl = ("Primary", "priSec") print "tpl:", tpl self.emit(QtCore.SIGNAL("setLabe

Re: Tutorial creates confusion about slices

2007-04-26 Thread Steve Holden
Michael Hoffman wrote: > Neil Cerutti wrote: >>> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: The following is part of the explanation on slices in the tutorial: The best way to remember how slices work is >>> ... +---+---+---+---+---+ | H | e | l |

Re: Re-ocurring Events

2007-04-26 Thread Michael Bentley
On Apr 26, 2007, at 4:26 AM, Robert Rawlins - Think Blue wrote: > A bit more of a complex one this time, and I thought I’d get your > opinions on the best way to achieve this. Basically I’m looking for > a way to describe a re-occurring event, like a calendar event or > appointment I guess.

Interrupting ftplib.storbinary()

2007-04-26 Thread Florian Demmer
Hi! I have a number of ftp uploads running in parallel using ftplib.storbinary and threading and in case one of them fails I need to interrupt all the others (but not exit the program completely)... do you guys have an idea how i could implement the interruption as cleanly as possible? thanks! -

Re: Re-ocurring Events

2007-04-26 Thread Laurent Pointal
Daniel Nogradi a écrit : >> A bit more of a complex one this time, and I thought I'd get your >> opinions >> on the best way to achieve this. Basically I'm looking for a way to >> describe >> a re-occurring event, like a calendar event or appointment I guess. I'm >> likely to use an XML file for

Re: If Dict Contains a particular key

2007-04-26 Thread Alex Martelli
John Nagle <[EMAIL PROTECTED]> wrote: ... > It would be useful if there was some direct way to get the value > associated with a key, and None if there's not one. >From : """ Guido's most important attribute besides Python itself is Guido's tim

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Phil Thompson
On Thursday 26 April 2007 3:16 pm, Pradnyesh Sawant wrote: > Hello, > I have a pyqt4 code in which i'm trying the signal/slot mechanism. The > (stripped) code is as follows: > > class D(QtCore.QThread): > def __init__(self): > QtCore.QThread.__init__(self) > tpl = ("Primary", "p

Re: lowercase class names, eg., qtgui ? (PyQt4)

2007-04-26 Thread Glen
On Thu, 26 Apr 2007 09:09:44 +0200, Tina I wrote: Hi Tina, Thanks for the reply. Of course, by now I've run pyuic4 again on my .ui file and things are back to normal. Believe it or not, my example was a copy/paste directly from my .py file. Some strange anomoly, I guess. Everything's ok now.

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Diez B. Roggisch
Pradnyesh Sawant schrieb: > Hello, > I have a pyqt4 code in which i'm trying the signal/slot mechanism. The > (stripped) code is as follows: > > class D(QtCore.QThread): >def __init__(self): >QtCore.QThread.__init__(self) >tpl = ("Primary", "priSec") >print "tpl:", tpl

Generalized range

2007-04-26 Thread tkpmep
I need to create ranges that can start and end with real numbers. Searching this newsgroup brought me to a function that I then modified as follows: def myRange(iMin, iMax=None, iStep=1): """Extends range to real numbers. Wherever possible, use Python's range . In other cases, make the

Re: Interrupting ftplib.storbinary()

2007-04-26 Thread Diez B. Roggisch
Florian Demmer schrieb: > Hi! > > I have a number of ftp uploads running in parallel using > ftplib.storbinary and threading and in case one of them fails I need > to interrupt all the others (but not exit the program completely)... > do you guys have an idea how i could implement the interruption

Re: Interrupting ftplib.storbinary()

2007-04-26 Thread Larry Bates
Florian Demmer wrote: > Hi! > > I have a number of ftp uploads running in parallel using > ftplib.storbinary and threading and in case one of them fails I need > to interrupt all the others (but not exit the program completely)... > do you guys have an idea how i could implement the interruption a

Re: My python annoyances so far

2007-04-26 Thread 7stud
[EMAIL PROTECTED] wrote: > Annoyances: > Every language has annoyances. Python is no exception. Post away. Anyone that is offended can go drink a Guinness. > 1. Underscores! What's the deal with that? Especially those double > underscores. The best answer I read on this is that the double > und

Python keywords

2007-04-26 Thread gtb
Have done some searching but have not found a place where I can look up python keywords. I was looking at a script that contained the following line: assert self.getResponseCode() in (200, 304, 302) I can infer the usage here but previously I had thought that "in" was only used with '"for". I lo

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Phil Thompson
On Thursday 26 April 2007 3:41 pm, Diez B. Roggisch wrote: > Pradnyesh Sawant schrieb: > > Hello, > > I have a pyqt4 code in which i'm trying the signal/slot mechanism. The > > (stripped) code is as follows: > > > > class D(QtCore.QThread): > >def __init__(self): > >QtCore.QThread.__ini

Re: Store variable name in another variable

2007-04-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Laurent Pointal <[EMAIL PROTECTED]> wrote: >loial a écrit : >> I need to store a list of variable names in a dictionary or list. I >> then later need to retrieve the names of the variables and get the >> values from the named variables. The named variables will alre

Re: My python annoyances so far

2007-04-26 Thread Michael Hoffman
7stud wrote: > [EMAIL PROTECTED] wrote: >> Annoyances: >> > > Every language has annoyances. Python is no exception. Post away. > Anyone that is offended can go drink a Guinness. I find Guinness annoying. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Python keywords

2007-04-26 Thread Larry Bates
gtb wrote: > Have done some searching but have not found a place where I can look > up python keywords. I was looking at a script that contained the > following line: > > assert self.getResponseCode() in (200, 304, 302) > > I can infer the usage here but previously I had thought that "in" was > o

Re: Access to raw command line?

2007-04-26 Thread Michele Simionato
On Apr 26, 9:04 am, Pieter Edelman <[EMAIL PROTECTED]> wrote: > Hi, > > I'm currently writing a command-line program in Python, which takes > commands in the form of: > ./myprog.py [OPTIONS] ARGS Once you start having too many arguments and options on the command line, you might consider using the

Re: function object.func_default off the console

2007-04-26 Thread castironpi
On Apr 25, 1:56 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Aaron Brady wrote: > f.func_defaults[0] > > [2, 3] > f.func_defaults[0]+=[4] > > Traceback (most recent call last): > >File "", line 1, in > > TypeError: 'tuple' object does not support item assignment > f.func_default

Re: Simple csv read/write

2007-04-26 Thread Drew
On Apr 24, 8:35 pm, John Machin <[EMAIL PROTECTED]> wrote: > On 25/04/2007 8:27 AM, Drew wrote: > > > Ok, I'm trying to do the simplest read/write from one csv file to > > another. For some reason, every other row on the output file is a > > blank row. What am I doing wrong? > > > import csv > > >

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Pradnyesh Sawant
Thanks for the reply Phil. Actually, as mentioned earlier, the code that i sent was stripped; while stripping, i missed some things (class D should have a run method). Also, i tried your suggestion of connecting before emitting the signal, but am still getting the same output (in the original code)

Re: Generalized range

2007-04-26 Thread Stargaming
[EMAIL PROTECTED] schrieb: > I need to create ranges that can start and end with real numbers. > Searching this newsgroup brought me to a function that I then modified > as follows: > > def myRange(iMin, iMax=None, iStep=1): Just as a sidenote: it is not common to prefix your names with its type.

SPE

2007-04-26 Thread Glich
Is SPE open source? I want to try to implement a windows compiler into the GUI using py2exe. thanks! -Glich -- http://mail.python.org/mailman/listinfo/python-list

Re: Generalized range

2007-04-26 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > I need to create ranges that can start and end with real numbers. > Searching this newsgroup brought me to a function that I then modified > as follows: > > def myRange(iMin, iMax=None, iStep=1): > """Extends range to real numbers. Wherever possible, use Python's > r

Re: Scheduler Module Help

2007-04-26 Thread Michele Simionato
Robert Rawlins - Think Blue wrote:> Hello Guys, > > > I'm using the sched module to create a set of functions that run every > > 10 or 20 minutes whilst the application is running, however it would > > seem that the moment I run scheduler.run() it prevents any other > > operations in my application

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Phil Thompson
On Thursday 26 April 2007 4:49 pm, Pradnyesh Sawant wrote: > Thanks for the reply Phil. Actually, as mentioned earlier, the code > that i sent was stripped; while stripping, i missed some things (class > D should have a run method). Also, i tried your suggestion of > connecting before emitting the

Re: SPE

2007-04-26 Thread Stargaming
Glich schrieb: > Is SPE open source? I want to try to implement a windows compiler into > the GUI using py2exe. > > thanks! > > -Glich > Aye. The `Checkout Manual `_, `WebSVN

Re: Python keywords

2007-04-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, gtb wrote: > Have done some searching but have not found a place where I can look > up python keywords. I was looking at a script that contained the > following line: > > assert self.getResponseCode() in (200, 304, 302) > > I can infer the usage here but previously I had

Re: My python annoyances so far

2007-04-26 Thread flifus
On 26 Apr, 12:00, Bjoern Schliessmann wrote: > [EMAIL PROTECTED] wrote: > > Hi all. I'm learning python these days. I'm going to use this > > thread to post, from time to time, my annoyances with python. I > > hope someone will clarify things to me where I have misunderstood > > them. > > > Annoya

  1   2   3   >