Re: best way to determine sequence ordering?

2006-04-30 Thread Kay Schluehr
> * building a dict of indicies:: > >positions = dict((item, i) for i, item in enumerate(L)) > >if positions['A'] < positions['D']: ># do some stuff > >You'll only get a gain from this version if you need to do several > comparisons instead of just one. Hi Steven,

Re: basic python programing

2006-04-30 Thread Ravi Teja
How To Ask Questions The Smart Way http://www.catb.org/~esr/faqs/smart-questions.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Unpacking of query result

2006-04-30 Thread DarkBlue
Hello Following part of an database query works fine : self.cur=con1.cursor self.cur.execute('select a,b,c,d from t1') for (a,b,c,d) in self.cur: print a,b,c,d but how to do this: self.cur.execute(sql_select_text_put_in_at_runtime) for (whatever_was_in_the_select_text_part_of_the_query) i

Re: time conversions [hh:mm:ss.ms <-> sec(.ms)

2006-04-30 Thread Faber
kpp9c wrote: > timedelta looks to be just the ticket! bravo, thank you... i guess this > must be pretty new to Python. Well, since Python 2.3 (July 2003): http://www.python.org/doc/2.3.5/whatsnew/node18.html#SECTION000181 :-) -- Faber http://faberbox.com/ http://smarking.com/

Re: Unpacking of query result

2006-04-30 Thread Fredrik Lundh
"DarkBlue" <[EMAIL PROTECTED]> wrote: > Following part of an database query works fine : > > self.cur=con1.cursor > self.cur.execute('select a,b,c,d from t1') > for (a,b,c,d) in self.cur: > print a,b,c,d > > > but how to do this: > > self.cur.execute(sql_select_text_put_in_at_runtime) > for (w

Re: Unpacking of query result

2006-04-30 Thread DarkBlue
Thank you Mission accomplished. Have a nice sunday Db -- http://mail.python.org/mailman/listinfo/python-list

Re: self modifying code

2006-04-30 Thread Robin Becker
Ben C wrote: ... > > Why not just: > > data = None > def func(a): > global data > > if not data: > data = somethingcomplexandcostly() > > return simple(data, a) > well in the original instance the above reduced to something like data=None def func(arg): global da

Re: setting file permissions on a web server

2006-04-30 Thread Rene Pijlman
John Salerno: >I always read about how you need to set certain file permissions (for >cgi files, for example), but it's never been clear to me *how* you do >this. I know you can run the line > >chmod 755 scriptname.py > >but *where* do you run this? This is a Unix/Linux command. You run it in a

Re: setting file permissions on a web server

2006-04-30 Thread Daniel Nogradi
> I always read about how you need to set certain file permissions (for > cgi files, for example), but it's never been clear to me *how* you do > this. I know you can run the line > > chmod 755 scriptname.py > > but *where* do you run this? Is this done on your personal system, or on > the server?

bonobo bindings?

2006-04-30 Thread Patrick Jacquot
Hi group! Did anybosy here have some success using the bonobo bindings to interact with nautilus? -- Patrick -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Leo 4.4 rc1 released

2006-04-30 Thread Fulvio
Alle 19:15, sabato 29 aprile 2006, Fredrik Lundh ha scritto: > emacs I didn't like Emacs since the glory day of Amiga. Also vim look pretty rough for my tastes. I fill more confortable in Kate, but I don't deny any furter trial. May I'm gonna reconsidering Emacs :) F -- http://mail.python.org/m

Re: how not use memmove when insert a object in the list

2006-04-30 Thread Fredrik Lundh
"kyo guan" wrote: > for (i = n; --i >= where; ) /// here, why not use memmove? it would be more > speed then this loop. >items[i+1] = items[i]; have you benchmarked this on a wide variety of platforms, or are you just guessing? -- http://mail.python.org/mailman/listinfo/python-list

unable to resize mmap object

2006-04-30 Thread Fabiano Sidler
Hi folks! I created an mmap object like so: --- snip --- from mmap import mmap,MAP_ANONYMOUS,MAP_PRIVATE fl = file('/dev/zero','rw') mm = mmap(fl.fileno(), 1, MAP_PRIVATE|MAP_ANONYMOUS) --- snap --- Now, when I try to resize mm to 10 byte --- snip --- mm.resize(10) --- snap --- I get an Environme

Re: resume picking items from a previous list

2006-04-30 Thread [EMAIL PROTECTED]
kpp9c wrote: > I have a several list of songs that i pick from, lets, say that there > are 10 songs in each list and there are 2 lists. > > For a time i pick from my songs, but i only play a few of the songs in > that list... now my wife, Jessica Alba, comes home, and i start playing > from Jessic

Re: how not use memmove when insert a object in the list

2006-04-30 Thread John Machin
On 30/04/2006 11:57 AM, kyo guan wrote: > Hi : > > python list object like a stl vector, if insert a object in the front > or the middle of it, > all the object after the insert point need to move backward. > > look at this code ( in python 2.4.3) > > for (i = n; --i >= where; )

Re: stdin: processing characters

2006-04-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Edward Elliott <[EMAIL PROTECTED]> wrote: >Kevin Simmons wrote: >> I have a python script that prompts the user for input from stdin via a >> menu. I want to process that input when the user types in two characters >> and not have to have the user press . As a compa

ANN: eric3 3.9.0 released

2006-04-30 Thread Detlev Offenbach
Hi, this is to inform you of the release of eric3 3.9.0. This version includes support for Qt4 and PyQt4. It will be the last major release in the eric3 line of development. From now on the development effort will concentrate on eric4, the PyQt4 variant of the IDE. As usual the release is availabl

Can I collapse a Panel in wxPython?

2006-04-30 Thread nuffnough
Hi. I have a gui with one frame and 5 panels. The second panel will only be required in some cases, so I am wondering if there is some way I can only create this panel in the circumstances where it is required, confirmed by a simple len(list) > 1 If it is possible, I am wondering how I might go

Converting tuple to String

2006-04-30 Thread Byte
Is their a command to convert a tuple to string? e.g. xyz = "Hello", "There" print xyz Is their any way of getting print to see xyz as being one string i.e. "Hello There" rather than "Hello" and "There", despite "Hello" and "There" being, in reality, seperate? Thanks in advance, -- /usr/bin/byt

Re: Converting tuple to String

2006-04-30 Thread Tim Williams
On 30 Apr 2006 08:32:47 -0700, Byte <[EMAIL PROTECTED]> wrote: xyz = "Hello", "There"print xyzIs their any way of getting print to see xyz as being one string i.e."Hello There" rather than "Hello" and "There", despite "Hello" and "There" being, in reality, seperate? >>> print  " ".join(xyz)Hello Th

Re: best way to determine sequence ordering?

2006-04-30 Thread Steven Bethard
Kay Schluehr wrote: >> * building a dict of indicies:: >> >>positions = dict((item, i) for i, item in enumerate(L)) >> >>if positions['A'] < positions['D']: >># do some stuff >> >>You'll only get a gain from this version if you need to do several >> comparisons inste

Re: Converting tuple to String

2006-04-30 Thread Stefan Lang
On Sunday 30 April 2006 17:32, Byte wrote: > Is their a command to convert a tuple to string? e.g. > > xyz = "Hello", "There" > print xyz > > Is their any way of getting print to see xyz as being one string > i.e. "Hello There" rather than "Hello" and "There", despite "Hello" > and "There" being, i

Re: Converting tuple to String

2006-04-30 Thread Daniel Nogradi
> Is their a command to convert a tuple to string? e.g. > > xyz = "Hello", "There" > print xyz > > Is their any way of getting print to see xyz as being one string i.e. > "Hello There" rather than "Hello" and "There", despite "Hello" and > "There" being, in reality, seperate? Try one_big_string =

Re: Converting tuple to String

2006-04-30 Thread Byte
Great, that works thanks -- /usr/bin/byte -- http://mail.python.org/mailman/listinfo/python-list

Re: setting file permissions on a web server

2006-04-30 Thread John Salerno
Daniel Nogradi wrote: > In short, chmod refers to local files so wherever you run it it will > refer to files on that machine. You run it simply by typing it in a > shell as a user who has privilage to perform the operatation, which > can mean you have to be an owner of the file but if you are roo

Hierarchy - how?

2006-04-30 Thread veracon
I'd like to know how to make the following string: food fruit red cherry yellow banana meat pork foo bar baz qux Result in a dictionary like this: {'food': {'fruit': {'red': 'cherry', 'yellow': 'banana'}, 'meat': 'pork'}, 'foo': {'bar': 'baz', 'qux': {}}} Or something like that

Re: Hierarchy - how?

2006-04-30 Thread Heiko Wundram
Am Sonntag 30 April 2006 19:26 schrieb veracon: > -- Keep in mind that I don't want a string, I want a dictionary (but I > can't figure out how to do it). The following code does what you want: >>> # -*- coding: iso-8859-15 -*- data = """food fruit red cherry yellow banana meat por

Re: basic python programing

2006-04-30 Thread gregarican
Ravi Teja wrote: > How To Ask Questions The Smart Way > http://www.catb.org/~esr/faqs/smart-questions.html Actual the parent post on the thread wasn't asking a question. They were making a somewhat puzzling dangling statement. "here we discuss the most basic concepts about python" Where is _her

Re: setting file permissions on a web server

2006-04-30 Thread Diez B. Roggisch
> I suppose I could write a script that would set the permissions of all > the files in a particular folder on my computer to 755, but is there a > Windows equivalent command for chmod to do this? Or am I stuck having to > do it on the server side? The chmod has to be executed on the machine th

Re: Add file to zip, or replace file in zip

2006-04-30 Thread Scott David Daniels
Roger Miller wrote: > First note that zipfile is a plain Python module, so reading > Python.../Lib/zipfile.py will reveal all its secrets. > > I don't think it is possible to replace archive members using the > module. You could copy all the files into a new zip file, replacing the > ones you want

Re: basic python programing

2006-04-30 Thread Grant Edwards
On 2006-04-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > here we discuss the most basic concepts about python. Yes we do. As well as the most basic concepts about Usenet. -- Grant Edwards [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: stdin: processing characters

2006-04-30 Thread Serge Orlov
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Edward Elliott <[EMAIL PROTECTED]> wrote: > >Kevin Simmons wrote: > >> I have a python script that prompts the user for input from stdin via a > >> menu. I want to process that input when the user types in two characters > >> and not have t

Re: unable to resize mmap object

2006-04-30 Thread Serge Orlov
Fabiano Sidler wrote: > Hi folks! > > I created an mmap object like so: > --- snip --- > from mmap import mmap,MAP_ANONYMOUS,MAP_PRIVATE > fl = file('/dev/zero','rw') > mm = mmap(fl.fileno(), 1, MAP_PRIVATE|MAP_ANONYMOUS) > --- snap --- > > Now, when I try to resize mm to 10 byte > --- snip --- >

Re: Can I collapse a Panel in wxPython?

2006-04-30 Thread rbann11
[EMAIL PROTECTED] wrote: > Hi. > > I have a gui with one frame and 5 panels. The second panel will only > be required in some cases, so I am wondering if there is some way I > can only create this panel in the circumstances where it is required, > confirmed by a simple len(list) > 1 > > If it is

Re: installing pyodbc

2006-04-30 Thread Paul Watson
timw.google wrote: > I just downloaded the pyodbc source to try and install on my Linux FC3 > box. I see that there is a setup.py file, but when I try to do a > 'python setup.py build' (or just 'python setup.py') I get > > Traceback (most recent call last): > File "setup.py", line 27, in ? >

Re: setting file permissions on a web server

2006-04-30 Thread Daniel Nogradi
> > In short, chmod refers to local files so wherever you run it it will > > refer to files on that machine. You run it simply by typing it in a > > shell as a user who has privilage to perform the operatation, which > > can mean you have to be an owner of the file but if you are root you > > can d

Re: basic python programing

2006-04-30 Thread John Kirkland
On 30 Apr 2006 00:48:47 -0700, Ravi Teja wrote: > How To Ask Questions The Smart Way > http://www.catb.org/~esr/faqs/smart-questions.html Damn, that's one of the best respones ever. :) WTG. Oh, and I'm not being sarcastic. That's a truly useful set of ideals. It's now joined my short and distin

Re: Add file to zip, or replace file in zip

2006-04-30 Thread Edward Elliott
Scott David Daniels wrote: > It is not currently possible to delete or replace individual elements > in a zip file, nor (in all likelihood) would you want to do so. It > would require having the zip[ file in a broken state for some time > as you copy data from one area of the zip to another. If

Re: setting file permissions on a web server

2006-04-30 Thread Edward Elliott
John Salerno wrote: > Thanks, but I'm still a little confused. Since I'm running Windows You misplaced your period, it goes at the end of that line. ;) > assume that I can't run the chmod line on my own computer. Sure you can, install cygwin. chmod only affects files on your computer, and won'

Re: basic python programing

2006-04-30 Thread Edward Elliott
gregarican wrote: >> How To Ask Questions The Smart Way >> http://www.catb.org/~esr/faqs/smart-questions.html > > Actual the parent post on the thread wasn't asking a question. They > were making a somewhat puzzling dangling statement. Maybe it's time for the sequel, How To Make Smart Statements

Re: setting file permissions on a web server

2006-04-30 Thread Edward Elliott
Daniel Nogradi wrote: > I have next to zero experience with windows but as far as I know > windows doesn't have file permissions at all (anyone, please correct > me if I'm wrong :)) so in windows land it doesn't make any sense to > "change file permissions". Actually Windows has a quite good perm

