Re: Why can't timedeltas be divided?

2008-04-27 Thread Martin v. Löwis
> Last time I brought up this sort of thing, it seemed fairly unanimous > that the shortcomings of the datetime module were 'deliberate' and > would not be fixed, patch or no patch. Ok, so then if the answer to my question is "yes", the first step should be to discuss it on python-dev. Regards, M

Re: diffing and uniqing directories

2008-04-27 Thread Marc 'BlackJack' Rintsch
On Sat, 26 Apr 2008 20:35:29 -0700, rustom wrote: > On Apr 27, 12:31 am, [EMAIL PROTECTED] wrote: >> On Apr 26, 1:14 pm, "Rustom Mody" <[EMAIL PROTECTED]> wrote: >> […] > > If this is an answer to my question I dont understand it! castironpi is either a bot or trolling. Just ignore its posts. C

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-27 Thread SL
Have you tried this now? First try again with pure C code and compile with a C compiler, not with C++ code and C++ compiler. Then, tweak the code to use more buffering, to make it more similar to readline code, like this (not tested): #include #include char vs[1002000][100]; char buffer

Re: python and web programming, easy way...?

2008-04-27 Thread globalrev
On 27 Apr, 04:26, miya <[EMAIL PROTECTED]> wrote: > On Apr 26, 4:36 pm, bvidinli <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > i use currently python for console programming. > > in past, i tried it for web programming, to use it instead of php. > > Unfortunately, i failed in my attempt to switch

Question regarding Queue object

2008-04-27 Thread Terry
Hello! I'm trying to implement a message queue among threads using Queue. The message queue has two operations: PutMsg(id, msg) # this is simple, just combine the id and msg as one and put it into the Queue. WaitMsg(ids, msg) # this is the hard part WaitMsg will get only msg with certain ids, bu

removing extension

2008-04-27 Thread wilson
i was trying to convert all images in a folder to another type and save the new images in a separate folder.for that i wrote a class and coded some part class ConvertImgs: def __init__(self,infldr,outfldr): if os.path.isdir(infldr): self.infldr=infld

Re: Newbie question about import

2008-04-27 Thread Luca
On Sat, Apr 26, 2008 at 4:14 AM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > The short answer is: don't do that! __init__.py may import any module, but > other modules in the package should not import anything from __init__.py > The same rule applies to the main module in an application: it ca

Re: Why can't timedeltas be divided?

2008-04-27 Thread webograph
On 2008-04-27 09:12, Martin v. Löwis wrote: Last time I brought up this sort of thing, it seemed fairly unanimous that the shortcomings of the datetime module were 'deliberate' and would not be fixed, patch or no patch. Ok, so then if the answer to my question is "yes", the first step shoul

Re: problem with listdir

2008-04-27 Thread castironpi
On Apr 27, 1:57 am, David <[EMAIL PROTECTED]> wrote: > On Sat, Apr 26, 2008 at 7:56 PM, jimgardener <[EMAIL PROTECTED]> wrote: > > >  > * Run cmd.exe and see if you can run "dir > > f:\\code\\python\pgmgallery/*.*" > > >  that causes a message 'Invalid switch - "*.*".' > > Probably because on the

Re: DO YOU KNOW ANY THING ABOUT ISLAM???

2008-04-27 Thread Lie
On Apr 24, 1:40 pm, ABDULLAH <[EMAIL PROTECTED]> wrote: > What you are about to read might sound unusual but it could be very > enlightened. So I would be thankful if you give my article 5 minute > of > your value time. THANK YOU No, it is not unusual at all, it's very normal. The only thing that

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-27 Thread Gabriel Ibanez
I did something near like that several days ago. Instead of programming in C++ I did it with RM-Cobol. I used to know the times that cobol takes to read the file and search for resutls, and I was surprised about the time that Python took doing the same: really, really fast. - Original M

Re: removing extension

