Re: [Tutor] Help

2010-05-14 Thread Hugo Arts
On Fri, May 14, 2010 at 9:25 PM, Abhishek Mishra ideam...@gmail.com wrote: linear1 = ''.join(foo.split('\n')) linear2 = foo.replace('\n','') ^^ these are the two ways in which you can linearize the input text by removing all  '\n' +1 for the replace. More obvious, cleaner, more efficient.

Re: [Tutor] Help

2010-05-14 Thread Steven D'Aprano
On Fri, 14 May 2010 06:08:30 pm she haohao wrote: Say I have a .fa file and I want to print a subsequence from the file without the \n how can i do it. Example: Inside the test.fa file I have chromosome 1 ACTGTGTTC ACGTCGACC AVGTT ACGTTaGTC so if I say i wan the subsequence

Re: [Tutor] Help required to count no of lines that are until 1000 characters

2010-05-12 Thread Alan Gauld
Dave Angel da...@ieee.org wrote But you have a serious bug in your code, that nobody in the first five responses has addressed. That while loop will loop over the first line repeatedly, till it reaches or exceeds 1000, regardless of the length of subsequent lines. Oooh, good catch, I

[Tutor] Help required to count no of lines that are until 1000 characters

2010-05-11 Thread ramya natarajan
Hello, I am very beginner to programming, I got task to Write a loop that reads each line of a file and counts the number of lines that are read until the total length of the lines is 1,000 characters. I have to read lines from files exactly upto 1000 characters. Here is my code: I created

Re: [Tutor] Help required to count no of lines that are until 1000 characters

2010-05-11 Thread Luke Paireepinart
On Tue, May 11, 2010 at 1:00 PM, ramya natarajan nramy...@gmail.com wrote: Hello, I have to read lines from files exactly upto 1000 characters. But the problem is its reading entire line and not stopping excatly in 1000 characters. Can some one help what mistake i am doing here?.    log =

Re: [Tutor] Help required to count no of lines that are until 1000 characters

2010-05-11 Thread spir ☣
On Tue, 11 May 2010 11:00:20 -0700 ramya natarajan nramy...@gmail.com wrote: Hello, I am very beginner to programming, I got task to Write a loop that reads each line of a file and counts the number of lines that are read until the total length of the lines is 1,000 characters. I have to

Re: [Tutor] Help required to count no of lines that are until 1000 characters

2010-05-11 Thread शंतनू
On 12-May-2010, at 12:32 AM, spir ☣ wrote: On Tue, 11 May 2010 11:00:20 -0700 ramya natarajan nramy...@gmail.com wrote: Hello, I am very beginner to programming, I got task to Write a loop that reads each line of a file and counts the number of lines that are read until the total

Re: [Tutor] Help required to count no of lines that are until 1000characters

2010-05-11 Thread Alan Gauld
ramya natarajan nramy...@gmail.com wrote characters.But the problem is its reading entire line and not stopping excatly in 1000 characters. Do you really need to stop reading the file at 1000 characters rather than the line containing the 1000th character? That seems a very arbitrary sort

Re: [Tutor] Help required to count no of lines that are until 1000 characters

2010-05-11 Thread Alan Gauld
spir ☣ denis.s...@gmail.com wrote Either you read line per line, but then you cannot stop exactly at the 1000th character; or you traverse the text char per char, but this is a bit picky. Or you could just read 1000 chars from the file then pick out the lines from that. But that requires

Re: [Tutor] Help required to count no of lines that are until 1000 characters

2010-05-11 Thread Dave Angel
ramya natarajan wrote: Hello, I am very beginner to programming, I got task to Write a loop that reads each line of a file and counts the number of lines that are read until the total length of the lines is 1,000 characters. I have to read lines from files exactly upto 1000 characters.

Re: [Tutor] Help with simple text book example that doesn't work!!!

2010-04-04 Thread Steven D'Aprano
On Sun, 4 Apr 2010 03:40:57 pm Brian Drwecki wrote: Hi all... I am working from the Learning Python 3rd edition published by O'Reily... FYI I am trying to learn Python on my own (not for course credit or anything).. I am a psychologist with very limited programming experience.. I am anal, and

Re: [Tutor] Help with simple text book example that doesn't work!!!

2010-04-04 Thread wesley chun
similarly, you get an error if: print int(reply) ** 2 print 'Bye' ... is all a single line and/or if you mixed spaces and TABs. -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall,