Re: setting file permissions on a web server

2006-04-30 Thread Kirk McDonald
Daniel Nogradi wrote: > I have next to zero experience with windows but as far as I know > windows doesn't have file permissions at all (anyone, please correct > me if I'm wrong :)) so in windows land it doesn't make any sense to > "change file permissions". Even if it has some sort of a notion of

WAP page, Python and creating a file on file system - Newbie

2006-04-30 Thread Digital
HELP!! All I need to do is to create a file in a folder. I am running Abyss WEB server and Python. and googling many sites has taught me how to create a file in a folder. BUT. I need to do this from a WML file - This is proving difficult... I can setup an index.wml and a deck of cards. Each ca

Measure memory usage in Python

2006-04-30 Thread Rune Strand
Is there a way to measure how much memory a data structure use? For instance, what is the footprint of a particular list object like [0,1,2,3,4,5,6,7,8,9]? -- http://mail.python.org/mailman/listinfo/python-list

From the Tutorial Wiki: suggested restructure

2006-04-30 Thread Gerard Flanagan
For anyone interested, here's a blog entry I've added over at the Tutorial Wiki: As mentioned by effbot in the previous post I've put together a suggested alternative factoring of the Tutorial here(http://pytut.infogami.com/gerard_refactor). At the minute i

How to efficiently read binary files?