2008-04-27 Thread Lie
On Apr 27, 5:34 pm, wilson <[EMAIL PROTECTED]> wrote: > i was trying to convert all images in a folder to another type and > save the new images in a separate folder.for that i wrote a class and > coded some part > > class ConvertImgs: > def __init__(self,infldr,outfldr): >

Re: removing extension

2008-04-27 Thread Lie
On Apr 27, 6:05 pm, Lie <[EMAIL PROTECTED]> wrote: > On Apr 27, 5:34 pm, wilson <[EMAIL PROTECTED]> wrote: > > > > > i was trying to convert all images in a folder to another type and > > save the new images in a separate folder.for that i wrote a class and > > coded some part > > > class ConvertIm

inventor2008 crack

2008-04-27 Thread hopeorpha308
inventor2008 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

bookworm crack

2008-04-27 Thread hopeorpha308
bookworm crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

stalker shadow of chernobyl crack

2008-04-27 Thread hopeorpha308
stalker shadow of chernobyl crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

dvdfabplatinum crack

2008-04-27 Thread hopeorpha308
dvdfabplatinum crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

F-Secure 2007 crack

2008-04-27 Thread hopeorpha308
F-Secure 2007 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

vista ultimate crack

2008-04-27 Thread hopeorpha308
vista ultimate crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

camfrog pro crack

2008-04-27 Thread hopeorpha308
camfrog pro crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Chocolatier crack

2008-04-27 Thread hopeorpha308
Chocolatier crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

sony sound forge 9 crack

2008-04-27 Thread hopeorpha308
sony sound forge 9 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

spynomore crack

2008-04-27 Thread hopeorpha308
spynomore crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Nero 7 premium reloaded crack

2008-04-27 Thread hopeorpha308
Nero 7 premium reloaded crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

spyware doctor 5.0.1.205 crack

2008-04-27 Thread hopeorpha308
spyware doctor 5.0.1.205 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

badcopy crack

2008-04-27 Thread hopeorpha308
badcopy crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Re: removing extension

2008-04-27 Thread Arnaud Delobelle
Lie <[EMAIL PROTECTED]> writes: > On Apr 27, 6:05 pm, Lie <[EMAIL PROTECTED]> wrote: >> >> I don't know if this is the simplest way, but you can use re module. >> >> import re >> pat = re.compile(r'(.*?)\..*') > > Sorry, this line should be: > pat = re.compile(r'(.*)\..*') > > or paths like these

Random/anonymous class methods

2008-04-27 Thread philly_bob
In the sample program below, I want to send a random method to a class instance. In other words, I don't know which method to send until run-time. How can I send ch, which is my random choice, to the myclass instance? Thanks, Bob= import random class myclass(object): def meth1(self):

Re: Random/anonymous class methods

2008-04-27 Thread Arnaud Delobelle
philly_bob <[EMAIL PROTECTED]> writes: > In the sample program below, I want to send a random method to a class > instance. > In other words, I don't know which method to send until run-time. How > can I send ch, which is my random choice, to the myclass instance? > > Thanks, > > Bob= > > >

Re: Why can't timedeltas be divided?

2008-04-27 Thread Jon Ribbens
On 2008-04-27, Martin v. Löwis <[EMAIL PROTECTED]> wrote: >> Last time I brought up this sort of thing, it seemed fairly unanimous >> that the shortcomings of the datetime module were 'deliberate' and >> would not be fixed, patch or no patch. > > Ok, so then if the answer to my question is "yes", t

Re: Why can't timedeltas be divided?

2008-04-27 Thread webograph
On 2008-04-27 14:18, Jon Ribbens wrote: Yes, that's where it was decided that the datetime module was fine that way it is and must not be changed. could you give me some pointers to that discussion? i found some discussion about interpretation as intervals [1], casting numbers to intervals [2]

Re: Loading associated files

2008-04-27 Thread Lie
On Apr 24, 10:14 pm, [EMAIL PROTECTED] wrote: > I am trying to make a a simple databasing GUI interface and and have > created a module to deal with parsing the data from a file and a GUI > based program that displays this data using PyQt4, i know how to > register files in the system registry usin

