[Tutor] Detail your problem, privately (was Re: finding a polymer of letters in a string)

2012-01-19 Thread Hilton Fernandes
Hi, Hs ! I believe that in this list there are people that know a lot about either regular expressions in Python, or about DNA strings. They will be able to give you qualified help about what you are asking, since you provide them enough data. In any case, you can write to me privately if you'd

Re: [Tutor] finding a polymer of letters in a string

2012-01-19 Thread delegbede
Hi, The explanation you have given isn't good enough to get us anywhere. What are the possible patterns? Do you have a fixed number of As you're looking out for? What defines a polymer region? The different DNA samples, how are they separated? With commas, new lines etc? You can do a line b

Re: [Tutor] finding a polymer of letters in a string

2012-01-19 Thread Jerry Hill
On Thu, Jan 19, 2012 at 1:44 PM, Hs Hs wrote: > so I do not know what that pattern would be when I read in a string. I do > not know if regex could solve my kind of problem too. > Ignore the python portion of the problem for now. Imagine someone handed you a piece of paper with the letters "AAA

Re: [Tutor] finding a polymer of letters in a string

2012-01-19 Thread Hs Hs
Hi Hilton. Thanks for your suggestion. I saw re module. I should have explain a little bit in my message that patter of polymer is not constant. There could be variety of combinations given A, T G and C. it could be AAATAAA, ATATATAT, or GTAGTAGTA or GGGACCCGAAAT etc. so I do not know wha

Re: [Tutor] finding a polymer of letters in a string

2012-01-19 Thread Hilton Fernandes
Hi ! Have you considered regular expressions in Python ? Please take a look at "Regular Expression HOWTO", at http://docs.python.org/howto/regex.html All the best, Hilton On Thu, Jan 19, 2012 at 4:09 PM, Hs Hs wrote: > Hi: > I am writing to see if I could any help. > I am trying to find if a

[Tutor] finding a polymer of letters in a string

2012-01-19 Thread Hs Hs
Hi:  I am writing to see if I could any help. I am trying to find if a mutation in gene falls in a polymer region of DNA. To explain in simplistic terms, Given a piece of DNA string, with following characters, I know where mutation happens.  Happens at T (in quotes with spaces.) 3 As before T

Re: [Tutor] Facebook apps with python

2012-01-19 Thread Tony Pelletier
On Wed, Jan 18, 2012 at 8:34 AM, karthik s wrote: > Well, my question is simple.. > How do I create facebook apps with python. I have couple of interesting/ > funky programs and want to make them as apps. > So, > 1. What all things I should know for writing facebook apps. > 2. I read that we shoul

Re: [Tutor] appending to a file on a new line

2012-01-19 Thread Dave Angel
On 01/19/2012 10:04 AM, ADRIAN KELLY wrote: guys, its a text file i am writing to and when i write the first time its fine, i get 3 lines of input collected from a user and written to my text file, however if i run the program again the next 3 lines begin at the end of the previous users detai

Re: [Tutor] appending to a file on a new line

2012-01-19 Thread ADRIAN KELLY
guys, its a text file i am writing to and when i write the first time its fine, i get 3 lines of input collected from a user and written to my text file, however if i run the program again the next 3 lines begin at the end of the previous users details. It works fine but starts from where the

Re: [Tutor] appending to a file on a new line

2012-01-19 Thread Dave Angel
On 01/19/2012 09:32 AM, ADRIAN KELLY wrote: Hi everyone, is there an easy way to write to a file (that already exists with data contained) on a new line. I understand that the file pointer appends where it left off but how do i write to the next line or even skip a line if possible? User_info

Re: [Tutor] appending to a file on a new line

2012-01-19 Thread Joel Goldstick
On Thu, Jan 19, 2012 at 9:32 AM, ADRIAN KELLY wrote: > Hi everyone, > is there an easy way to write to a file (that already exists with data > contained) on a new line.  I understand that the file pointer appends where > it left off but how do i write to the next line or even skip a line if > poss

[Tutor] appending to a file on a new line

2012-01-19 Thread ADRIAN KELLY
Hi everyone, is there an easy way to write to a file (that already exists with data contained) on a new line. I understand that the file pointer appends where it left off but how do i write to the next line or even skip a line if possible? User_info=open("C:\\Documents and Settings\\akelly\\D

Re: [Tutor] Question about install.py

2012-01-19 Thread Evert Rol
Hi, > I'm new to Python and was wondering if someone could answer a question I have. > Say that I have a python library, arithmetic-0.5, located at /X/arithmetic-0.5 > I'd like to run setup and install it. But I guess since /X/arithmetic-0.5 is > not in install.py's default search path, it come

Re: [Tutor] help with program from learning python the hard way

2012-01-19 Thread Walter Prins
Hi Jason, On 19 January 2012 13:02, Jason Loeve wrote: > good day i seem to be stuck, my code is > > from sys import argv > > script, user_name = argv > > and i get an error ValueError: need more than 1 value to unpack > The implication of this message is that the value of "argv" contains only

Re: [Tutor] help with program from learning python the hard way

2012-01-19 Thread bodsda
If I say that sys.argv is a list, does that help you? Also, run things from a command prompt for this kind of thing, at least then you can guarantee what args get passed Bodsda Sent from my BlackBerry® wireless device -Original Message- From: Jason Loeve Sender: tutor-bounces+bodsda

Re: [Tutor] help with program from learning python the hard way

2012-01-19 Thread vishwajeet singh
On Thu, Jan 19, 2012 at 6:32 PM, Jason Loeve wrote: > good day i seem to be stuck, my code is > > from sys import argv > > script, user_name = argv > Are you passing an additional parameter while executing the script ?? you must execute it passing an additional parameter which will get assigned

[Tutor] help with program from learning python the hard way

2012-01-19 Thread Jason Loeve
good day i seem to be stuck, my code is from sys import argv script, user_name = argv and i get an error ValueError: need more than 1 value to unpack http://learnpythonthehardway.org/book/ex14.html i am using PyCharm 1.5.4 to run thanks in advance jason ___