Re: [Tutor] I'm new here, just saying hi

2013-12-12 Thread Dave Angel
On Thu, 12 Dec 2013 22:21:06 +, Mark Lawrence wrote: On 12/12/2013 19:12, Derek Jenkins wrote: > My recent inclusion into this mailing-list behooves me to give a > greeting. In that vein, hi to all! Hi Derek, welcome to the list. Note, though, that there are several problems with using h

Re: [Tutor] I'm new here, just saying hi

2013-12-12 Thread Mark Lawrence
On 12/12/2013 19:12, Derek Jenkins wrote: My recent inclusion into this mailing-list behooves me to give a greeting. In that vein, hi to all! Happy coding, .:Derek Hello, good evening and welcome, to quote Sir David Frost :) -- My fellow Pythonistas, ask not what our language can do for you

[Tutor] I'm new here, just saying hi

2013-12-12 Thread Derek Jenkins
My recent inclusion into this mailing-list behooves me to give a greeting. In that vein, hi to all! Happy coding, .:Derek ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tuto

Re: [Tutor] Superb exemplar

2013-12-12 Thread Mark Lawrence
On 12/12/2013 18:06, Keith Winston wrote: On Thu, Dec 12, 2013 at 5:00 AM, mailto:tutor-requ...@python.org>> wrote: That was a superb example of how not to post, don't change the subject line and send the whole digest instead of the part that you're replying to, no thanks. You are

Re: [Tutor] Web scrapping

2013-12-12 Thread Amal Thomas
On Fri, Dec 13, 2013 at 12:29 AM, Joel Goldstick wrote: > > > So, read the Requests tutorial, and study the POST examples as POST is the > http method that is used when filling in a form. First you will need to > examine the form to learn the names of the fields you need to provide data > for. >

Re: [Tutor] Web scrapping