Re: Why can't timedeltas be divided?

2008-04-27 Thread Jon Ribbens
On 2008-04-27, webograph <[EMAIL PROTECTED]> wrote: > On 2008-04-27 14:18, Jon Ribbens wrote: >> Yes, that's where it was decided that the datetime module was fine >> that way it is and must not be changed. > could you give me some pointers to that discussion? Well, http://bugs.python.org/issue16

anydvd 6.1.7.4 crack

2008-04-27 Thread ch612bunn
anydvd 6.1.7.4 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Kaspersky Anti-Virus 7.0.0.125 crack

2008-04-27 Thread ch612bunn
Kaspersky Anti-Virus 7.0.0.125 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

nero 8 crack

2008-04-27 Thread ch612bunn
nero 8 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

avs video converter 5.6.1.715 crack

2008-04-27 Thread ch612bunn
avs video converter 5.6.1.715 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

spyware doctor 5.0.5.259 crack

2008-04-27 Thread ch612bunn
spyware doctor 5.0.5.259 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Installed python 2.5 over 2.4 and lost installed packages

2008-04-27 Thread james
Hi all, I recently updated os x from python 2.4 to 2.5 (from python.org) and in doing so I lost my old python path entries. Python 2.4 was installed using fink. Now when I do: import sys print sys.path my old site-packages directory is not within it (the 2.4 one). So what is the right thing to

norton antivirus 2008 crack

2008-04-27 Thread ch612bunn
norton antivirus 2008 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Microsoft Office Home and Student 2007 crack

2008-04-27 Thread ch612bunn
Microsoft Office Home and Student 2007 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

kaspersky 7 crack

2008-04-27 Thread ch612bunn
kaspersky 7 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

nod32 2.70.39 crack

2008-04-27 Thread ch612bunn
nod32 2.70.39 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

kaspersky internet security 7 crack

2008-04-27 Thread ch612bunn
kaspersky internet security 7 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

norton internet security 2008 crack

2008-04-27 Thread ch612bunn
norton internet security 2008 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

AVS Video Converter 5.6 crack

2008-04-27 Thread ch612bunn
AVS Video Converter 5.6 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

adobe illustrator cs3 crack

2008-04-27 Thread ch612bunn
adobe illustrator cs3 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Adobe Premiere CS3 crack

2008-04-27 Thread ch612bunn
Adobe Premiere CS3 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Alcohol 120% 1.9.6.5429 crack

2008-04-27 Thread ch612bunn
Alcohol 120% 1.9.6.5429 crack http://wga-cracks.crackkey.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Loading associated files

2008-04-27 Thread flarefight
Yep, thats pretty much exactly what i had done, those exact settings, and it still doesnt work. As i said i looked at the other keys to check i had done it right and a i said the settings are fine because i can send the file to python.exe and it loads like a python file fine, but it doesn't like pa

Re: Installed python 2.5 over 2.4 and lost installed packages

2008-04-27 Thread Ben Kaplan
I don't know what the best practice is, but just creating sym links into site-packages will work, and it saves the extra memory from cp'ing. - Original Message From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: python-list@python.org Sent: Sunday, April 27, 2008 9:15:06 AM Subject: Insta

design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread bullockbefriending bard
I am a complete ignoramus and newbie when it comes to designing and coding networked clients (or servers for that matter). I have a copy of Goerzen (Foundations of Python Network Programming) and once pointed in the best direction should be able to follow my nose and get things sorted... but I am n

Re: Question regarding Queue object

2008-04-27 Thread Terry
On Apr 27, 6:27 pm, Terry <[EMAIL PROTECTED]> wrote: > Hello! > > I'm trying to implement a message queue among threads using Queue. The > message queue has two operations: > PutMsg(id, msg) # this is simple, just combine the id and msg as one > and put it into the Queue. > WaitMsg(ids, msg) # thi

convert images