2006-04-30 Thread David Lees
I want to process large binary files (>2GB) in Python. I have played around with prototypes in pure Python and profiled the code. Most of the time seems to be spent converting back and forth to and from strings using the struct module. Is there a way to directly read into an array of integer

Re: How to efficiently read binary files?

2006-04-30 Thread Grant Edwards
On 2006-04-30, David Lees <[EMAIL PROTECTED]> wrote: > I want to process large binary files (>2GB) in Python. I have played > around with prototypes in pure Python and profiled the code. Most of > the time seems to be spent converting back and forth to and from strings > using the struct modul

Re: How to efficiently read binary files?

2006-04-30 Thread Robert Kern
Grant Edwards wrote: > On 2006-04-30, David Lees <[EMAIL PROTECTED]> wrote: > >>I want to process large binary files (>2GB) in Python. I have played >>around with prototypes in pure Python and profiled the code. Most of >>the time seems to be spent converting back and forth to and from strings

Re: How to efficiently read binary files?

2006-04-30 Thread Alex Martelli
David Lees <[EMAIL PROTECTED]> wrote: > I want to process large binary files (>2GB) in Python. I have played > around with prototypes in pure Python and profiled the code. Most of > the time seems to be spent converting back and forth to and from strings > using the struct module. Is there a wa