2013-12-12 Thread Joel Goldstick
On Thu, Dec 12, 2013 at 1:55 PM, Amal Thomas wrote: > Hi, > > Ya its kind of user filling out a form and sending request. > Steps are like this. > 1. I need to submit my sequence in webserver ( like filling out a form in > web) > 2. Then I have to give a request for format sequence(available

Re: [Tutor] Web scrapping

2013-12-12 Thread Alan Gauld
On 12/12/13 18:49, Joel Goldstick wrote: Your subject 'screen scraping' is puzzling. It seems what you are asking is how to make your program act like a user filling out a form. Or i completely misunderstood. That's right. Screen scraping is a fairly standard corporate term for an application

Re: [Tutor] Web scrapping

2013-12-12 Thread Amal Thomas
Hi, Ya its kind of user filling out a form and sending request. Steps are like this. 1. I need to submit my sequence in webserver ( like filling out a form in web) 2. Then I have to give a request for format sequence(available in the link: http://mfold.rna.albany.edu/?q=mfold/RNA-Folding-Form

Re: [Tutor] Web scrapping

2013-12-12 Thread Joel Goldstick
On Thu, Dec 12, 2013 at 1:41 PM, Amal Thomas wrote: > Hi, > > I am new to python3. I am working in computational biology. I need to > submit many sequence (one by one) to a http web server ( > http://mfold.rna.albany.edu/?q=mfold/RNA-Folding-Form) . After the > processing I need to download the

[Tutor] Web scrapping

2013-12-12 Thread Amal Thomas
Hi, I am new to python3. I am working in computational biology. I need to submit many sequence (one by one) to a http web server ( http://mfold.rna.albany.edu/?q=mfold/RNA-Folding-Form) . After the processing I need to download the output file. There is an offline package for this server but cer

Re: [Tutor] something weird

2013-12-12 Thread Alan Gauld
On 12/12/13 17:13, Paolo Supino wrote: print "password hash: " + crypt.crypt("password") When I try to do su - [user] (after copying the hash into /etc/shadow) the password accepted is 'password' You are passing the literal string password to the crypt() call. I suspect that has something t

[Tutor] Superb exemplar

2013-12-12 Thread Keith Winston
On Thu, Dec 12, 2013 at 5:00 AM, wrote: > That was a superb example of how not to post, don't change the subject > line and send the whole digest instead of the part that you're replying > to, no thanks. > You are certainly welcome. I blame gmail. Seriously, though, sorry. I was castigated priva

[Tutor] something weird

2013-12-12 Thread Paolo Supino
Hi I've written the following small script to create SHA512 salted hash to insert into /etc/shadow #!/bin/env python import sys, crypt, getpass interactive="no" wantedNumberArgs=2 minumumLength=8 argc=len(sys.argv) if argc == wantedNumberArgs: password=str(sys.argv[1]) elif argc > wantedNu

Re: [Tutor] Assigning a variable to an FTP directory listing

2013-12-12 Thread Pat Martin
Below is what worked for me, thank you. I had a feeling it had to do with the callback but have never dealt with callbacks before so wasn't sure. Time to do more reading. For those asking about alternatives to FTP, its for a vendor who only uses FTP so no choice in that. Thanks all for the help.

[Tutor] flush of output

2013-12-12 Thread spir
Hello, I need to write out, both to stdout and stderr channels, which indeed in general are the same one, and things written to be in order (lol!). For now, I flush on stderr, and apparently there is no issue on stdout. Does someone know more about that? I seem to remember stdout is flushed on

Re: [Tutor] Assigning a variable to an FTP directory listing

2013-12-12 Thread Walter Prins
Hi, On 12 December 2013 01:03, Danny Yoo wrote: > By the way, I would recommend not doing this with FTP. If I remember > rightly, it passes passwords in plain text, which is not so good. > Reference: http://en.wikipedia.org/wiki/File_Transfer_Protocol#Security. > You might just want to use so

Re: [Tutor] formatting datetime.timedelta to "HH:MM:SS"

2013-12-12 Thread eryksun
On Wed, Dec 11, 2013 at 8:37 AM, Mark Lawrence wrote: > > print('{}:{}:{}'.format(now.hour, now.minute, now.year)) > > Sorry I can never remember the formatting types to go between {} so look for > them around here http://docs.python.org/3/library/string.html#formatstrings For datetime's date, ti

[Tutor] How not to post (Was Re: Tutor Digest, Vol 118, Issue 53)

2013-12-12 Thread Mark Lawrence
On 12/12/2013 07:00, Keith Winston wrote: Hey Denis, that was a nice explanation of recursion, thanks. That was a superb example of how not to post, don't change the subject line and send the whole digest instead of the part that you're replying to, no thanks. -- My fellow Pythonistas, ask

Re: [Tutor] recursive function example

2013-12-12 Thread Mark Lawrence
On 12/12/2013 04:18, uga...@talktalk.net wrote: I don't mind you asking if you don't understand something, but please don't top post on this list, it makes following discussions such as this more difficult than it need be. -- My fellow Pythonistas, ask not what our language can do for you, as

Re: [Tutor] recursive function example

2013-12-12 Thread Alan Gauld
Oops, I got this slightly wrong. On 12/12/13 08:50, Alan Gauld wrote: mult(3,0) It returns zero because b is zero, right? Now consider what it does for mult(3,1) It checks if b is zero, it's not, so it executes rest = 3 + mult(3,0) Sorry, it actually does: rest = mult(3,0) So rest equal

Re: [Tutor] recursive function example

2013-12-12 Thread Alan Gauld
On 12/12/13 04:18, uga...@talktalk.net wrote: In a way,it may help to identify the issue def multiply(a,b) return a*b clearly returns the product of the two arguments, a and b I presume it returns a+a rather than b+b+b It depends on how multiplication is implemented in the CPU microcode. But

Re: [Tutor] recursive function example

2013-12-12 Thread ugajin
In a way, it may help to identify the issue def multiply(a,b) return a*b clearly returns the product of the two arguments, a and b I presume it returns a+a rather than b+b+b mult(a, b-1) also has two arguments. and rest takes the value of the two arguments, but I do not see an instruction to m

Re: [Tutor] Tutor Digest, Vol 118, Issue 53

2013-12-12 Thread Keith Winston
Hey Denis, that was a nice explanation of recursion, thanks. On Wed, Dec 11, 2013 at 8:37 AM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or,