2008-04-27 Thread wilson
hi i converted some P5 type .pgm images to .jpg using x=Image.open("oldimage.pgm") imsz=x.size newimg=Image.new('L',imsz) newimg.putdata(x.getdata()) newimg.save("newimg.jpg") when i again check the pixel data for these images using getdata() method i,I find that they are slightly different ie if

Re: Question regarding Queue object

2008-04-27 Thread David
> WaitMsg will get only msg with certain ids, but this is not possible > in Queue object, because Queue provides no method to peek into the > message queue and fetch only matched item. > > Now I'm using an ugly solution, fetch all the messages and put the not > used ones back to the queue. But

ANN: pyspread 0.0.4

2008-04-27 Thread Martin Manns
Hi, The newest version pyspread 0.0.4 now runs on + GTK + Windows + Mac (not tested myself but got positive reports) New features in 0.0.4: + Column, line and table insertion and deletion + Themeable toolbar Feedback is very welcome! Best Regards Martin -- http://mail.python.org/mailman/listi

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread Larry Bates
bullockbefriending bard wrote: I am a complete ignoramus and newbie when it comes to designing and coding networked clients (or servers for that matter). I have a copy of Goerzen (Foundations of Python Network Programming) and once pointed in the best direction should be able to follow my nose an

Re: Random/anonymous class methods

2008-04-27 Thread Ben Finney
philly_bob <[EMAIL PROTECTED]> writes: > How can I send ch, which is my random choice, to the myclass > instance? > > Thanks, > > Bob= > > > import random > > class myclass(object): >def meth1(self): > print 'meth1' >def meth2(self): > print 'meth2' > > c=myclass() >

Re: Random/anonymous class methods

2008-04-27 Thread castironpi
On Apr 27, 7:11 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > philly_bob <[EMAIL PROTECTED]> writes: > > In the sample program below, I want to send a random method to a class > > instance. > > In other words, I don't know which method to send until run-time.  How > > can I send ch, which is my

Re: print some text

2008-04-27 Thread barronmo
On Apr 25, 2:44 pm, "Gabriel Ibanez" <[EMAIL PROTECTED]> wrote: > Hi ! > > Other idea (old style school): > > def printing(): >f=open("lpt1", "w") >f.write("\nSomething to print\f") >f.close() > > Cheers.. > > - Ibanez - > I haven't found a way from within python to print f. I'm sure

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread Eric Wertman
HI, that does look like a lot of fun... You might consider breaking that into 2 separate programs. Write one that's threaded to keep a db updated properly, and write a completely separate one to handle displaying data from your db. This would allow you to later change or add a web interface witho

Re: removing extension

2008-04-27 Thread Matt Nordhoff
Arnaud Delobelle wrote: > More simply, use the rsplit() method of strings: > path = r'C:\myimages\imageone.jpg' path.rsplit('.', 1) > ['C:\\myimages\\imageone', 'jpg'] > > path = r"C:\blahblah.blah\images.20.jpg" path.rsplit('.', 1) > ['C:\\blahblah.blah\\images.20', 'jpg'] >

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread David
> > 1) The data for the race about to start updates every (say) 15 > seconds, and the data for earlier and later races updates only every > (say) 5 minutes. There is no point for me to be hammering the server > with requests every 15 seconds for data for races after the upcoming Try using an

Re: python and web programming, easy way...?

2008-04-27 Thread David
> > www.webpy.org is supereasy to get going with. dont know which is > better for advanced stuff. > I don't think that webpy supports sessions. Their addition to webpy is a Google Summer of Code project: http://webpy.org/sessions/gsoc Also, I can't find any reference to cookies or sessions in

Re: Question regarding Queue object

