GAMES

2010-08-24 Thread 097
games GAME 1 http://freeonlingamesplay.blogspot.com/2010/08/game-1.html GAME 2 http://freeonlingamesplay.blogspot.com/2010/08/game-2.html GAME 3 http://freeonlingamesplay.blogspot.com/2010/08/game-3.html GAME 4 http://freeonlingamesplay.blogspot.com/2010/08/game-4.html GAME 5 http://fr

Re: ftplib limitations?

2010-08-24 Thread Stefan Schwarzer
Hi durumdara, On 2010-08-24 16:29, Stefan Schwarzer wrote: >> I experienced some problem. >> The server is Windows and FileZilla, the client is Win7 and Python2.6. >> When I got a file with size 1 303 318 662 byte, python is halt on >> "retrbinary" line everytime. > > So if I understand correctly

Re: How to implement a pipeline...??? Please help

2010-08-24 Thread Ritchy lelis
On 11 Ago, 01:01, Ritchy lelis wrote: > On 7 Ago, 07:30, Dennis Lee Bieber wrote: > > > > > > > On Fri, 6 Aug 2010 16:47:58 -0700 (PDT), Ritchy lelis > > declaimed the following in > > gmane.comp.python.general: > > > > Guys i'm asking if it's possible for a generic function for a > > >pipeline,

Re: Working with PDFs?

2010-08-24 Thread Tim Arnold
wrote in message news:mailman.2465.1282591017.1673.python-l...@python.org... >> writes: > >>> - Pull out text from each PDF page (to search for specific words) >>> - Combine separate pdf documents into one document >>> - Add bookmarks (with destination settings) > >> PDF Shuffler is a Python app

Re: DDE Module for Python 3.1.2

2010-08-24 Thread Madhusoodan
Respected Stefan and Tim, Thanks very much for help. I found DDE tutorial for 2.6 but was wondering why I can't do it in 3.X. Thanks Stefan for pywin32. I was not knowing this tool. Thanks again to both of you. Regards madhusoodan On Aug 23, 5:12 pm, Tim Golden wrote: > On 23/08/2010 13:02,

pypy

2010-08-24 Thread Mag Gam
Just curious if anyone had the chance to build pypy on a 64bit environment and to see if it really makes a huge difference in performance. Would like to hear some thoughts (or alternatives). -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing data between objects and calling all objects of a class in turn

2010-08-24 Thread MRAB
On 25/08/2010 03:49, ghoetker wrote: I'm a fairly new Python coder, learning along with my son (actually, hopefully a bit ahead of him...). We're stuck on something. As part of solving a backwards induction problem (purely as a learning experience, we are geeks), we are going to create N objects

Passing data between objects and calling all objects of a class in turn

2010-08-24 Thread ghoetker
I'm a fairly new Python coder, learning along with my son (actually, hopefully a bit ahead of him...). We're stuck on something. As part of solving a backwards induction problem (purely as a learning experience, we are geeks), we are going to create N objects, each of the class "interview". We wi

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
John Bokma writes: > At an university which languages you see depend a lot on what your > teachers use themselves. A language is just a verhicle to get you from a > to b. Addendum: or to illustrate a concept (e.g. functional programming, oop) [..] > Like you, you mean? You consider yourself qui

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
Hugh Aguilar writes: > This is also the attitude that I find among college graduates. They > just believe what their professors told them in college, and there is > no why. Which college is that? It doesn't agree with my experiences. In CS quite a lot has to be proven with a formal proof, exactl

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
Hugh Aguilar writes: > On Aug 24, 5:16 pm, Paul Rubin wrote: >> Anyway, as someone else once said, studying a subject like CS isn't done >> by reading.  It's done by writing out answers to problem after problem. >> Unless you've been doing that, you haven't been studying. > > What about using wh

Re: problem with strptime and time zone