Re: [Tutor] Help with simple text book example that doesn't work!!!

2010-04-04 Thread Brian Drwecki
Python version Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type copyright, credits or license() for more information As for the exact error codehere it is. while True: reply = raw_input('Enter text:') if reply == 'stop': break

[Tutor] Help with simple text book example that doesn't work!!!

2010-04-03 Thread Brian Drwecki
Hi all... I am working from the Learning Python 3rd edition published by O'Reily... FYI I am trying to learn Python on my own (not for course credit or anything).. I am a psychologist with very limited programming experience.. I am anal, and this example code doesn't work.. I am using IDLE to do

[Tutor] help

2010-03-30 Thread Oshan Modi
i am only a novice and just started programming.. i am having trouble running a .py file in the command prompt.. if anyone of you could help? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] help

2010-03-30 Thread vishwajeet singh
On Mon, Mar 29, 2010 at 7:30 AM, Oshan Modi modi.os...@gmail.com wrote: i am only a novice and just started programming.. i am having trouble running a .py file in the command prompt.. if anyone of you could help? How are you trying to run it ?? -- Vishwajeet Singh +91-9657702154 |

Re: [Tutor] help

2010-03-30 Thread Christian Witts
Oshan Modi wrote: i am only a novice and just started programming.. i am having trouble running a .py file in the command prompt.. if anyone of you could help? ___ Tutor

Re: [Tutor] help

2010-03-30 Thread Steven D'Aprano
On Mon, 29 Mar 2010 01:00:45 pm Oshan Modi wrote: i am only a novice and just started programming.. i am having trouble running a .py file in the command prompt.. if anyone of you could help? Are you running Linux or Mac? At the command prompt, run: python myfile.py and report any

Re: [Tutor] help

2010-03-30 Thread Christian Witts
Forwarding to the list. Martijn wrote: On Tue, Mar 30, 2010 at 12:15 PM, Christian Witts cwi...@compuscan.co.za mailto:cwi...@compuscan.co.za wrote: Oshan Modi wrote: i am only a novice and just started programming.. i am having trouble running a .py file in

Re: [Tutor] help

2010-03-30 Thread Christian Witts
Oshan Modi wrote: I have Windows 7 and am using python 2.6.. I added python.exe's address in the path option under enviromental variables.. i can run python in command prompt.. its just that i dont know to make it execute a file directly rather than typing the whole program again and again..

Re: [Tutor] help

2010-03-30 Thread Martijn
Simple; just write python program.py in your command line :) On Tue, Mar 30, 2010 at 2:08 PM, Christian Witts cwi...@compuscan.co.zawrote: Oshan Modi wrote: I have Windows 7 and am using python 2.6.. I added python.exe's address in the path option under enviromental variables.. i can run

Re: [Tutor] help

2010-03-30 Thread bob gailer
On 3/28/2010 10:00 PM, Oshan Modi wrote: i am only a novice and just started programming.. i am having trouble running a .py file in the command prompt.. if anyone of you could help? Please learn how to ask questions. In a situation like this we'd like to know what operating system you are

Re: [Tutor] help (Oshan Modi) with command prompt

2010-03-30 Thread Culver, Hunt C
You didn't say what operating system, but in general terms, the python application has to know how to find your python module, say 'foo.py'. This means that the directory where foo.py is located must be on the system path or PYTHONPATH. One simple way to do this is to navigate at the command

[Tutor] help with loops

2010-03-25 Thread kumar s
Dear group: I need some tips/help from experts. I have two files tab-delimted. One file is 4K lines. The other files is 40K lines. I want to search contents of a file to other and print those lines that satisfy. File 1: chr X Y chr18337733 8337767

Re: [Tutor] help with loops

2010-03-25 Thread bob gailer
On 3/25/2010 11:34 AM, kumar s wrote: Dear group: I need some tips/help from experts. I have two files tab-delimted. One file is 4K lines. The other files is 40K lines. I want to search contents of a file to other and print those lines that satisfy. File 1: chr X Y chr1

Re: [Tutor] help with loops

2010-03-25 Thread Walter Prins
So, am I right that for each X value in file 2, you want to look up to see if you can find a corresponding line in file 1 where the value from file 2 falls between the X and Y value from file 1, and if found, then output the original line from file 2 and the 6th column from the found line from