2008-04-27 Thread David
(re-cc-ing the list) On Sun, Apr 27, 2008 at 4:40 PM, Terry Yin <[EMAIL PROTECTED]> wrote: > Defaultdict is not an option because there will be a lot of message IDs (and > increasing). I will implement LookAheadQueue class by overriding the Queue > class. > > Thanks for your kind advice. > > BTW,

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread bullockbefriending bard
On Apr 27, 10:05 pm, "Eric Wertman" <[EMAIL PROTECTED]> wrote: > HI, that does look like a lot of fun... You might consider breaking > that into 2 separate programs.  Write one that's threaded to keep a db > updated properly, and write a completely separate one to handle > displaying data from your

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread Jorge Godoy
bullockbefriending bard wrote: > A further complication is that at a later point, I will want to do > real-time time series prediction on all this data (viz. predicting > actual starting prices at post time x minutes in the future). Assuming > I can quickly (enough) retrieve the relevant last n to

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread bullockbefriending bard
On Apr 27, 10:10 pm, David <[EMAIL PROTECTED]> wrote: > >  1) The data for the race about to start updates every (say) 15 > >  seconds, and the data for earlier and later races updates only every > >  (say) 5 minutes. There is  no point for me to be hammering the server > >  with requests every 15

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread Jorge Godoy
bullockbefriending bard wrote: > 3) I need to dump this data (for all races, not just current about to > start race) to text files, store it as BLOBs in a DB *and* update real > time display in a wxpython windowed client. Why in a BLOB? Why not into specific data types and normalized tables? Yo

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread BJörn Lindqvist
I think twisted is overkill for this problem. Threading, elementtree and urllib should more than suffice. One thread polling the server for each race with the desired polling interval. Each time some data is treated, that thread sends a signal containing information about what changed. The gui list

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread Jarkko Torppa
On 2008-04-27, David <[EMAIL PROTECTED]> wrote: >> >> 1) The data for the race about to start updates every (say) 15 >> seconds, and the data for earlier and later races updates only every >> (say) 5 minutes. There is no point for me to be hammering the server >> with requests every 15 seconds

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread bullockbefriending bard
On Apr 27, 11:12 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote: > bullockbefriending bard wrote: > > A further complication is that at a later point, I will want to do > > real-time time series prediction on all this data (viz. predicting > > actual starting prices at post time x minutes in the future)

Re: convert images

2008-04-27 Thread Marc 'BlackJack' Rintsch
On Sun, 27 Apr 2008 06:42:13 -0700, wilson wrote: > i converted some P5 type .pgm images to .jpg using > […] > ie if oldimage.pgm has pixels > [29 31 38 ..., 10 4 18] > then the corresponding jpg image has > [29 31 38 ..., 10 3 17] > > why this difference? shouldn't they be identical?can someo

Re: removing extension

2008-04-27 Thread Marc 'BlackJack' Rintsch
On Sun, 27 Apr 2008 15:06:54 +, Matt Nordhoff wrote: > Arnaud Delobelle wrote: >> More simply, use the rsplit() method of strings: >> > path = r'C:\myimages\imageone.jpg' > path.rsplit('.', 1) >> ['C:\\myimages\\imageone', 'jpg'] >> >> > path = r"C:\blahblah.blah\images.20.jpg"

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread bullockbefriending bard
On Apr 27, 11:27 pm, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: > I think twisted is overkill for this problem. Threading, elementtree > and urllib should more than suffice. One thread polling the server for > each race with the desired polling interval. Each time some data is > treated, that thr

Re: removing extension

2008-04-27 Thread Arnaud Delobelle
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> writes: > Not exactly. In the case of no extension `os.path.splitext()` still works: > > In [14]: 'foo/bar.txt'.rsplit('.') > Out[14]: ['foo/bar', 'txt'] > > In [15]: 'foo/bar'.rsplit('.') > Out[15]: ['foo/bar'] > > In [16]: os.path.splitext('foo/bar')

Mapping and Filtering Help for Lists

2008-04-27 Thread Zethex
Alright I got asked today by a friend this question, which obviously I couldn't help him with. He needs to get rid of words in a string referring to an already given list then needs to map them using a function he already has. Ill explain this better by giving an example :P Say ur given these l