Re: setting file permissions on a web server

2006-04-30 Thread John Salerno
Daniel Nogradi wrote: > This depends on your arrangements with your web server provider. > Perhaps you are allowed to ssh into that machine, perhaps not, you > need to ask your provider. In case you can use ssh, then you can log > in with putty (an ssh client for windows, grab it from here: > http

ending a string with a backslash

2006-04-30 Thread John Salerno
I have this: subdomain = raw_input('Enter subdomain name: ') path = r'C:\Documents and Settings\John Salerno\My Documents\My Webs\1and1\johnjsalerno.com\' + subdomain Obviously the single backslash at the end of 'path' will cause a problem, and escaping it with a backslash seems to fix this pr

python and xulrunner

2006-04-30 Thread joe . hrbek
Hi everyone, sorry, this post is a bit off topic. I posted this on a devel xul thread on the mozilla groups but didn't get a response. My hope is that some of you may have interest in this and have tried it yourself. I've been trying to get xulrunner compiled with python (in windows) but have be

critique this little script, if you like

2006-04-30 Thread John Salerno
# Create new subdomain directory (with subdirectories) in my 1and1 folder import os import sys subdirs = [r'\cgi-bin', r'\images', r'\styles'] #if len(sys.argv) == 1: # subdomain = raw_input('Enter subdomain name: ') #else: # subdomain = sys.argv[1] try: subdomain = sys.argv[1] except

Re: setting file permissions on a web server

2006-04-30 Thread Martin P. Hellwig
John Salerno wrote: Most FTP servers do allow to use chmod in a ftp session, although you're client must support it. See for example a cli ftp client (and server) on FreeBSD. > [EMAIL PROTECTED]:~$ ftp ftp.xs4all.nl > Connected to ftp2.xs4all.nl. > 220 XS4ALL ftpd DCLXVI > Name (ftp.xs4all.nl:

ANN: nose 0.9.0a1

2006-04-30 Thread [EMAIL PROTECTED]
I'm pleased to announce the 0.9.0a1 release of nose, a test runner that brings py.test convenience to unittest, without resorting to (too much) magic. nose 0.9 includes a host of new features, as well as numerous backwards-incompatible changes to interfaces and implementation. For this reason, I'm

ANN: nose 0.9.0a1

2006-04-30 Thread [EMAIL PROTECTED]
I'm pleased to announce the 0.9.0a1 release of nose, a test runner that brings py.test convenience to unittest, without resorting to (too much) magic. nose 0.9 includes a host of new features, as well as numerous backwards-incompatible changes to interfaces and implementation. For this reason, I'm

file open "no such file"

2006-04-30 Thread Gary Wessle
I am getting this error when I try to run the code below f = open("~/m", "r") print f.read() :~$ python python/my.py Traceback (most recent call last): File "python/my.py", line 1, in ? f = open("~/m", "r") IOError: [Errno 2] No such file

python colorfinding

2006-04-30 Thread pain . and . cookies
how would i use python to find colors and click on them without actually moving the mouse -- http://mail.python.org/mailman/listinfo/python-list

Re: file open "no such file"

2006-04-30 Thread Robert Kern
Gary Wessle wrote: > I am getting this error when I try to run the code below > > > f = open("~/m", "r") > print f.read() > > > > :~$ python python/my.py > Traceback (most recent call last): > File "python/my.py", line 1, in ? > f = open("

Re: ending a string with a backslash

2006-04-30 Thread Edward Elliott
John Salerno wrote: > Obviously the single backslash at the end of 'path' will cause a > problem, and escaping it with a backslash seems to fix this problem, but > how does escaping work when I already have it as a raw string? see the first two items here: http://www.ferg.org/projects/python_gotc

Re: Using a browser as a GUI: which Python package

2006-04-30 Thread Don Taylor
John J. Lee wrote: > "André" <[EMAIL PROTECTED]> writes: > [...] > >>I would like to use a browser (e.g. Firefox) as a simple GUI >>"framework". Note that this is to be done on a single user machine, so >>the question of sandboxing is not really relevant here. > > [...] > >>My ultimate goal wou

Re: ending a string with a backslash

2006-04-30 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have this: > > subdomain = raw_input('Enter subdomain name: ') > > path = r'C:\Documents and Settings\John Salerno\My Documents\My > Webs\1and1\johnjsalerno.com\' + subdomain For any direct use of paths within Python (

Re: How to efficiently read binary files?

2006-04-30 Thread David Lees
Alex Martelli wrote: > David Lees <[EMAIL PROTECTED]> wrote: > >> I want to process large binary files (>2GB) in Python. I have played >> around with prototypes in pure Python and profiled the code. Most of >> the time seems to be spent converting back and forth to and from strings >> using the

How can I implement a timeout with subprocess.Popen()?

2006-04-30 Thread I. Myself
I want my Python program to invoke a compiled C program, and capture the text output. Here's a fragment from a program that works, using subprocess.Popen: p = Popen(execName, stdout=PIPE) while(1): line = p.stdout.readline() # get next line outfile.write(line) (The

Re: critique this little script, if you like

2006-04-30 Thread Dave Jones
Hi John! About the path and the \'s, take a look at the os.path.join function. The function is smart enough to add the correct slash when joining directories. Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: finding IP address of computer

2006-04-30 Thread Paul Watson
DarkBlue wrote: > Chris wrote: > > >>How do I find and print to screen the IP address of the computer my >>python program is working on? > > > def readip(): > import re, urllib > f = urllib.urlopen('http://checkip.dyndns.org') > s = f.read() > m = re.search('([\d]*\.[\d]*\.[\d]*\.[\d]*)', s

How to prevent this from happening?

2006-04-30 Thread phil_nospam_schmidt
Regarding this expression: 1 << x I had a bug in my code that made x become Very Large - much larger than I had intended. This caused Python, and my PC, to lock up tight as a drum, and it appeared that the Python task (Windows XP) was happily and rapidly consuming all available virtual memory. P

Re: ending a string with a backslash

2006-04-30 Thread John Salerno
Edward Elliott wrote: > John Salerno wrote: >> Obviously the single backslash at the end of 'path' will cause a >> problem, and escaping it with a backslash seems to fix this problem, but >> how does escaping work when I already have it as a raw string? > > see the first two items here: > http://

Re: critique this little script, if you like

2006-04-30 Thread John Salerno
Dave Jones wrote: > Hi John! > > About the path and the \'s, take a look at the os.path.join function. > The function is smart enough to add the correct slash when joining > directories. > > Dave Interesting, thanks! I was reading about the normcase() function, but your suggestion might be bett

Re: critique this little script, if you like

2006-04-30 Thread John Salerno
John Salerno wrote: > Dave Jones wrote: >> Hi John! >> >> About the path and the \'s, take a look at the os.path.join function. >> The function is smart enough to add the correct slash when joining >> directories. >> >> Dave > > Interesting, thanks! I was reading about the normcase() function, but

Re: Measure memory usage in Python

2006-04-30 Thread gene tani
Rune Strand wrote: > Is there a way to measure how much memory a data structure use? For > instance, what is the footprint of a particular list object like > [0,1,2,3,4,5,6,7,8,9]? i have a note to try this, but haven't got around to it, if you want to blog/post http://pysizer.8325.org/ -- htt

Re: wxpython - new line in radiobutton's label?

2006-04-30 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >I am creating a small gui using wxGlade and wxPython. I am using a >radio button, and the text next to the options needs to be over two >lines. I tried using a \n character, but it seems to get ignored. > >Looking around in the various wikis and the example code also

returning none when it should be returning a list?

2006-04-30 Thread randomtalk
hello, i have another problem i feel that i have to be missing something.. Basically, i've written a recursive function to find all the prime up to a number (lim).. here is the function: The function basically takes in a list of all the prime number found, it takes the next number to be tested for

Re: How to prevent this from happening?

2006-04-30 Thread John Machin
On 1/05/2006 12:55 PM, [EMAIL PROTECTED] wrote: > Regarding this expression: 1 << x > > I had a bug in my code that made x become Very Large - much larger than > I had intended. This caused Python, and my PC, to lock up tight as a > drum, and it appeared that the Python task (Windows XP) was happ

SPE / winpdb problem

2006-04-30 Thread MakaMaka
Hi All, I'm having a problem with Stani's Python Editor (SPE) that I'm hoping somebody has run into before. If I create a simple hello world program: print "hello" and try and run it in winpdb via the SPE command ALT-F9, the program does not launch and the following results (It's at the bottom):

Re: returning none when it should be returning a list?

2006-04-30 Thread John Machin
On 1/05/2006 2:52 PM, [EMAIL PROTECTED] wrote: > hello, i have another problem i feel that i have to be missing > something.. Basically, i've written a recursive function to find all > the prime up to a number (lim).. here is the function: > > The function basically takes in a list of all the prim

Re: returning none when it should be returning a list?

2006-04-30 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > The function basically takes in a list of all the prime number found, > it takes the next number to be tested for (next) and the limit it will > go up to. It divide next by the list of previous prime numbers if next > is not bigger than lim, count up all the times where i