[Tutor] Help me understand this tkinter related code

2010-02-26 Thread Robert DeLaurentis
I've just begun learning Python and programming using the Head First Programming from O'Reilly. The following code works on my Mac just fine, but there is a mystery as to how its working that escapes me so far. The local function change_volume(v) requires the argument v to operate properly,

Re: [Tutor] Help me understand this tkinter related code

2010-02-26 Thread Alan Gauld
Please don't hijack an old message to create a new subject. Those of us using threaded readers might not see it and you lose potential answers. Robert DeLaurentis li...@bobdel.com wrote The local function change_volume(v) requires the argument v to operate properly, but I'm unclear where the

[Tutor] Help with cursors please

2010-02-04 Thread Alan Harris-Reid
Hi, I have a SQLite cursor which I want to traverse more than once, eg... for row in MyCursor: method1(row) then later... for row in MyCursor: method2(row) Method2 is never run, I guess because the pointer is at the bottom of the row 'stack' after the first 'for' loop How can I

Re: [Tutor] Help with cursors please

2010-02-04 Thread Kent Johnson
On Thu, Feb 4, 2010 at 12:47 PM, Alan Harris-Reid aharrisr...@googlemail.com wrote: Hi, I have a SQLite cursor which I want to traverse more than once, eg... for row in MyCursor:   method1(row)  then later... for row in MyCursor:   method2(row)  Method2 is never run, I guess because the

Re: [Tutor] Help with cursors please

2010-02-04 Thread Alan Harris-Reid
Kent Johnson wrote: On Thu, Feb 4, 2010 at 12:47 PM, Alan Harris-Reid aharrisr...@googlemail.com wrote: Hi, I have a SQLite cursor which I want to traverse more than once, eg... for row in MyCursor: method1(row) then later... for row in MyCursor: method2(row) Method2 is never run, I

Re: [Tutor] help with random.randint (cont. -- now: pseudo code)

2010-02-03 Thread David
Bob, brilliant stuff -- I am truly awed by this. Create a default-filled matrix and mark combinations used so as to take them out of the game? Wow. This is new to me. On 03/02/10 15:46, bob gailer wrote def askQuestions(): # generate and ask questions: for i in range(NQ): while 1: # loop

Re: [Tutor] help with random.randint

2010-02-03 Thread Hugo Arts
On Wed, Feb 3, 2010 at 8:19 AM, David ld...@gmx.net wrote: Hello Bob, thanks for your comments! On 03/02/10 14:51, bob gailer wrote: or if you seek terseness: terms = [random.randint(1, 99) for i in 'ab'] Do I understand correctly that 'ab' here merely serves to produce a 'dummy

Re: [Tutor] help with random.randint (cont. -- now: pseudo code)

2010-02-03 Thread Hugo Arts
On Wed, Feb 3, 2010 at 10:06 AM, David ld...@gmx.net wrote: Bob, brilliant stuff -- I am truly awed by this. Create a default-filled matrix and mark combinations used so as to take them out of the game? Wow. This is new to me. On 03/02/10 15:46, bob gailer wrote def askQuestions(): #

Re: [Tutor] help with random.randint

2010-02-03 Thread spir
On Wed, 03 Feb 2010 11:21:56 +0800 David ld...@gmx.net wrote: Hello list, I thought this was easy even for me, but I was wrong, I guess. Here is what I want to do: take two random numbers between 1 and 99, and put them into a list. import random terms = [] for i in range(2):

Re: [Tutor] help with random.randint (cont. -- now: pseudo code)

2010-02-03 Thread spir
On Wed, 03 Feb 2010 14:12:42 +0800 David ld...@gmx.net wrote: Hello Benno, list, thanks for those clarifications, which, well, clarify things ;-) This is my latest creation: import random def createTerms(): terms = [] for i in range(2):

Re: [Tutor] help with random.randint

2010-02-03 Thread Eike Welk
Hello David! On Wednesday February 3 2010 04:21:56 David wrote: import random terms = [] for i in range(2): terms = random.randint(1, 99) print terms Here is an other solution, which is quite easy to understand and short: import random terms = [] for i in range(2): terms +=

Re: [Tutor] help with random.randint

2010-02-03 Thread David
Hello Eike, thanks for the explanation, all this is really helpful -- I certainly have learned sth. today! I wonder, though, how I would get my number pairs, which I need later on, if I were to follow your solution. I am asking because as I understand your code, the list terms is a list of