Re: Tremendous slowdown due to garbage collection

2008-04-27 Thread Dieter Maurer
Christian Heimes <[EMAIL PROTECTED]> writes on Sat, 12 Apr 2008 18:47:32 +0200: > [EMAIL PROTECTED] schrieb: > > which made me suggest to use these as defaults, but then > > Martin v. Löwis wrote that > > > >> No, the defaults are correct for typical applications. > > > > At that point I felt los

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread Jorge Godoy
bullockbefriending bard wrote: > Tempting thought, but one of the problems with this kind of horse > racing tote data is that a lot of it is for combinations of runners > rather than single runners. Whilst there might be (say) 14 horses in a > race, there are 91 quinella price combinations (1-2 th

Re: Mapping and Filtering Help for Lists

2008-04-27 Thread Eric Wertman
You should check out the sets module: http://docs.python.org/lib/module-sets.html > > The problem asks to create a "compareandremove" so that you can use it on a > string, to remove the words from the string that are contained in un_words. > > The remaining words then need to be compared to

Re: Mapping and Filtering Help for Lists

2008-04-27 Thread Arnaud Delobelle
Zethex <[EMAIL PROTECTED]> writes: > Alright I got asked today by a friend this question, which obviously I > couldn't help him with. > > He needs to get rid of words in a string referring to an already given list > then needs to map them using a function he already has. Ill explain this > better

Re: diffing and uniqing directories

2008-04-27 Thread castironpi
On Apr 27, 2:37 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 26 Apr 2008 20:35:29 -0700, rustom wrote: > > On Apr 27, 12:31 am, [EMAIL PROTECTED] wrote: > >> On Apr 26, 1:14 pm, "Rustom Mody" <[EMAIL PROTECTED]> wrote: > >> […] > > > If this is an answer to my question I dont u

Re: Why can't timedeltas be divided?

2008-04-27 Thread Martin v. Löwis
> Well, http://bugs.python.org/issue1673409 seems very closely related. I can't see the relationship. This issue is about conversion methods, not about arithmetic. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: So you think PythonCard is old? Here's new wine in an old bottle.

2008-04-27 Thread castironpi
On Apr 26, 11:04 pm, John Henry <[EMAIL PROTECTED]> wrote: > On Apr 26, 3:03 pm, John Henry <[EMAIL PROTECTED]> wrote: > > > > > > > On Apr 26, 8:46 am, [EMAIL PROTECTED] (Aahz) wrote: > > > > In article <[EMAIL PROTECTED]>, > > > John Henry  <[EMAIL PROTECTED]> wrote: > > > > >But then I looked cl

Re: Why can't timedeltas be divided?

2008-04-27 Thread Martin v. Löwis
> i've had a look at the source code and written a small patch (attached; > contains a case in classical/floor division as well as truediv). > is there a defined escalation procedure from python-list to python-dev > or should i just send the suggestion+patch there? Post a patch to bugs.python.org,

Re: Tremendous slowdown due to garbage collection

2008-04-27 Thread Martin v. Löwis
> Martin said it but nevertheless it might not be true. > > We observed similar very bad behaviour -- in a Web application server. > Apparently, the standard behaviour is far from optimal when the > system contains a large number of objects and occationally, large > numbers of objects are created

Re: How do I say "Is this a function"?

2008-04-27 Thread Lie
On Apr 27, 11:01 am, John Henry <[EMAIL PROTECTED]> wrote: > On Apr 26, 6:08 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > > > > def f1(): > > >    print "In f1" > > > > def f3(): > > >    print "In f3" > > > > def others(): > > >    print "In others" > > > > for i in xrange(1,3): > > >  

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-27 Thread n00m
Both codes by Dennis Lee Bieber are Ok. The 2nd one ("slurper") , seems , a bit faster. I only corrected the author's typo: should be "% div" instead of "/ div". And added this (don't know helped it or not): if div == 1: print lim return And of course: import psyco psyco.full() -- http:

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread David
> Date is the time of the server response and not last data update. Data > is definitely time of server response to my request and bears no > relation to when the live XML data was updated. I know this for a fact > because right now there is no active race meeting and any data still > availabl

