[Tutor] concerning help() function

2009-07-29 Thread David
Dear Tutors, whenever I make use of the help() function, I have a good chance of getting an error. I have not yet understood this tool very well. Take the modules operator and random as examples. The former is built-in, the latter not. Do I wish to see the help files, I have to use a different

Re: [Tutor] Problem with multiple input

2009-07-29 Thread Peter Anderson
Alan, Thanks heaps for the quick feedback. I think you are right about multiple inputs on the one line. Looks elegant but is hard work. Regards, Peter -- *Peter Anderson* There is nothing more difficult to take in hand, more perilous to conduct, or more uncertain in its success, than to take

[Tutor] curve fitting

2009-07-29 Thread Bala subramanian
Friends, I wish to do some curve fitting with python by defining my own equations. Could someone please give some guidance or examples on doing the same. Thanks, Bala ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] searching for an ip and subnets in a dir of csv's

2009-07-29 Thread Wayne
On Tue, Jul 28, 2009 at 9:36 PM, Nick Burgess burgess.n...@gmail.comwrote: Good evening List, I am trying to have this script search for an IP or nearest subnet match in a dir of csv's. It works with an absolute match, It will be receiving a whole IP address, so if there is no absolute

Re: [Tutor] concerning help() function

2009-07-29 Thread Wayne
On Wed, Jul 29, 2009 at 1:29 AM, David ld...@gmx.net wrote: Dear Tutors, whenever I make use of the help() function, I have a good chance of getting an error. I have not yet understood this tool very well. Take the modules operator and random as examples. The former is built-in, the latter

Re: [Tutor] searching for an ip and subnets in a dir of csv's

2009-07-29 Thread Nick Burgess
And you were looking for 192.168.1.2, do you want it to return nothing? Or both 192.168.1.1 and 192.168.1.10? Or only 192.168.1.1 as it's the closest match? I would like it to return both, all possible matches. The data looks something like this in the CSV's, Server foo.bar.org

Re: [Tutor] searching for an ip and subnets in a dir of csv's

2009-07-29 Thread Wayne
On Wed, Jul 29, 2009 at 7:43 AM, Nick Burgess burgess.n...@gmail.comwrote: And you were looking for 192.168.1.2, do you want it to return nothing? Or both 192.168.1.1 and 192.168.1.10? Or only 192.168.1.1 as it's the closest match? I would like it to return both, all possible matches. The

Re: [Tutor] curve fitting

2009-07-29 Thread Eike Welk
On Wednesday 29 July 2009, Bala subramanian wrote: Friends, I wish to do some curve fitting with python by defining my own equations. Could someone please give some guidance or examples on doing the same. You can use the Numpy/Scipy libraries for that. I think they have examples for curve

Re: [Tutor] curve fitting

2009-07-29 Thread Skipper Seabold
On Wed, Jul 29, 2009 at 9:42 AM, Eike Welkeike.w...@gmx.net wrote: On Wednesday 29 July 2009, Bala subramanian wrote: Friends, I wish to do some curve fitting with python by defining my own equations. Could someone please give some guidance or examples on doing the same. What kind of curve

Re: [Tutor] searching for an ip and subnets in a dir of csv's

2009-07-29 Thread Martin A. Brown
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, : The script will be ran from a third party tool so only one : argument can be passed to it which will be an entire IP address. : If within the CSV's there is no 32 bit match there could be a : subnet that might match, thats why I need

Re: [Tutor] concerning help() function

2009-07-29 Thread Dave Angel
David wrote: Dear Tutors, whenever I make use of the help() function, I have a good chance of getting an error. I have not yet understood this tool very well. Take the modules operator and random as examples. The former is built-in, the latter not. Do I wish to see the help files, I have to

[Tutor] Web crawling!

2009-07-29 Thread Raj Medhekar
Does anyone know a good webcrawler that could be used in tandem with the Beautiful soup parser to parse out specific elements from news sites like BBC and CNN? Thanks! -Raj ___ Tutor maillist - Tutor@python.org

Re: [Tutor] curve fitting

2009-07-29 Thread Eike Welk
On Wednesday 29 July 2009, Eike Welk wrote: You can use the Numpy/Scipy libraries for that. I think they have examples for curve fitting on their website. This page contains examples: http://www.scipy.org/Cookbook/FittingData - Eike. ___ Tutor

Re: [Tutor] curve fitting

2009-07-29 Thread Skipper Seabold
On Wed, Jul 29, 2009 at 10:27 AM, Bala subramanianbala.biophys...@gmail.com wrote: I have to do the following: Eq 1) F = A * FB + (1-A) FO - (1) Eq 2) A = 1/2a0 [ ( ao + x + bo) - { ( ao + x + bo)2 - 4 aobo ) }0.5 ] . (2) KNOWN: F, FB, FO, ao, UNKNOWN: 

[Tutor] Fwd: Re: curve fitting