Re: [Tutor] help with random.randint (cont. -- now: pseudo code)

2010-02-03 Thread Wayne Werner
On Wed, Feb 3, 2010 at 12:12 AM, David ld...@gmx.net wrote: def createQuestions: generate all multiplication combinations possible append as tuple to pool eliminate 'mirrored doubles' (i.e. 7x12 and 12x7) randomize pool I haven't really looked through most of this stuff - but

Re: [Tutor] help with random.randint

2010-02-03 Thread Wayne Werner
On Wed, Feb 3, 2010 at 5:26 AM, David ld...@gmx.net wrote: Hello Eike, thanks for the explanation, all this is really helpful -- I certainly have learned sth. today! I wonder, though, how I would get my number pairs, which I need later on, if I were to follow your solution. I am asking

[Tutor] help with strings

2010-02-03 Thread NISA BALAKRISHNAN
hi I am very new to python. I have a string for example : 123B new Project i want to separate 123B as a single string and new project as another string . how can i do that. i tried using partition but couldnt do it pls help. thanks in advance! ___

Re: [Tutor] help with strings

2010-02-03 Thread vince spicer
On Wed, Feb 3, 2010 at 7:19 AM, NISA BALAKRISHNAN snisa.balakrish...@gmail.com wrote: hi I am very new to python. I have a string for example : 123B new Project i want to separate 123B as a single string and new project as another string . how can i do that. i tried using partition

Re: [Tutor] help with strings

2010-02-03 Thread Darren Worrall
On 03/02/10 13:19, NISA BALAKRISHNAN wrote: hi I am very new to python. I have a string for example : 123B new Project i want to separate 123B as a single string and new project as another string . how can i do that. i tried using partition but couldnt do it pls help. thanks in advance!

Re: [Tutor] help with strings

2010-02-03 Thread Kent Johnson
On Wed, Feb 3, 2010 at 8:19 AM, NISA BALAKRISHNAN snisa.balakrish...@gmail.com wrote: hi I am very new to python. I have a string for example : 123B     new Project i want to separate 123B as a single string and new  project as another string . how can i do that. i tried using partition

Re: [Tutor] help with random.randint

2010-02-03 Thread Eike Welk
On Wednesday February 3 2010 12:26:43 David wrote: thanks for the explanation, all this is really helpful -- I certainly have learned sth. today! I wonder, though, how I would get my number pairs, which I need later on, if I were to follow your solution. I am asking because as I understand

[Tutor] help with random.randint

2010-02-02 Thread David
Hello list, I thought this was easy even for me, but I was wrong, I guess. Here is what I want to do: take two random numbers between 1 and 99, and put them into a list. import random terms = [] for i in range(2): terms = random.randint(1, 99) print terms This prints just one number

Re: [Tutor] help with random.randint

2010-02-02 Thread Benno Lang
On Wed, Feb 3, 2010 at 12:21 PM, David ld...@gmx.net wrote: Hello list, I thought this was easy even for me, but I was wrong, I guess. Here is what I want to do: take two random numbers between 1 and 99, and put them into a list. import random terms =  [] for i in range(2):        terms

Re: [Tutor] help with random.randint (cont. -- now: pseudo code)

2010-02-02 Thread David
Hello Benno, list, thanks for those clarifications, which, well, clarify things ;-) This is my latest creation: import random def createTerms(): terms = [] for i in range(2): terms.append(random.randint(1, 99)) j = terms[0] k = terms[1] print %3d\nx%2d % (j, k)

Re: [Tutor] help with random.randint

2010-02-02 Thread bob gailer
David wrote: Hello list, I thought this was easy even for me, but I was wrong, I guess. Here is what I want to do: take two random numbers between 1 and 99, and put them into a list. [snip] Or you can use list comprehension: terms = [random.randint(1, 99) for i in range(2)] or if you seek

Re: [Tutor] help with random.randint

2010-02-02 Thread David
Hello Bob, thanks for your comments! On 03/02/10 14:51, bob gailer wrote: or if you seek terseness: terms = [random.randint(1, 99) for i in 'ab'] Do I understand correctly that 'ab' here merely serves to produce a 'dummy sequence' over which I can run the for loop? David

Re: [Tutor] help with random.randint (cont. -- now: pseudo code)

2010-02-02 Thread bob gailer
David wrote: [snip] My suggestion (untested): MAX = 12 NQ = 20 # of questions to ask # create a 2 dimensional array of 1's row = [1]*MAX pool = [row[:] for i in range(MAX)] incorrect = [] # store incorrectly answered combos here def askQuestions(): # generate and ask questions: for i in

[Tutor] help using f2py

2010-01-13 Thread Jose Amoreira
Hello! I posted this question on the f2py list but since I haven't got any answers (yet), I thought I'd try my luck here. I'm having a hard time wrapping a fortran subroutine into a python module. The problem seems to be related to having a subroutine argument to the fortran subroutine. A

Re: [Tutor] Help with a Dictionary

2010-01-11 Thread Garry Bettle
Many thanks to Alan Gauld, Gerard Flanagan, Lie Ryan and spir for your replies. All systems are go! Cheers, Garry ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help with a Dictionary

2010-01-08 Thread spir
Garry Bettle dixit: [...series of data with same format...] 2010-01-07 1437 Crayfd H3 380m ... etc. The above are RaceDate + RaceTime + Fixture + RaceDetails, and are output in RaceTime order. What I'd like to do, is output a transposed-like summary of just the Fixture + RaceTime.

Re: [Tutor] Help with a Dictionary

2010-01-08 Thread spir
Garry Bettle dixit: for fixture in FixtureList: print fixture.ljust(6), FixtureList[fixture] ... for fixture, racetimes in FixtureList: print fixture, racetimes Traceback (most recent call last): File pyshell#3, line 1, in module for fixture, racetimes in FixtureList:

[Tutor] Help with a Dictionary

2010-01-07 Thread Garry Bettle
Howdy all, I hope this message finds you all well. I have a list that I output in the following order: 2010-01-07 1103 Sund A7 450m 2010-01-07 Sheff A7 500m 2010-01-07 1119 Sund A6 450m 2010-01-07 1128 Sheff A6 500m 2010-01-07 1134 Sund A5 450m 2010-01-07 1142 Sheff A7 500m 2010-01-07 1148

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Benno Lang
On Thu, Jan 7, 2010 at 10:51 PM, Garry Bettle garry.bet...@gmail.com wrote: I have a list that I output in the following order: 2010-01-07 1103 Sund A7 450m 2010-01-07 Sheff A7 500m 2010-01-07 1119 Sund A6 450m 2010-01-07 1128 Sheff A6 500m 2010-01-07 1134 Sund A5 450m 2010-01-07 1142

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Garry Bettle
On Thu, Jan 7, 2010 at 15:26, Garry Bettle wrote: Howdy all, I hope this message finds you all well. I have a list that I output in the following order: 2010-01-07 1103 Sund A7 450m 2010-01-07 Sheff A7 500m 2010-01-07 1119 Sund A6 450m 2010-01-07 1128 Sheff A6 500m 2010-01-07

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Alan Gauld
Garry Bettle garry.bet...@gmail.com wrote What I'd like to do, is output a transposed-like summary of just the Fixture + RaceTime. Sund 1103 1119 1134 1148 1204 1218 1232 1247 1304 1319 1333 1351 Sheff 1128 1142 1157 1212 1227 1242 1258 1312 1327 1344 1403 As the races are output, I

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Gerard Flanagan
Garry Bettle wrote: Howdy all, I hope this message finds you all well. I have a list that I output in the following order: 2010-01-07 1103 Sund A7 450m 2010-01-07 Sheff A7 500m 2010-01-07 1119 Sund A6 450m 2010-01-07 1128 Sheff A6 500m 2010-01-07 1134 Sund A5 450m 2010-01-07 1142 Sheff

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Lie Ryan
On 1/8/2010 3:12 AM, Garry Bettle wrote: This is what I've come up with. Sorry, python is something I touch on occasionally: must do more! As the races are output, I build a dictionary of key=FixtureName and value=RaceTimes: RaceTime = marketResp.market.displayTime.time() cRaceTime =

[Tutor] Help on finding the 1000th prime

2009-11-16 Thread Ray Holt
I have posted this on other lists, but have just discovered this one. Can someone give me help on writing the code necessary to find the 1000th. prime number. I know I will have to use a while loop, but I can't seem to get the body of the code to function rightly. I would appreciate any help. I am