Re: Mapping and Filtering Help for Lists

2008-04-27 Thread Zethex
Thank you for the help so far. Another quick question, how can I remove the special characters such as ! and ?. I also need to lowercase the words so should i use sentence = sentence.lower() ? Thank you -- View this message in context: http://www.nabble.com/Mapping-and-Filtering-Help-for-List

Re: Mapping and Filtering Help for Lists

2008-04-27 Thread Zethex
Thank you a lot! Another quick couple of questions. How can i make it so it removes special operators such as ? ! or doesnt include them? and I need to lowercase the words so should i use sentence = sentence.lower()? -- View this message in context: http://www.nabble.com/Mapping-and-Filterin

Re: Loading associated files

2008-04-27 Thread Lie
On Apr 27, 8:21 pm, [EMAIL PROTECTED] wrote: > Yep, thats pretty much exactly what i had done, those exact settings, > and it still doesnt work. As i said i looked at the other keys to > check i had done it right and a i said the settings are fine because i > can send the file to python.exe and it

Re: diffing and uniqing directories

2008-04-27 Thread telus news
Just so happens that I am partially finished a gui file backup app. I have many backup CDs and I wanted to consolidate them. You know, all image files in one dir, all install files in another dir, etc. My app scans the input dir tree and displays all file extensions that it finds. You can then r

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-27 Thread Lie
On Apr 27, 6:28 am, n00m <[EMAIL PROTECTED]> wrote: > No so simple, guys. > E.g., I can't solve (in Python) this:http://www.spoj.pl/problems/INTEST/ > Keep getting TLE (time limit exceeded). Any ideas? After all, it's > weekend. > > 450. Enormous Input Test > Problem code: INTEST > > The purpose of

Re: So you think PythonCard is old? Here's new wine in an old bottle.

2008-04-27 Thread Ron Stephens
John, This is very interesting! Please do make this available. I love PythonCard, but I am doing mainly web programming these days. I will mention this on my next podcast. Can you do a slider? Ron Stephens Python411 www.awaretek.com/python/index.html -- http://mail.python.org/mailman/listinfo/py

Re: Receive data from socket stream

2008-04-27 Thread s0suk3
On Apr 26, 7:25 am, Irmen de Jong <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Until now, I've been > > doing this little trick: > > > data = client.recv(256) > > new = data > > while len(new) == 256: > > new = client.recv(256) > > data += new > > Are you aware that recv() will

Re: Mapping and Filtering Help for Lists

2008-04-27 Thread Arnaud Delobelle
Zethex <[EMAIL PROTECTED]> writes: > Thank you a lot! > > Another quick couple of questions. > > How can i make it so it removes special operators such as ? ! or doesnt > include them? As you are doing lots of string manipulations, I advise you to read the section of the python documentation on s

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread David
> 3) I need to dump this data (for all races, not just current about to > start race) to text files, store it as BLOBs in a DB *and* update real > time display in a wxpython windowed client. A few important questions: 1) How real-time must the display be? (should update immediately after you g

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-27 Thread n00m
Lie wrote: > On Apr 27, 6:28�am, n00m <[EMAIL PROTECTED]> wrote: > > No so simple, guys. > > E.g., I can't solve (in Python) this:http://www.spoj.pl/problems/INTEST/ > > Keep getting TLE (time limit exceeded). Any ideas? After all, it's > > weekend. > > > > 450. Enormous Input Test > > Problem co

Re: design choice: multi-threaded / asynchronous wxpython client?

2008-04-27 Thread David
> Tempting thought, but one of the problems with this kind of horse > racing tote data is that a lot of it is for combinations of runners > rather than single runners. Whilst there might be (say) 14 horses in a > race, there are 91 quinella price combinations (1-2 through 13-14, > i.e. the 2-s

  1   2   >