Re: [Tutor] Python shell wont open IDLE or an exisiting .py files

2014-01-29 Thread eryksun
On Wed, Jan 29, 2014 at 11:16 PM, Ben Finney wrote: > Terry Reedy writes: > >> This I do not. What is 'Python GUI'? What is 'Python Shell'? > > Those are (part of) the names of menu entries created by the Python > installer for MS Windows. I am not sure exactly what programs they > invoke. The a

Re: [Tutor] Python shell wont open IDLE or an exisiting .py files

2014-01-29 Thread Ben Finney
Terry Reedy writes: > On 1/29/2014 6:26 PM, shangonich...@sbcglobal.net wrote: > > > If I launch the Python GUI it opens a Python Shell fine. But as > > > soon as I try to open a file (including a "new" file), it closes > > > the Shell. > > This I do not. What is 'Python GUI'? What is 'Python

[Tutor] imaplib and mutt flags

2014-01-29 Thread Bill Campbell
I'm writing a python script which uses imaplib to select all unseen messages from a mail folder to process some messages flagging them as seen, and leaving others as unseen so they can be manually processed using the 'mutt' mail client. After some trial and error, I've figured out how to remove th

[Tutor] Fwd: reading files

2014-01-29 Thread David Palao
...that I forgot to send to the mailing list... -- Forwarded message -- From: David Palao Date: 2014-01-29 Subject: Re: [Tutor] reading files To: Gabriele Brambilla Hi, One possibility I can think of: If you make one string with one line of your input, like s = "1.0551

Re: [Tutor] reading files

2014-01-29 Thread David Palao
2014-01-29 Mark Lawrence : > On 29/01/2014 14:50, Gabriele Brambilla wrote: >> >> thanks to everyone, I've used David's method. >> >> Gabriele >> >> 2014-01-29 Mark Lawrence > > >> >> >> On 29/01/2014 02:09, Gabriele Brambilla wrote: >> >> Hi, >>

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread eryksun
On Wed, Jan 29, 2014 at 3:53 PM, Keith Winston wrote: > I had the impression that Peter was employing tuples because, > as an immutable type, it couldn't inadvertently/inauspiciously > be changed by a user Per footnote 5 of PEP 249, the parameters need to be in a type that supports __getitem__ (s

Re: [Tutor] Code runs in interpreter but won't output to stdout

2014-01-29 Thread bob gailer
On 1/28/2014 9:12 PM, scurvy scott wrote: Hi guys, I'm trying to figure out why my code won't output to terminal, but will run just fine in interpreter. I'm using python 2.7.3 on Debian Linux/Crunchbang. Here is my code. import requests from bs4 import BeautifulSoup as beautiful import sys de

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Keith Winston
On Wed, Jan 29, 2014 at 3:03 PM, Mark Lawrence wrote: > Nothing to do with tuples. Tools such as syntax checkers or MkI eyeballs > come in useful here. Although such tools probably won't pick up the > incorrect spelling of "harboUr" :) Alas, now I'm more confused. I don't see any mispellings in

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Mark Lawrence
On 29/01/2014 19:47, Keith Winston wrote: On Wed, Jan 29, 2014 at 12:11 PM, Mark Lawrence wrote: I think it's worth pointing out that there is a difference here between the OP's 'Site Name's Harbor.JPG' and Peter's "Site Name's Harbor.JPG". Left as homework for the newbies :) I'll bite. But

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Keith Winston
On Wed, Jan 29, 2014 at 12:11 PM, Mark Lawrence wrote: > I think it's worth pointing out that there is a difference here between the > OP's 'Site Name's Harbor.JPG' and Peter's "Site Name's Harbor.JPG". Left as > homework for the newbies :) I'll bite. But are you just referring to the tuple iss

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Ahmed, Shakir
Thanks, it worked exactly what I was trying to do so. -Original Message- From: Tutor [mailto:tutor-bounces+shahmed=sfwmd@python.org] On Behalf Of Peter Otten Sent: Wednesday, January 29, 2014 11:47 AM To: tutor@python.org Subject: Re: [Tutor] help with data insert into Access table A

[Tutor] Project directory structure