2010-08-24 Thread m_ahlenius
On Aug 24, 4:16 pm, Alex Willmer wrote: > On Aug 24, 9:45 pm, m_ahlenius wrote: > > > > > whereas this fails: > > myStrA = 'Sun Aug 22 19:03:06 PDT' > > gTimeA = strptime( myStrA, '%a %b %d %H:%M:%S %Z') > > print "gTimeA = ",gTimeA > > > ValueError: time data 'Sun Aug 22 19:03:06 PDT' does not m

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 21, 10:57 pm, Steven D'Aprano wrote: > Anyway, I'm looking forward to hear why overuse of the return stack is a > big reason why people use GCC rather than Forth. (Why GCC? What about > other C compilers?) Me, in my ignorance, I thought it was because C was > invented and popularised by the

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 24, 5:16 pm, Paul Rubin wrote: > Anyway, as someone else once said, studying a subject like CS isn't done > by reading.  It's done by writing out answers to problem after problem. > Unless you've been doing that, you haven't been studying. What about using what I learned to write programs

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
Paul Rubin writes: > Hugh Aguilar writes: >> I've read a lot of graduate-level CS books. > > Reading CS books doesn't make you a computer scientist any more than > listening to violin records makes you a violinist. Write out answers to > all the exercises in those books, and get your answers to

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Paul Rubin
Hugh Aguilar writes: > I've read a lot of graduate-level CS books. Reading CS books doesn't make you a computer scientist any more than listening to violin records makes you a violinist. Write out answers to all the exercises in those books, and get your answers to the more difficult ones checke

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Richard Owlett
Hugh Aguilar wrote: On Aug 24, 4:17 pm, Richard Owlett wrote: Hugh Aguilar wrote: [SNIP ;] The real problem here is that C, Forth and C++ lack automatic garbage collection. If I have a program in which I have to worry about memory leaks (as described above), I would be better off to ignore

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 24, 4:17 pm, Richard Owlett wrote: > Hugh Aguilar wrote: > > [SNIP ;] > > > The real problem here is that C, Forth and C++ lack automatic garbage > > collection. If I have a program in which I have to worry about memory > > leaks (as described above), I would be better off to ignore C, Fort

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
Hugh Aguilar writes: > On Aug 22, 11:12 am, John Bokma wrote: > >> And my >> experience is that a formal study in CS can't compare to home study >> unless you're really good and have the time and drive to read formal >> books written on CS. And my experience is that most self-educaters don't >>

Re: Reading the access attributes of directories in Windows

2010-08-24 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > Having this as a separate permission allows normal users to add entries to > log files but not to erase existing entries. Unix/Linux systems can do this already. -- http://mail.python.org/mailman/listinfo/python-list

RE: [Python-Dev] Released: Python 2.6.6

2010-08-24 Thread Martin Jernberg
yay new python release :) > From: raymond.hettin...@gmail.com > Date: Tue, 24 Aug 2010 13:40:11 -0700 > To: ba...@python.org > CC: python-announce-l...@python.org; python-list@python.org; > python-...@python.org > Subject: Re: [Python-Dev] Released: Python 2.6.6 > > > On Aug 24, 2010, at 12:31

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 24, 9:24 am, David Kastrup wrote: > Anybody worth his salt in his profession has a trail of broken things in > his history. When I was employed as a Forth programmer, I worked for two brothers. The younger one told me a funny story about when he was 13 or 14 years old. He bought a radio at

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Richard Owlett
Hugh Aguilar wrote: [SNIP ;] The real problem here is that C, Forth and C++ lack automatic garbage collection. If I have a program in which I have to worry about memory leaks (as described above), I would be better off to ignore C, Forth and C++ and just use a language that supports garbage coll

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 22, 11:12 am, John Bokma wrote: > And my > experience is that a formal study in CS can't compare to home study > unless you're really good and have the time and drive to read formal > books written on CS. And my experience is that most self-educaters don't > have that time. I've read a lo

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
David Kastrup writes: > John Bokma writes: > >> On the other hand: some people I knew during my studies had no problem >> at all with introducing countless memory leaks in small programs (and >> turning off compiler warnings, because it gave so much noise...) > > [...] > >> As for electrical eng

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 21, 12:18 pm, ehr...@dk3uz.ampr.org (Edmund H. Ramm) wrote: > In <2d59bfaa-2aa5-4396-bd03-22200df8c...@x21g2000yqa.googlegroups.com> Hugh > Aguilar writes: > > > [...] > > I really recommend that people spend a lot more time writing code, > > and a lot less time with all of this pseudo-int

Iran's self-defense options 'limitless' - against the YANQUI and KHAZAR Bustards - Brilliant ANALYSIS

