Re: [Tutor] code to generate my own text captchas

2012-10-25 Thread Alan Gauld
On 24/10/12 22:05, Tsila Hassine wrote: Hello all, I am looking for simple python code that will take a given string and distort it, captcha like. it is for artistic purposes, so no verification required. I just need the image q text distortion code. A Google search for 'python captcha generato

[Tutor] Help on Remote File Copy & Exection

2012-10-25 Thread Arumugam N
Hi All, First of the big thanks and congrats for managing such a brilliant online community. I am new to Python and have started getting the taste of python on my day to day work. I have a requirement and i am trying to solve it using python. I am from QA. Here is what i do daily and wanted to d

Re: [Tutor] Help on Remote File Copy & Exection

2012-10-25 Thread Oscar Benjamin
On 25 October 2012 10:26, Arumugam N wrote: > Hi All, > > First of the big thanks and congrats for managing such a brilliant online > community. I am new to Python and have started getting the taste of python > on my day to day work. > > I have a requirement and i am trying to solve it using pytho

Re: [Tutor] For - if - else loop; print selective output

2012-10-25 Thread Asokan Pichai
On Wed, Oct 24, 2012 at 09:27:30PM +0500, Saad Javed wrote: > Hi, > > a = [['jimmy', '25', 'pancakes'], ['tom', '23', 'brownies'], ['harry', > '21', 'cookies']] > for i in a: > if (i[1] == '25' or i[1] == '26'): > print 'yes' > else: > print 'Not found' > > This prints: > yes > no

Re: [Tutor] Help on Remote File Copy & Exection

2012-10-25 Thread Alan Gauld
On 25/10/12 10:26, Arumugam N wrote: 1. Revert the snapshot of a VM used for testing. - i have automated using pysphere 2. Copy the build from share location to the VM - here i can have a python script run from the VM but is it possible to run it remotely? for example. if i run the script from M

[Tutor] Reading from a seperate file

2012-10-25 Thread myles broomes
I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents: 120 74 57 44 12 I thought that maybe the problem was the code I had written but even when I try

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Joel Goldstick
On Thu, Oct 25, 2012 at 2:15 PM, myles broomes wrote: > > I'm trying to code a program that retrieves data from a seperate file but > according to my program, the seperate file is empty when I know it clearly > isn't. It's a txt file and here are its contents: > > 120 > 74 > 57 > 44 > 12 > > I tho

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Mark Lawrence
On 25/10/2012 19:15, myles broomes wrote: I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents: 120 74 57 44 12 I thought that maybe the problem was

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Mark Lawrence
On 25/10/2012 19:26, Joel Goldstick wrote: On Thu, Oct 25, 2012 at 2:15 PM, myles broomes wrote: I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents

Re: [Tutor] Help on Remote File Copy & Exection

2012-10-25 Thread Prasad, Ramit
Arumugam N wrote: > Hi All, > > First of the big thanks and congrats for managing such a brilliant online > community. I am new to Python and have > started getting the taste of python on my day to day work. > > I have a requirement and i am trying to solve it using python. > > I am from QA. He

Re: [Tutor] For - if - else loop; print selective output

2012-10-25 Thread Prasad, Ramit
eryksun wrote: > On Wed, Oct 24, 2012 at 3:24 PM, Alan Gauld wrote: > > On 24/10/12 18:49, eryksun wrote: > > > >> Using "in ['25', '26']" also checks a compiled tuple constant: > >> > >> >>> compile("x in ['25', '26']", '', 'eval').co_consts > >> ('25', '26', ('25', '26')) > >> > >> 3.x

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread bob gailer
On 10/25/2012 2:15 PM, myles broomes wrote: [snip] Try open('highScores.txt, 'rb'). -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinf

Re: [Tutor] For - if - else loop; print selective output

2012-10-25 Thread eryksun
On Thu, Oct 25, 2012 at 3:46 PM, Prasad, Ramit wrote: > > Do you happen to know offhand if there is a difference between > `in ` vs. `in ` vs. `in `? The "in" comparison (__contains__ method) is equivalent for list and tuple. It has to search through the sequence item by item, which makes it an O

Re: [Tutor] For - if - else loop; print selective output

2012-10-25 Thread Oscar Benjamin
On 25 October 2012 21:16, eryksun wrote: > On Thu, Oct 25, 2012 at 3:46 PM, Prasad, Ramit > wrote: >> >> Do you happen to know offhand if there is a difference between >> `in ` vs. `in ` vs. `in `? > > The "in" comparison (__contains__ method) is equivalent for list and > tuple. It has to search

Re: [Tutor] For - if - else loop; print selective output

2012-10-25 Thread Prasad, Ramit
eryksun wrote: > On Thu, Oct 25, 2012 at 3:46 PM, Prasad, Ramit > wrote: > > > > Do you happen to know offhand if there is a difference between > > `in ` vs. `in ` vs. `in `? > > The "in" comparison (__contains__ method) is equivalent for list and > tuple. It has to search through the sequence it

Re: [Tutor] For - if - else loop; print selective output

2012-10-25 Thread Steven D'Aprano
On 26/10/12 07:16, eryksun wrote: On Thu, Oct 25, 2012 at 3:46 PM, Prasad, Ramit wrote: Do you happen to know offhand if there is a difference between `in` vs. `in` vs. `in`? The "in" comparison (__contains__ method) is equivalent for list and tuple. It has to search through the sequence it

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Steven D'Aprano
On 26/10/12 05:15, myles broomes wrote: I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents: 120 74 57 44 12 I thought that maybe the problem was the

Re: [Tutor] For - if - else loop; print selective output

2012-10-25 Thread Oscar Benjamin
On 26 October 2012 00:08, Steven D'Aprano wrote: > On 26/10/12 07:16, eryksun wrote: >> >> On Thu, Oct 25, 2012 at 3:46 PM, Prasad, Ramit >> wrote: >>> >>> >>> Do you happen to know offhand if there is a difference between >>> `in` vs. `in` vs. `in`? >> >> >> The "in" comparison (__contains__ me

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Alan Gauld
On 25/10/12 19:15, myles broomes wrote: but according to my program, the seperate file is empty when I know it clearly isn't. OK, So show us the program! Otherwise we are just guessing. Python Shell, it does the same thing. I open it in read mode and assign to a variable like so: scoresFil