2014-01-29 Thread Reuben
Hi, Do we need to follow any particular directory structure for creating any New projects or could we just randomly create a folder containing the script of interest? Regards, Reuben ___ Tutor maillist - Tutor@python.org To unsubscribe or change subsc

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Mark Lawrence
On 29/01/2014 16:46, Peter Otten wrote: Ahmed, Shakir wrote: I am trying to insert a record in the access table, the value has a quote and could not insert the record. Any idea how I can insert records like this quotes. cursor.execute("INSERT INTO PicsPostInfo(Pics_name) values ('Site Name's

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Peter Otten
Ahmed, Shakir wrote: > I am trying to insert a record in the access table, the value has a quote > and could not insert the record. Any idea how I can insert records like > this quotes. > cursor.execute("INSERT INTO PicsPostInfo(Pics_name) values ('Site Name's > Harbor.JPG')") Traceback (most rec

Re: [Tutor] reading files

2014-01-29 Thread Mark Lawrence
On 29/01/2014 14:50, Gabriele Brambilla wrote: thanks to everyone, I've used David's method. Gabriele 2014-01-29 Mark Lawrence mailto:breamore...@yahoo.co.uk>> On 29/01/2014 02:09, Gabriele Brambilla wrote: Hi, how could I read float numbers if the data format is like this

Re: [Tutor] If, elif, else

2014-01-29 Thread Dave Angel
Steven D'Aprano Wrote in message: > > Sorry Dave, your tools are letting you down again. Michael did in fact > post with plain text. His original email included both a text/plain part > and a text/html part. > > Now I'm no friend of posting in HTML, I think it's a poor idea from both > a te

[Tutor] help with data insert into Access table

2014-01-29 Thread Ahmed, Shakir
Hi, I am trying to insert a record in the access table, the value has a quote and could not insert the record. Any idea how I can insert records like this quotes. Thanks S cursor.execute("INSERT INTO PicsPostInfo(Pics_name) values ('Site Name's Harbor.JPG')") Traceback (most recent call last)

Re: [Tutor] reading files

2014-01-29 Thread Gabriele Brambilla
thanks to everyone, I've used David's method. Gabriele 2014-01-29 Mark Lawrence > On 29/01/2014 02:09, Gabriele Brambilla wrote: > >> Hi, >> how could I read float numbers if the data format is like this (using >> readline): >> >> 1.0551951.26758123387023-0.314470329249

Re: [Tutor] When is = a copy and when is it an alias

2014-01-29 Thread spir
On 01/29/2014 02:34 AM, Denis Heidtmann wrote: Glad to hear it. That is what I was hoping, but I did not want to question a helpful person. (you could & should, we need helpful feedback too, to improve our skills; i mean, as long as it's honest indeed) d

Re: [Tutor] If, elif, else

2014-01-29 Thread Steven D'Aprano
On Tue, Jan 28, 2014 at 07:42:25PM -0500, Dave Angel wrote: > "Michael L. Pierre" Wrote in message: > > ___ > > Tutor maillist - Tutor@python.org > > To unsubscribe or change subscription options: > > https://mail.python.org/mailman/listinfo/tutor > >

Re: [Tutor] reading files

2014-01-29 Thread Mark Lawrence
On 29/01/2014 02:09, Gabriele Brambilla wrote: Hi, how could I read float numbers if the data format is like this (using readline): 1.0551951.26758123387023-0.314470329249235 -0.293015360064208 6.157957619078221.92919102133526 13.07804596303782.151753

Re: [Tutor] reading files

2014-01-29 Thread Alan Gauld
On 29/01/14 02:09, Gabriele Brambilla wrote: how could I read float numbers if the data format is like this (using readline): 1.0551951.26758123387023-0.314470329249235 -0.293015360064208 6.157957619078221.92919102133526 the numbers aren't equally spaced

[Tutor] Code runs in interpreter but won't output to stdout

2014-01-29 Thread scurvy scott
Hi guys, I'm trying to figure out why my code won't output to terminal, but will run just fine in interpreter. I'm using python 2.7.3 on Debian Linux/Crunchbang. Here is my code. import requests from bs4 import BeautifulSoup as beautiful import sys def dogeScrape(username, password): payload

Re: [Tutor] When is = a copy and when is it an alias

2014-01-29 Thread Denis Heidtmann
On Tue, Jan 28, 2014 at 5:19 PM, Alan Gauld wrote: > On 28/01/14 19:00, Denis Heidtmann wrote: > >> On Tue, Jan 28, 2014 at 12:28 AM, spir > > > This is getting confusing with two times Denis! > > > wrote: >> >> a = [1,[2,3]] >> > > I think the above l

Re: [Tutor] subprocess.Popen help

2014-01-29 Thread Mkhanyisi Madlavana
On 28 January 2014 21:52, leam hall wrote: > Python tutorial for 2.6 (using 2.4 -- don't ask), first code blurb under > 17.1.1 > > > http://docs.python.org/2.6/library/subprocess.html?highlight=subprocess#subprocess.Popen > > How would you make an ssh to another box put data back in "p"? The > go

[Tutor] reading files

2014-01-29 Thread Gabriele Brambilla
Hi, how could I read float numbers if the data format is like this (using readline): 1.0551951.26758123387023-0.314470329249235 -0.293015360064208 6.157957619078221.92919102133526 13.07804596303782.15175351758512e6 the numbers aren't equally spaced and