2010-08-24 Thread nanothermite911fbibustards
Iran's self-defense options 'limitless' - against the YANQUI and KHAZAR Bustards - Brilliant ANALYSIS Iran's self-defense options 'limitless' Tue Aug 24, 2010 12:9AM President Mahmoud AhmadinejadIran's President Mahmoud Ahmadinejad says no military action is expected to be taken against the Islam

Re: problem with simple multiprocessing script on OS X

2010-08-24 Thread Benjamin Kaplan
On Tue, Aug 24, 2010 at 3:31 PM, Darren Dale wrote: > On Aug 23, 9:58 am, Darren Dale wrote: >> The following script runs without problems on Ubuntu and Windows 7. >> h5py is a package wrapping the hdf5 library (http://code.google.com/p/ >> h5py/): >> >> from multiprocessing import Pool >> import

Re: problem with strptime and time zone

2010-08-24 Thread Chris Rebert
On Tue, Aug 24, 2010 at 1:45 PM, m_ahlenius wrote: > Hi, > > perhaps I missed this posted already somewhere. > > I am got a program which reads time stings from some devices which > are  providing the time zones.  I have to take this into account when > doing some epoch time calculations. > > When

Re: problem with strptime and time zone

2010-08-24 Thread Alex Willmer
On Aug 24, 9:45 pm, m_ahlenius wrote: > > whereas this fails: > myStrA = 'Sun Aug 22 19:03:06 PDT' > gTimeA = strptime( myStrA, '%a %b %d %H:%M:%S %Z') > print "gTimeA = ",gTimeA > > ValueError: time data 'Sun Aug 22 19:03:06 PDT' does not match format > '%a %b %d %H:%M:%S %Z' Support for the %Z

Re: adodbapi help needed

2010-08-24 Thread Emile van Sebille
On 8/24/2010 1:38 PM Ian said... On 24/08/2010 18:08, Emile van Sebille wrote: On 8/24/2010 8:25 AM Ian Hobson said... Hi all, I am just starting to learn Python and I have a setup problem - I think. Python 3.1. def connect(connection_string, timeout=30): I expected that to be called.

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Richard Owlett
David Kastrup wrote: John Bokma writes: On the other hand: some people I knew during my studies had no problem at all with introducing countless memory leaks in small programs (and turning off compiler warnings, because it gave so much noise...) [...] As for electrical engineering: done th

Re: seach for pattern based on string

2010-08-24 Thread Alex Willmer
On Aug 24, 5:33 pm, richie05 bal wrote: > i am starting to learn python and I am stuck with query I want to > generate with python > File looks something like this > TRACE: AddNewBookD {bookId 20, noofBooks 6576, authorId 41, > publishingCompanyId 7} > TRACE: AddNewBookD {bookId 21, noofBooks 6577

Re: Help please! strange Tkinter behavior has me totally baffled.

2010-08-24 Thread Peter Otten
Steve Ferg wrote: > I have a short Python script that uses Tkinter to display an image. > Here is the script > > === > import sys, os > from Tkinter import * > root = Tk() # A: create a global variable named "root" > > def sh

Re: equivalent of source in python?

2010-08-24 Thread Astan Chee
Thanks for all the help. I think Chris's answer is the one I can use. I know its probably better to convert the /etc/setup file into python but it'll do for now. Also, the entire tsch script is just setting up env vars and such; various mvs and cps. Not really executing anything. Thanks again f

problem with strptime and time zone

2010-08-24 Thread m_ahlenius
Hi, perhaps I missed this posted already somewhere. I am got a program which reads time stings from some devices which are providing the time zones. I have to take this into account when doing some epoch time calculations. When I run the following code with the time zone string set to 'GMT' it

Re: [Python-Dev] Released: Python 2.6.6

2010-08-24 Thread Raymond Hettinger
On Aug 24, 2010, at 12:31 PM, Barry Warsaw wrote: > Hello fellow Pythoneers and Pythonistas, > > I'm very happy to announce the release of Python 2.6.6. Thanks Barry :-) Raymond -- http://mail.python.org/mailman/listinfo/python-list

Re: adodbapi help needed

2010-08-24 Thread Ian
On 24/08/2010 18:08, Emile van Sebille wrote: On 8/24/2010 8:25 AM Ian Hobson said... Hi all, I am just starting to learn Python and I have a setup problem - I think. Python 3.1. def connect(connection_string, timeout=30): I expected that to be called. What have I missed? The cur

Re: equivalent of source in python?

2010-08-24 Thread Thomas Jollans
On Tuesday 24 August 2010, it occurred to News123 to exclaim: > On 08/24/2010 09:18 PM, Astan Chee wrote: > > Hi, > > I'm trying to convert my tcsh script to python and am stuck at one part, > > particularly the part of the script that looks like this: > > > > #!/bin/tcsh > > setenv LSFLOG /var/tm

Re: problem with simple multiprocessing script on OS X

2010-08-24 Thread Thomas Jollans
On Tuesday 24 August 2010, it occurred to Darren Dale to exclaim: > On Aug 23, 9:58 am, Darren Dale wrote: > > The following script runs without problems on Ubuntu and Windows 7. > > h5py is a package wrapping the hdf5 library (http://code.google.com/p/ > > h5py/): > > > > from multiprocessing im

Re: equivalent of source in python?

2010-08-24 Thread Emile van Sebille
On 8/24/2010 12:18 PM Astan Chee said... Hi, I'm trying to convert my tcsh script to python and am stuck at one part, particularly the part of the script that looks like this: #!/bin/tcsh setenv LSFLOG /var/tmp/lsf_log source /etc/setup unalias cp umask 0 env >> ${AFLOG} What is the equivalent

Re: equivalent of source in python?

2010-08-24 Thread Chris Rebert
On Tue, Aug 24, 2010 at 12:18 PM, Astan Chee wrote: > Hi, > I'm trying to convert my tcsh script to python and am stuck at one part, > particularly the part of the script that looks like this: > > #!/bin/tcsh > setenv LSFLOG /var/tmp/lsf_log > source /etc/setup > unalias cp > umask 0 > env >> ${AF

Re: equivalent of source in python?

2010-08-24 Thread Stefan Schwarzer
Hi Astan, On 2010-08-24 21:18, Astan Chee wrote: > I'm trying to convert my tcsh script to python and am stuck at one part, > particularly the part of the script that looks like this: > > #!/bin/tcsh > setenv LSFLOG /var/tmp/lsf_log > source /etc/setup > unalias cp > umask 0 > env >> ${AFLOG} >

Re: Questions, newbies, and community (was: python terminology on classes)

2010-08-24 Thread Steve Ferg
I stand corrected. I didn't know the background. Thanks for supplying the larger picture. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: equivalent of source in python?

2010-08-24 Thread News123
On 08/24/2010 09:18 PM, Astan Chee wrote: > Hi, > I'm trying to convert my tcsh script to python and am stuck at one part, > particularly the part of the script that looks like this: > > #!/bin/tcsh > setenv LSFLOG /var/tmp/lsf_log > source /etc/setup > unalias cp > umask 0 > env >> ${AFLOG} > >

Help please! strange Tkinter behavior has me totally baffled.

2010-08-24 Thread Steve Ferg
I have a short Python script that uses Tkinter to display an image. Here is the script === import sys, os from Tkinter import * root = Tk() # A: create a global variable named "root" def showPicture(imageFilename): # globa

CRIMINAL YanQui MARINES BUSTARDS Cesar Laurean Regularly RAPE GIRLS Maria Lauterbach and KILL THEM

2010-08-24 Thread small Pox
CENSORSHIP by GOOGLE NSA BUSTARDS deleted my earlier post dated Mon, Aug 23, 2010 at 7:33 PM from google groups. but its archived in the mailing lists linked to the various newsgroups. CRIMINAL YanQui MARINES BUSTARDS Cesar Laurean Regularly RAPE GIRLS Maria Lauterbach and KILL THEM Is he a Jew o

CRIMINAL YanQui MARINES BUSTARDS Cesar Laurean Regularly RAPE GIRLS Maria Lauterbach and KILL THEM

2010-08-24 Thread small Pox
CENSORSHIP by GOOGLE NSA BUSTARDS deleted my earlier post dated Mon, Aug 23, 2010 at 7:33 PM from google groups. but its archived in the mailing lists linked to the various newsgroups. CRIMINAL YanQui MARINES BUSTARDS Cesar Laurean Regularly RAPE GIRLS Maria Lauterbach and KILL THEM Is he a Jew o

Re: problem with simple multiprocessing script on OS X

2010-08-24 Thread Darren Dale
On Aug 23, 9:58 am, Darren Dale wrote: > The following script runs without problems on Ubuntu and Windows 7. > h5py is a package wrapping the hdf5 library (http://code.google.com/p/ > h5py/): > > from multiprocessing import Pool > import h5py > > def update(i): >     print i > > def f(i): >     "h

Released: Python 2.6.6

2010-08-24 Thread Barry Warsaw
Hello fellow Pythoneers and Pythonistas, I'm very happy to announce the release of Python 2.6.6. A truly impressive number of bugs have been fixed since Python 2.6.5. Source code and Windows installers for Python 2.6.6 are now available here: http://www.python.org/download/releases/2.6.6/

Re: make install DESTDIR

2010-08-24 Thread aj
On Aug 23, 10:52 pm, "Martin v. Loewis" wrote: > > Thanks Martin. That seems to work. I will file a bug report. Also, can > > you describe what the problem was? > > If you have / as the prefix, you get two leading slashes, e.g. for > //lib/python2.x. Any other prefix would have given you only a si

equivalent of source in python?

2010-08-24 Thread Astan Chee
Hi, I'm trying to convert my tcsh script to python and am stuck at one part, particularly the part of the script that looks like this: #!/bin/tcsh setenv LSFLOG /var/tmp/lsf_log source /etc/setup unalias cp umask 0 env >> ${AFLOG} What is the equivalent of doing this in python2.5? Thanks again

Re: Declare self.cursor

2010-08-24 Thread Mel
Dani Valverde wrote: > Hello! > I am working on a GUI to connect to a MySQL database using MySQLdb (code > in attached file). I define the cursor in lines 55-66 in the OnLogin > function within the LoginDlg class. > > /db= MySQLdb.connect(host='localhost', user=Username , passwd=pwd, > db='Ornith

Declare self.cursor

2010-08-24 Thread Dani Valverde
Hello! I am working on a GUI to connect to a MySQL database using MySQLdb (code in attached file). I define the cursor in lines 55-66 in the OnLogin function within the LoginDlg class. /db= MySQLdb.connect(host='localhost', user=Username , passwd=pwd, db='Ornithobase') self.cursor = db.curso

Re: adodbapi help needed

2010-08-24 Thread Emile van Sebille
On 8/24/2010 8:25 AM Ian Hobson said... Hi all, I am just starting to learn Python and I have a setup problem - I think. Python 3.1. def connect(connection_string, timeout=30): I expected that to be called. What have I missed? The current revision includes the caveat: This module

seach for pattern based on string

2010-08-24 Thread richie05 bal
i am starting to learn python and I am stuck with query I want to generate with python File looks something like this TRACE: AddNewBookD {bookId 20, noofBooks 6576, authorId 41, publishingCompanyId 7} TRACE: AddNewBookD {bookId 21, noofBooks 6577, authorId 42, publishingCompanyId 8} I want to firs

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread David Kastrup
John Bokma writes: > On the other hand: some people I knew during my studies had no problem > at all with introducing countless memory leaks in small programs (and > turning off compiler warnings, because it gave so much noise...) [...] > As for electrical engineering: done that (BSc) and one o

CRIMINAL MARINES Cesar Laurean Regularly RAPE GIRLS Maria Lauterbach and KILL THEM

2010-08-24 Thread nanothermite911fbibustards
CENSORSHIP by GOOGLE NSA BUSTARDS deleted my earlier post dated Mon, Aug 23, 2010 at 7:33 PM from google groups. but its archived in the mailing lists linked to the various newsgroups. CRIMINAL MARINES Cesar Laurean Regularly RAPE GIRLS Maria Lauterbach and KILL THEM Is he a Jew or a white Anglo

adodbapi help needed

2010-08-24 Thread Ian Hobson
Hi all, I am just starting to learn Python and I have a setup problem - I think. Python 3.1. I have a small test script that is not working as expected. Start script--- # coding=utf8 import adodbapi connectString = ( "DRIVER={MySQL ODBC 5.1 Driver} ;" "SERVER=127.0.0.1;" "

easy n perfect earning

2010-08-24 Thread sumit
hey guys try dis link n make account...click on view adds...click on every add n leave it 4 60sec n once cmpleted click on my account n u vl c tat u got $40.. http://www.fineptc.com/index.php?ref=sumit4u2010 ...must try...i hav experienced and its safe -- http://mail.python.org/mailman/listinfo/

Re: Python parsing XML file problem with SAX

2010-08-24 Thread Aahz
In article , Stefan Behnel wrote: >Christian Heimes, 10.08.2010 01:39: >> Am 10.08.2010 01:20, schrieb Aahz: >>> The docs say, "Parses an XML section into an element tree incrementally". >>> Sure sounds like it retains the entire parsed tree in RAM. Not good. >>> Again, how do you parse an XML f

Re: iter

2010-08-24 Thread Aahz
In article , Terry Reedy wrote: > >Changing a list while iterating through it is possible, sometimes >useful, but error prone, especially with insert or delete. Changing a >dict while iterating through it is prohibited since the iteration order >depends on the exact internal structure. That in

Re: ftplib limitations?

2010-08-24 Thread Stefan Schwarzer
Hi durumdara, On 2010-08-24 11:21, durumdara wrote: > def CallBack(Data): > d['size'] = d['size'] + len(Data) > d['buffer'].append(Data) > percent = (d['size'] / float(fsize)) * 100 > percentp10 = int(percent/10) > if percentp10 > d['lastpercentp10']: >

Re: Contains/equals

2010-08-24 Thread Hrvoje Niksic
Lawrence D'Oliveiro writes: > In message , Alex Hall > wrote: > >> def __eq__(self, obj): >> if self.a==obj.a and self.b==obj.b: return True >> return False > > Is there a “Useless Use Of ...” award category for these “if then > return True; else return False” constructs? Well, remember

Re: Using String Methods In Jump Tables

2010-08-24 Thread John Pinner
On Aug 20, 12:27 am, Tim Daneliuk wrote: > Problem: > >   Given tuples in the form (key, string), use 'key' to determine >   what string method to apply to the string: > >     key           operation >     --- > >      l            lower() >      u            upper() >      t  

Re: Using String Methods In Jump Tables

2010-08-24 Thread Tim Daneliuk
On 8/23/2010 4:22 PM, Hrvoje Niksic wrote: > Tim Daneliuk writes: > >>You can get away with this because all string objects appear to point to >> common >>method objects. That is,: id("a".lower) == id("b".lower) > > A side note: your use of `id' has misled you. id(X)==id(Y) is not a >

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Alex McDonald
On 24 Aug, 01:00, Hugh Aguilar wrote: > On Aug 21, 12:32 pm, Alex McDonald wrote: > > > "Scintilla" gets about 2,080,000 results on google; "blather" gets > > about 876,000 results. O Hugh, you pseudo-intellectual you! > > > > with gutter language such as > > > "turd" > > > About 5,910,000 result

comp.lang.python

2010-08-24 Thread roshini begum
www.127760.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Helper classes design question

2010-08-24 Thread Jean-Michel Pichavant
John O'Hagan wrote: I want to know the best way to organise a bunch of functions designed to operate on instances of a given class without cluttering the class itself with a bunch of unrelated methods. What I've done is make what I think are called helper classes, each of which are initialize

Re: What is a class method?

2010-08-24 Thread Jean-Michel Pichavant
Paulo da Silva wrote: Em 23-08-2010 04:30, James Mills escreveu: On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva wrote: I understand the concept of a static method. However I don't know what is a class method. Would anybody pls. explain me? Please read this first: http://docs.

Re: Save/load like matlab?

2010-08-24 Thread Almar Klein
On 24 August 2010 11:46, Mark Leander wrote: > Almar Klein gmail.com> writes: > > A year ago or so I designed a simple file format that could do that and > is also > > human readable (binary data is compressed and then base64 encoded). I use > it > > extensively to store experiment data for my r

Re: Contains/equals

2010-08-24 Thread Lawrence D'Oliveiro
In message , Alex Hall wrote: > def __eq__(self, obj): > if self.a==obj.a and self.b==obj.b: return True > return False Is there a “Useless Use Of ...” award category for these “if then return True; else return False” constructs? -- http://mail.python.org/mailman/listinfo/python-list

Re: requirements in writing an email/rss/usenet client?

2010-08-24 Thread Lawrence D'Oliveiro
In message , George Oliver wrote: > I currently use Thunderbird + Muttator, which is a nice setup; but, it > has some clunky parts, and I thought it might be simpler in the end to > start fresh than try to engage with what seems to be the massive-ness > of Thunderbird (of course, I may be disabus

Re: Reading the access attributes of directories in Windows

2010-08-24 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > 1. There are far more permission types than just "rwx". One thing Windows lacks is the ability to replace files that are currently open by another process. This is why Windows software updates require so many reboots. On Unix/Linux, you can replace the files, then r

Re: 79 chars or more?

2010-08-24 Thread Lawrence D'Oliveiro
In message , Jean-Michel Pichavant wrote: > Lawrence D'Oliveiro wrote: > >> In message >> , Jean-Michel >> Pichavant wrote: >> >>> Saying that, if one intend to distribute its code, he should stick to 80 >>> chars per line. >>> >> >> Why? >> > Because some(many ?) people cannot deal wi

Re: curses KEY_* constants

2010-08-24 Thread Bill Green
On 2010-08-24, Bill Green wrote: > ... but these > constants (for the arrow keys at least) seem not to match the actual > keycodes. After looking at the documentation again I've realized I needed to enable keypad mode on the window for curses to catch the escape codes, and now everything's workin

Re: Save/load like matlab?

2010-08-24 Thread Mark Leander
Almar Klein gmail.com> writes: > A year ago or so I designed a simple file format that could do that and is > also > human readable (binary data is compressed and then base64 encoded). I use it > extensively to store experiment data for my research and also for > configuration > files for two op

Re: curses KEY_* constants

2010-08-24 Thread Bill Green
I perhaps should have mentioned I linked the Python curses module against ncurses rather than BSD curses. Perhaps NetBSD's curses doesn't support this feature, and that's why it's not included there. In any case, I removed the relevant #defines in _cursesmodule.c and got a Python that includes a

Re: 79 chars or more?

2010-08-24 Thread Jean-Michel Pichavant
Lawrence D'Oliveiro wrote: In message , Jean-Michel Pichavant wrote: Saying that, if one intend to distribute its code, he should stick to 80 chars per line. Why? Because some(many ?) people cannot deal with more than 80 chars, otherwise this rule would be pointless. JM -- h

ftplib limitations?

2010-08-24 Thread durumdara
Hi! See this code: import os, sys, ftplib from ftplib import FTP ftp = FTP() ftp.connect('ftp.anything.hu', 2121) ftp.login('?', '?') print ftp.getwelcome() ftp.set_pasv(False) ls = ftp.nlst() for s in ls: print "\nFilename:", '"%s"' % s, fsize = ftp.size(s) print

Re: Iterative vs. Recursive coding

2010-08-24 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Fri, 20 Aug 2010 17:23:23 +0200, Bruno Desthuilliers wrote: Steven D'Aprano a écrit : On Thu, 19 Aug 2010 22:00:16 +, Martin Gregorie wrote: Recursion can be quite a trick to get your mind round at first Really? Do people actually find the *concept* of recur

curses KEY_* constants

2010-08-24 Thread Bill Green
Hello, According to the documentation for the curses module, there are a number of constants defined for various special keys (such as KEY_DOWN, KEY_UP, KEY_BACKSPACE, etc.). However, these do not exist on my system (NetBSD 5). Looking at _cursesmodule.c, the code that sets up the KEY_ variables

ANN: LFC 1.0

2010-08-24 Thread Kai Diefenbach
Hi guys, today we released LFC 1.0. This is the first final release of LFC. LFC is a CMS based on Python, Django and jQuery. You can find the installer here: http://pypi.python.org/pypi/django-lfc/1.0. The installation is described here: http://packages.python.org/django-lfc/introduction/ins

Re: Helper classes design question

2010-08-24 Thread Steven D'Aprano
On Mon, 23 Aug 2010 19:22:46 +0200, Thomas Jollans wrote: > On Monday 23 August 2010, it occurred to John O'Hagan to exclaim: [...] >> I'm not sure if I'm on the right track here design-wise. Maybe this >> could be better done with inheritance (not my forte), but my first >> thought is that no, th

Re: help in code

2010-08-24 Thread Steven D'Aprano
On Mon, 23 Aug 2010 22:40:04 -0700, pahi sharma wrote: > I am new to python .I have a corpus which is written in Bengali and i > want to read that file using python code.Can anyone help me in this > matter. In Python 3, I believe this should work: f = open("filename", encoding="which-encoding-yo