Re: [Tutor] Help on finding the 1000th prime

2009-11-16 Thread christopher . henk
mrhol...@sbcglobal.net wrote on 11/16/2009 10:56:07 AM: I have posted this on other lists, but have just discovered this one. Welcome to the list. I am sure you will find plenty of folks here who will be happy to help you. Can someone give me help on writing the code necessary to

Re: [Tutor] Help on finding the 1000th prime

2009-11-16 Thread Kent Johnson
On Mon, Nov 16, 2009 at 10:56 AM, Ray Holt mrhol...@sbcglobal.net wrote: I have posted this on other lists, but have just discovered this one. Can someone give me help on writing the code necessary to find the 1000th. prime number. I know I will have to use a while loop, but I can't seem to get

Re: [Tutor] Help on finding the 1000th prime

2009-11-16 Thread bob gailer
Ray Holt wrote: find the 1000th. prime number. Break this down into 2 separate problems. (I assume 1 is the first prime number) 1 - determining the next prime number 2 - repeating that 1000 times. A while loop is a way to accomplish 2. How do you determine the next prime number? There are

[Tutor] Help with my program

2009-10-23 Thread tanner barnes
Ok so im in need of some help! I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade). What im trying to make happen is to get the variables from the first class and use them in the second class.

Re: [Tutor] Help with my program

2009-10-23 Thread Kent Johnson
On Thu, Oct 22, 2009 at 11:59 PM, Kenny Shen little...@gmail.com wrote: Hi tanner, I suppose the following is possible: class A:   def __init__(self):   self.height = 1   self.weight = 7   self.name = tanner   self.grade = A   def getinfo(self):   info = []  

Re: [Tutor] Help with my program

2009-10-22 Thread Kenny Shen
Hi tanner, I suppose the following is possible: class A: def __init__(self): self.height = 1 self.weight = 7 self.name = tanner self.grade = A def getinfo(self): info = [] info.append(self.name) info.append(self.weight) info.append(self.height)

[Tutor] Help with pexpect

2009-10-16 Thread Nathan Farrar
I'm trying to automate the collection of data to remote devices over ssh via pexpect. I had originally attempted (with limited success) to use paramiko, however due to cisco's ssh implimentation I cannot send mulitple commands over the same connection, which is absolutely essential. Therefore,

Re: [Tutor] Help with pexpect

2009-10-16 Thread vince spicer
On Fri, Oct 16, 2009 at 1:45 PM, Nathan Farrar nathan.far...@gmail.comwrote: I'm trying to automate the collection of data to remote devices over ssh via pexpect. I had originally attempted (with limited success) to use paramiko, however due to cisco's ssh implimentation I cannot send

Re: [Tutor] Help with pexpect

2009-10-16 Thread Mark K. Zanfardino
Nathan, Depending upon how much control you have over the calling machine you can eliminate the pesky password prompt from ssh altogether by creating a private/public key pair for the client machine and copy the public key to the host machine. This way when you ssh to the host you will be

Re: [Tutor] Help or Advice on MySQL, Python and test data storage

2009-10-14 Thread greg whittier
On Thu, Oct 8, 2009 at 4:29 AM, David Jamieson david.jamie...@gmail.comwrote: Hi All, looking for some advice on using Python with MySQL for test data storage. While not a relational database, you might also look at http://www.pytables.org. It provides a python interface for writing to and

Re: [Tutor] Help on python file extension windows vista recognition