2009-07-29 Thread Eike Welk
Forwarding Skipper's other message, which must have somehow been lost: -- Forwarded Message -- Subject: Re: [Tutor] curve fitting Date: Wednesday 29 July 2009 From: Skipper Seabold jsseab...@gmail.com To: Eike Welk eike.w...@gmx.net On Wed, Jul 29, 2009 at 9:42 AM, Eike

[Tutor] (no subject)

2009-07-29 Thread Chris Castillo
# Module demonstrates use of lists and set theory principles def Unite(set1, set2): # evaluate 2 lists, join both into 1 new list newList = [] for item in set1: newList.append(item) for item in set2: newList.append(item)

Re: [Tutor] Web crawling!

2009-07-29 Thread Arun Tomar
Hi! Raj. On Wed, Jul 29, 2009 at 9:29 PM, Raj Medhekar cosmicsan...@yahoo.comwrote: Does anyone know a good webcrawler that could be used in tandem with the Beautiful soup parser to parse out specific elements from news sites like BBC and CNN? Thanks! -Raj As i didn't find any good

Re: [Tutor] Web crawling!

2009-07-29 Thread vince spicer
On Wed, Jul 29, 2009 at 9:59 AM, Raj Medhekar cosmicsan...@yahoo.comwrote: Does anyone know a good webcrawler that could be used in tandem with the Beautiful soup parser to parse out specific elements from news sites like BBC and CNN? Thanks! -Raj

[Tutor] Issues with regex escaping on \{

2009-07-29 Thread gpo
My regex is being run in both Python v2.6 and v3.1 For this example, I'll give one line. This lines will be read out of log files. I'm trying to get the GUID for the User ID to query a database with it, so I'd like a sub match. Here is the code - import re line = 'Checking

Re: [Tutor] Parsing Bible verses

2009-07-29 Thread tearsfornations
hey, i recently was working on some custom bible software and created an sqlite3 database of a few different bibles, one of which is the American Standard Version (ASV) which you can download here http://tearsfornations.hostcell.net/bibledoth/asv.bible.sqlite3 here is the create tables

Re: [Tutor] Issues with regex escaping on \{

2009-07-29 Thread vince spicer
On Wed, Jul 29, 2009 at 11:35 AM, gpo goodpotat...@yahoo.com wrote: My regex is being run in both Python v2.6 and v3.1 For this example, I'll give one line. This lines will be read out of log files. I'm trying to get the GUID for the User ID to query a database with it, so I'd like a sub

Re: [Tutor] manipulating lists

2009-07-29 Thread Dave Angel
(You omitted a title, so I made one up. Hope it's okay) Chris Castillo wrote: # Module demonstrates use of lists and set theory principles def Unite(set1, set2): # evaluate 2 lists, join both into 1 new list newList = [] for item in set1:

Re: [Tutor] Issues with regex escaping on \{

2009-07-29 Thread Bill Campbell
On Wed, Jul 29, 2009, vince spicer wrote: On Wed, Jul 29, 2009 at 11:35 AM, gpo goodpotat...@yahoo.com wrote: My regex is being run in both Python v2.6 and v3.1 For this example, I'll give one line. This lines will be read out of log files. I'm trying to get the GUID for the User ID to

Re: [Tutor] concerning help() function

2009-07-29 Thread Alan Gauld
David ld...@gmx.net wrote whenever I make use of the help() function, I have a good chance of getting an error. I have not yet understood this tool very well. You need to import the module to maker the name visible help(random) help('operator') I figured this by trial and error, error

Re: [Tutor] concerning help() function

2009-07-29 Thread Alan Gauld
help('operator') I figured this by trial and error, and I am keen to find out when the Oops, always try before posting! And don;t assume... I juast vdid and you are right, it does give help on an unimported module! Sorry, how embarrassing! :-) Alan G

Re: [Tutor] (no subject)

2009-07-29 Thread Alan Gauld
Chris Castillo ctc...@gmail.com wrote # Module demonstrates use of lists and set theory principles could this be done in a more elegant fashion? Yes use the Python set type. Alan G ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Issues with regex escaping on \{

2009-07-29 Thread wesley chun
in addition to the good advice from vince (watch out for greediness regardless of what you're looking for) and bill (use raw strings... regexes are one of their primary use cases!), another thing that may help with the greediness issue are the character sets you're using inside to match with. for

[Tutor] implementing set operations [was Re: (no subject)]

2009-07-29 Thread wesley chun
could this be done in a more elegant fashion? in addition to alan's obvious solution, if you wanted to roll your own, you have a good start. my comments below. def Unite(set1, set2):          # evaluate 2 lists, join both into 1 new list        newList = []        for item in set1:        

[Tutor] Currency conversion module in python

2009-07-29 Thread Amit Sethi
Hi , Does anybody know of any currency conversion module in python -- A-M-I-T S|S ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor