[Tutor] where to look for python codes

2011-09-29 Thread Praveen Singh
i am a beginner in python.i am not asking about any books here.As i have heard one essential steps of learning is to look for some good python codes.So, can you guys please and please suggest me some sites or some small projects where i can find these codes?? please remember i am at a BEGINNER's le

Re: [Tutor] where to look for python codes

2011-09-29 Thread Alan Gauld
On 29/09/11 09:27, Praveen Singh wrote: i am a beginner in python.i am not asking about any books here.As i have heard one essential steps of learning is to look for some good python codes.So, can you guys please and please suggest me some sites or some small projects where i can find these codes

[Tutor] last part of my programme

2011-09-29 Thread ADRIAN KELLY
can anyone tell me why the last part of my programme wont work. i want the user to have to press enter to exit but it doesn't happen through the python interface. the programme works fine otherwise but just shuts down when finished thanks all adrian

Re: [Tutor] last part of my programme

2011-09-29 Thread Christian Witts
On 2011/09/29 11:05 AM, ADRIAN KELLY wrote: can anyone tell me why the last part of my programme wont work. i want the user to have to press enter to exit but it doesn't happen through the python interface. the programme works fine otherwise but just shuts down when finished thanks all adri

Re: [Tutor] last part of my programme

2011-09-29 Thread Peter Otten
ADRIAN KELLY wrote: > can anyone tell me why the last part of my programme wont work. i want > the user to have to press enter to exit but it doesn't happen through the > python interface. > > the programme works fine otherwise but just shuts down when finished (I'm assuming you are on Windows

[Tutor] Mac IDE

2011-09-29 Thread Robert Johansson
Hi, I know that there is a lot to read about different IDEs on the net but I have tried a couple and I'm still not pleased. My demands are not that high, when I'm under Windows I'm happy with IDLE (an interactive shell and debug) but the problem is with Mac (Python >= 2.7 and OS 10.7). IDLE had

Re: [Tutor] Mac IDE

2011-09-29 Thread sli1...@yahoo.com
I use eclipse. Overkill for you maybe but you can so anything. Sent from my Verizon Wireless 4GLTE smartphone - Reply message - From: "Robert Johansson" To: "tutor@python.org" Subject: [Tutor] Mac IDE Date: Thu, Sep 29, 2011 2:42 am Hi, I know that there is a lot to read about different

Re: [Tutor] Mac IDE

2011-09-29 Thread Walter Prins
Hi On 29 September 2011 10:42, Robert Johansson wrote: > Hi, > > ** ** > > I know that there is a lot to read about different IDEs on the net but I > have tried a couple and I’m still not pleased. My demands are not that high, > when I’m under Windows I’m happy with IDLE (an interactive shell

Re: [Tutor] where to look for python codes

2011-09-29 Thread Tommy Kaas
> -Oprindelig meddelelse- > Fra: tutor-bounces+tommy.kaas=kaasogmulvad...@python.org > [mailto:tutor-bounces+tommy.kaas=kaasogmulvad...@python.org] På > vegne af Alan Gauld > Sendt: 29. september 2011 10:48 > Til: tutor@python.org > Emne: Re: [Tutor] where to look for python codes > > On 2

Re: [Tutor] Mac IDE

2011-09-29 Thread Wayne Werner
On Thu, Sep 29, 2011 at 5:50 AM, Walter Prins wrote: > On 29 September 2011 10:42, Robert Johansson > wrote: > >> Hi, >> >> ** ** >> >> I know that there is a lot to read about different IDEs on the net but I >> have tried a couple and I’m still not pleased. My demands are not that high, >>

Re: [Tutor] where to look for python codes

2011-09-29 Thread Chris Fuller
Unless you are explicitly reading a tutorial, the code you will be looking at isn't going to be beginner-level in general, but you can look at smaller snippets and libraries then work up from that. http://effbot.org/zone/ http://code.activestate.com/recipes/langs/python/ http://pypi.python.org/

[Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
Hi, I want to read a bunch of *.doc file in present working directory, how can I use for to read one by one and do further work, sorry, what's the best reference webpage I can use? I googled, lots of distracting info, and I barely can understand how they think. THanks, -- Best Regards, lin

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Tim Golden
On 29/09/2011 15:22, lina wrote: I want to read a bunch of *.doc file in present working directory, how can I use for to read one by one and do further work, sorry, what's the best reference webpage I can use? I googled, lots of distracting info, and I barely can understand how they think.

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
On Thu, Sep 29, 2011 at 10:25 PM, Tim Golden wrote: > On 29/09/2011 15:22, lina wrote: > >> I want to read a bunch of *.doc file in present working directory, >> >> how can I use for to read one by one and do further work, >> >> sorry, >> >> what's the best reference webpage I can use? >> >> I go

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Dave Angel
On 09/29/2011 10:22 AM, lina wrote: Hi, I want to read a bunch of *.doc file in present working directory, how can I use for to read one by one and do further work, sorry, what's the best reference webpage I can use? I googled, lots of distracting info, and I barely can understand how they t

Re: [Tutor] Mac IDE

2011-09-29 Thread Tom Tucker
Another IDE to consider that supports the MAC OS is PyCharm from JetBrains. On Thu, Sep 29, 2011 at 7:50 AM, Wayne Werner wrote: > On Thu, Sep 29, 2011 at 5:50 AM, Walter Prins wrote: > >> On 29 September 2011 10:42, Robert Johansson < >> robert.johans...@math.umu.se> wrote: >> >>> Hi, >>> >

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
import os.path tokens=['E'] result=[] for fileName in os.listdir("."): if os.path.isfile(fileName) and os.path.splitext(fileName)=="xpm": filedata = open(fileName) text=filedata.readlines() for line in text: How can I read from line 24 and do further looking for "E".

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
On Thu, Sep 29, 2011 at 10:55 PM, lina wrote: > import os.path > > tokens=['E'] > result=[] > > > for fileName in os.listdir("."): > if os.path.isfile(fileName) and os.path.splitext(fileName)=="xpm": > filedata = open(fileName) > text=filedata.readlines() > for line in

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
mport os.path tokens=['E'] result=[] for fileName in os.listdir("."): if os.path.isfile(fileName) and os.path.splitext(fileName)=="xpm": filedata = open(fileName,'r') text=filedata.readlines() for line in text: print line why here I print nothing out? The

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Walter Prins
On 29 September 2011 16:13, lina wrote: > mport os.path > > tokens=['E'] > result=[] > > for fileName in os.listdir("."): > if os.path.isfile(fileName) and os.path.splitext(fileName)=="xpm": > filedata = open(fileName,'r') > > text=filedata.readlines() > for line in te

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
On Thu, Sep 29, 2011 at 11:18 PM, Walter Prins wrote: > > > On 29 September 2011 16:13, lina wrote: > >> mport os.path >> >> tokens=['E'] >> result=[] >> >> for fileName in os.listdir("."): >> if os.path.isfile(fileName) and os.path.splitext(fileName)=="xpm": >> filedata = open(fileN

Re: [Tutor] map one file and print it out following the sequence

2011-09-29 Thread Prasad, Ramit
From: tutor-bounces+ramit.prasad=jpmorgan@python.org [mailto:tutor-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of lina Sent: Tuesday, September 27, 2011 10:35 PM Cc: tutor Subject: Re: [Tutor] map one file and print it out following the sequence Hi, Thanks for both of your reply.

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Dave Angel
(Please don't top-post. Put your remarks AFTER the part you're quoting from the previous message) On 09/29/2011 10:55 AM, lina wrote: import os.path tokens=['E'] result=[] for fileName in os.listdir("."): if os.path.isfile(fileName) and os.path.splitext(fileName)=="xpm": fileda

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
On Thu, Sep 29, 2011 at 11:28 PM, Dave Angel wrote: > (Please don't top-post. Put your remarks AFTER the part you're quoting > from the previous message) > > > On 09/29/2011 10:55 AM, lina wrote: > >> import os.path >> >> tokens=['E'] >> result=[] >> >> for fileName in os.listdir("."): >> if

Re: [Tutor] Mac IDE

2011-09-29 Thread Tim Johnson
* Wayne Werner [110929 03:52]: > > My personal favorite? > > Two terminal windows - one with Vim, editing my Python scripts, and another > with an interactive interpreter. Since you can map keys in Vim, I have > mapped to save and run current file. If you're in the habit of editing > multiple f

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Prasad, Ramit
Or you can get lines 24-28, with  text[24, 29]   (look up slices in the Python doc)  >>> print splitext.__doc__ Traceback (most recent call last):   File "", line 1, in NameError: name 'splitext' is not defined >>> print slices.__doc__ Traceback (most recent call last):   File "", line 1, in Na

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Walter Prins
Hi, On 29 September 2011 16:39, lina wrote: > > Or you can get lines 24-28, with text[24, 29] (look up slices in the >> Python doc) >> > Dave probably meant: text[24:29] > >>> print splitext.__doc__ > Traceback (most recent call last): > File "", line 1, in > NameError: name 'splitext'

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Walter Prins
Hi, On 29 September 2011 16:39, lina wrote: > Traceback (most recent call last): > File "", line 1, in > NameError: name 'slices' is not defined > Sorry I meant to include a link to relevant documentation: http://docs.python.org/tutorial/introduction.html (And apologies for forgetting to re

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
On Thu, Sep 29, 2011 at 11:57 PM, Walter Prins wrote: > Hi, > > On 29 September 2011 16:39, lina wrote: > >> >> Or you can get lines 24-28, with text[24, 29] (look up slices in the >>> Python doc) >>> >> > Dave probably meant: text[24:29] > > > >> >>> print splitext.__doc__ >> Traceback (mos

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Walter Prins
Hi, On 29 September 2011 17:07, lina wrote: > I found one thing a bit weird, Here is the one: > > import os.path > > tokens=['E'] > result=[] > > """ > for fileName in os.listdir("."): > if os.path.isfile(fileName) and os.path.splitext(fileName)[1]==".xpm": > """ > filedata = open("1.xpm") >

Re: [Tutor] map one file and print it out following the sequence

2011-09-29 Thread lina
On Thu, Sep 29, 2011 at 10:57 PM, Prasad, Ramit wrote: > From: tutor-bounces+ramit.prasad=jpmorgan@python.org [mailto: > tutor-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of lina > Sent: Tuesday, September 27, 2011 10:35 PM > Cc: tutor > Subject: Re: [Tutor] map one file and print

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread lina
On Fri, Sep 30, 2011 at 12:31 AM, Walter Prins wrote: > Hi, > > On 29 September 2011 17:07, lina wrote: > >> I found one thing a bit weird, Here is the one: >> >> import os.path >> >> tokens=['E'] >> result=[] >> >> """ >> for fileName in os.listdir("."): >> if os.path.isfile(fileName) and o

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Alan Gauld
On 29/09/11 15:22, lina wrote: I want to read a bunch of *.doc file in present working directory, What format are the doc files? If they are word processor files they may well be in binary format so you will need to either decode them (using struct?) or find a module that can read them, or a

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Alan Gauld
On 29/09/11 17:00, Walter Prins wrote: email. By the way, a question to the list adminstrators: why does the default reply to address for this mailing list not default to the mailing list? This is an oft debated issue and there are arguments for both options. The current setup allows easier r

Re: [Tutor] Mac IDE

2011-09-29 Thread Alan Gauld
On 29/09/11 12:50, Wayne Werner wrote: Two terminal windows - one with Vim, editing my Python scripts, and another with an interactive interpreter Of course these capabilities (and many many more) are available with Emacs. I personally recommend that you learn one (or both) of these editor

Re: [Tutor] map one file and print it out following the sequence

2011-09-29 Thread Prasad, Ramit
>For line in array: >   print ' '.join( line ) Sorry this it should be: for line in processed: print ' '.join( line ) This worked for me. >>> pprint.pprint( processed) # Note in the email I have changed the format but >>> not the data [['ATOM', '2', 'H20', 'CUR', '1', '30.338', '28.778

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Prasad, Ramit
>This is an oft debated issue and there are arguments for both options. >The current setup allows easier replies to either originator or list by >simply selecting which Reply button you use. If you set default reply to >the list how do you reply to just the originator when you want to? I would h

Re: [Tutor] where to look for python codes

2011-09-29 Thread bodsda
I would suggest looking on http://ubuntuforums.org for the “Beginner programming challenges“ - there is an index of past challenges as a sticky in the programming talk subforum. A large number of entries for these challenges are in python, and as the name implies, the submissions are usually wri

Re: [Tutor] Mac IDE

2011-09-29 Thread Robert Johansson
Wing IDE looks promising on my windows machine. I will start by checking out their trial under OSX. Thanks for all suggestions, Robert Från: tutor-bounces+robert.johansson=math.umu...@python.org [mailto:tutor-bounces+robert.johansson=math.umu...@python.org] För Tom Tucker Skickat: den 29 septem

Re: [Tutor] Mac IDE

2011-09-29 Thread Tim Johnson
* Alan Gauld [110929 09:29]: > On 29/09/11 12:50, Wayne Werner wrote: > > >Two terminal windows - one with Vim, editing my Python scripts, and > >another with an interactive interpreter > > > >Of course these capabilities (and many many more) are available with Emacs. > > > >I personally reco

Re: [Tutor] a quick Q: how to use for loop to read a series of files with .doc end

2011-09-29 Thread Walter Prins
Hi Alan, On 29 September 2011 18:12, Alan Gauld wrote: > On 29/09/11 17:00, Walter Prins wrote: > > email. By the way, a question to the list adminstrators: why does the >> default reply to address for this mailing list not default to the >> mailing list? >> > > This is an oft debated issue an

[Tutor] Mailing list archive oddity?

2011-09-29 Thread Prasad, Ramit
So I wanted to reference a post I had already deleted and I looked at the archive (http://mail.python.org/pipermail/tutor/). My question...how do I get a future capable email client like the archive? :) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Stree

Re: [Tutor] Mailing list archive oddity?

2011-09-29 Thread Devin Jeanpierre
> So I wanted to reference a post I had already deleted and I looked at the > archive (http://mail.python.org/pipermail/tutor/). > > My question...how do I get a future capable email client like the archive? :) What mail client do you use? Does it offer a way to move posts out of the inbox, witho

Re: [Tutor] Mailing list archive oddity?

2011-09-29 Thread Prasad, Ramit
-Original Message- From: Devin Jeanpierre [mailto:jeanpierr...@gmail.com] Sent: Thursday, September 29, 2011 3:11 PM To: Prasad, Ramit Cc: tutor@python.org Subject: Re: [Tutor] Mailing list archive oddity? > So I wanted to reference a post I had already deleted and I looked at the > arch

Re: [Tutor] Mailing list archive oddity?

2011-09-29 Thread Devin Jeanpierre
> I think you misunderstood my question. The web archive of the list has a few > entries that have not occurred yet (which you may have noticed if you visited > the link). Ah. I have an unfortunate medical condition where I only click hyperlinks when they don't matter. Devin On Thu, Sep 29, 20

Re: [Tutor] Mailing list archive oddity?

2011-09-29 Thread Hugo Arts
On Thu, Sep 29, 2011 at 10:25 PM, Prasad, Ramit wrote: > > I think you misunderstood my question. The web archive of the list has a few > entries that have not occurred yet (which you may have noticed if you visited > the link). > > January 2027:   [ Thread ] [ Subject ] [ Author ] [ Date ]    

Re: [Tutor] Mailing list archive oddity?

2011-09-29 Thread Mac Ryan
On Thu, 29 Sep 2011 23:08:19 +0200 Hugo Arts wrote: > * someone from the future is in need of python help and is sending > messages back in time. I told Guido that Python version 5.2 sucked, but he wouldn't / will not listen! :-/ /mac ___ Tutor mailli

Re: [Tutor] Mailing list archive oddity?

2011-09-29 Thread Terry Carroll
On Thu, 29 Sep 2011, Hugo Arts wrote: * someone from the future is in need of python help and is sending messages back in time. I'm betting this is Guido and his time machine again. ___ Tutor maillist - Tutor@python.org To unsubscribe or change sub

Re: [Tutor] Mac IDE

2011-09-29 Thread Fernando Salamero
Another great IDE is NINJA-IDE, http://www.ninja-ide.org , but they are still searching for somebody who makes an installer. Any volunteer? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mail