2009-10-13 Thread Tim Golden
Dave Angel wrote: You will also need to get comfortable with the DOS box (Command Prompt, whatever Vista calls it. It's probably in Start-Accessories). In a DOS box, you could do a DIR of that directory, and see exactly what the file is called. You also could invoke python or pythonw

[Tutor] Help on python file extension windows vista recognition

2009-10-12 Thread Victor Binns
Please, I need help. I installed python on my gateway windows vista laptop computer. This is with the latest version of python (Python 2.6.3 Windows installer) Python 2.6.3 Windows installer I have some python code files I placed on my desktop and tried placing it in a folder containing

Re: [Tutor] Help on python file extension windows vista recognition

2009-10-12 Thread Dave Angel
Victor Binns wrote: Please, I need help. I installed python on my gateway windows vista laptop computer. This is with the latest version of python (Python 2.6.3 Windows installer) Python 2.6.3 Windows installer It's not the latest, but no problem. It's probably a good choice. I have

[Tutor] Help or Advice on MySQL, Python and test data storage

2009-10-08 Thread David Jamieson
Hi All, looking for some advice on using Python with MySQL for test data storage. What builds of Python work well with MySQL and what modules allow the connection to the database and data transfer activities. I'm thinking about using PhPMyAdmin to set-up and administer my database in the first

Re: [Tutor] Help or Advice on MySQL, Python and test data storage

2009-10-08 Thread David
David Jamieson wrote: Hi All, looking for some advice on using Python with MySQL for test data storage. What builds of Python work well with MySQL and what modules allow the connection to the database and data transfer activities. SQLAlchemy is one option;

Re: [Tutor] Help or Advice on MySQL, Python and test data storage

2009-10-08 Thread Serdar Tumgoren
looking for some advice on using Python with MySQL for test data storage. What builds of Python work well with MySQL and what modules allow the connection to the database and data transfer activities. You'll need the MySQLdb module to connect to MySQL from Python.

Re: [Tutor] help with alternate execution

2009-10-02 Thread Patrick Sabin
wrobl...@cmich.edu wrote: Thank you for the reply.. I tried putting the print repr(n) before I defined 'n' with raw_input. My script looks like this-- def divisible(n): if n%3 == 0: print n, is divisible by 3 else: print n, is not divisible by 3 n= raw_input(enter a

Re: [Tutor] help with alternate execution

2009-10-01 Thread Dave Angel
You top-posted, and sent the mail to me privately (off-list). That's not how mailing lists work. wrobl...@cmich.edu wrote: Thank you for the reply.. I tried putting the print repr(n) before I defined 'n' with raw_input. My script looks like this-- def divisible(n): if n%3 == 0:

Re: [Tutor] help with alternate execution

2009-10-01 Thread Dave Angel
You sent the mail to me privately (off-list). That's not how mailing lists work. wrobl...@cmich.edu wrote: Thank you for the reply.. I tried putting the print repr(n) before I defined 'n' with raw_input. My script looks like this-- def divisible(n): if n%3 == 0: print n, is

Re: [Tutor] Help!

2009-09-30 Thread Tim Bowden
On Tue, 2009-09-29 at 20:38 -0700, Jessica Poveda wrote: I need help writting a program. 1) Random string generation 2) no repeating letters Can anyone help me,please? I am so confused. The only problem is I have to use the code that is written there but add on to it. import random

Re: [Tutor] Help!

2009-09-30 Thread wesley chun
I need help writting a program. 1) Random string generation 2) no repeating letters Can anyone help me,please? I am so confused. The only problem is I have to use the code that is written there but add on to it. import random alphabet = abcdefghijklmnopqrstuvwxyz myNewString = for

[Tutor] help with alternate execution

2009-09-29 Thread wrobl1rt
I'm trying to make a very simple example to show alternate execution... if a number is divisible by 3 it will say so and if it isnt, it will say so. Heres my program n= raw_input(enter a number= ) def divisible(n): if n%3 == 0: print n, is divisible by 3 else:

Re: [Tutor] help with alternate execution

2009-09-29 Thread vince spicer
On Tue, Sep 29, 2009 at 10:59 AM, wrobl...@cmich.edu wrote: I'm trying to make a very simple example to show alternate execution... if a number is divisible by 3 it will say so and if it isnt, it will say so. Heres my program n= raw_input(enter a number= ) def divisible(n): if n%3

Re: [Tutor] help with alternate execution

2009-09-29 Thread Dave Angel
wrobl...@cmich.edu wrote: I'm trying to make a very simple example to show alternate execution... if a number is divisible by 3 it will say so and if it isnt, it will say so. Heres my program n= raw_input(enter a number= ) def divisible(n): if n%3 == 0: print n, is divisible

[Tutor] Help!

2009-09-29 Thread Jessica Poveda
I need help writting a program. 1) Random string generation 2) no repeating letters Can anyone help me,please? I am so confused. The only problem is I have to use the code that is written there but add on to it.     import random alphabet = abcdefghijklmnopqrstuvwxyz myNewString = for letters

Re: [Tutor] Help required

2009-09-26 Thread waqas ahmad
be veryy thankful to you really for help. Best Regards, Waqas Date: Fri, 25 Sep 2009 15:39:27 -0600 Subject: Re: [Tutor] Help required From: vinces1...@gmail.com To: waqas...@hotmail.com CC: python-l...@python.org; tutor@python.org On Fri, Sep 25, 2009 at 1:56 PM, waqas

[Tutor] Help required

2009-09-25 Thread waqas ahmad
Hi, I dont know it is the right place to post this question. I need help to change one search code line . can you help me please. here is my search method code: search=re.compile(^#acl InternationalGroup.*\n, re.M).search(pagetext) if search: ret=search.group() else:

Re: [Tutor] Help required

2009-09-25 Thread vince spicer
On Fri, Sep 25, 2009 at 1:56 PM, waqas ahmad waqas...@hotmail.com wrote: Hi, I dont know it is the right place to post this question. I need help to change one search code line . can you help me please. here is my search method code: search=re.compile(^#acl InternationalGroup.*\n,

Re: [Tutor] Help deciding between python and ruby

2009-09-06 Thread Luke Paireepinart
On Sun, Sep 6, 2009 at 10:21 AM, kevin parks k...@mac.com wrote: Well, the only thing more annoying than off topic discussion is meta discussion on lists and folks passing judgement on other people's posts (ie. you should have x, your should not have Y... I shouldn't have this second

Re: [Tutor] Help deciding between python and ruby

2009-09-06 Thread Alan Gauld
Luke Paireepinart rabidpoob...@gmail.com wrote I agree, but I can see how some people don't like it. It's similar to the Java vs. C++ debate I guess, Java is forced OO and C++ is optional. While this is a genuine complaint for Java I have to be fair and say that Ruby does a good job of

Re: [Tutor] Help deciding between python and ruby

2009-09-05 Thread Dan King
I think you will get at the least a slight bias toward Python. However, I think you should do your own research and reach your own conclusions. Simply to get you started I put the following into Google: 'Python or Ruby: Which to learn' and got more than 1M hits. Best of luck. Robert Well,

Re: [Tutor] Help deciding between python and ruby

2009-09-05 Thread kevin parks
1. go to the book store 2. pull a copy of learning ruby by Michael Fitzgerald (ora.com) 3. pull a copy of learning python by Mark Lutz (ora.com) 4. read chapter 1 of each 5. make a decision 6. get to work Alternately check comp.lang.python where this question comes up over and over and over

Re: [Tutor] Help deciding between python and ruby

2009-09-05 Thread Luke Paireepinart
ruby on the other is more 'implicit,' used more in web-apps (via ROR), emphasizes code-readability/beauty, and is more flexible (i.e. has more than one way of doing something). You mean people actually like ruby's syntax? I think Python's the prettiest language I've worked with syntactically.

[Tutor] Help deciding between python and ruby

2009-09-04 Thread dan06
I'd like to learn a programming language - and I need help deciding between python and ruby. I'm interesting in learning what are the difference, both objective and subjective, between the two languages. I know this is a python mailing list, so knowledge/experience with ruby may be limited - in

Re: [Tutor] Help deciding between python and ruby

2009-09-04 Thread Luke Paireepinart
A primary draw of Ruby has always been Ruby on Rails, a web framework. Python has a lot of really good web frameworks now, though, so this is less of a concern.When I tried to learn Ruby, the docs were terrible. The primary developers are Japanese, and the translations were very poor and

Re: [Tutor] Help deciding between python and ruby

2009-09-04 Thread Mac Ryan
On Fri, 2009-09-04 at 06:18 -0700, dan06 wrote: I'd like to learn a programming language - and I need help deciding between python and ruby. I'm interesting in learning what are the difference, both objective and subjective, between the two languages. I know this is a python mailing list, so

Re: [Tutor] Help deciding between python and ruby

2009-09-04 Thread Robert Berman
I think you will get at the least a slight bias toward Python. However, I think you should do your own research and reach your own conclusions. Simply to get you started I put the following into Google: 'Python or Ruby: Which to learn' and got more than 1M hits. Best of luck. Robert On Fri,

Re: [Tutor] Help deciding between python and ruby

2009-09-04 Thread Alan Gauld
dan06 dan.king...@yahoo.com wrote I'd like to learn a programming language - and I need help deciding between python and ruby. I'm interesting in learning what are the difference, There is lots of info on their web sites. asking a question like this is troll baiting in a big way, any debate

<    8   9   10   11   12   13   14   15   16   17   >