how to split the file into two sections....

2012-12-03 Thread indu_shreenath
Hi: I have a text as version comp X - aa version comp Y - bbb version comp Z -cc 12.12 Check for option 1 12:13 Pass Test 1 12:14 verified bla bla bla 12.15 completed 12.16 Fail Test 2 12:17 verified bla bla bla 12.18 completed 12.19 Fail Test 3 12:20 verified bla bla bla 12.21 completed 12.2

Re: Puzzling error msg.

2012-12-03 Thread Dave Angel
On 12/03/2012 10:28 PM, Chris Angelico wrote: > On Tue, Dec 4, 2012 at 1:28 PM, Dave Angel wrote: >> On 12/03/2012 03:33 PM, Chris Angelico wrote: >>> >>> Is it possible that the error actually came from further up (with a >>> faulty line number) and was actually because communicate() somehow >>>

Re: Puzzling error msg.

2012-12-03 Thread Chris Angelico
On Tue, Dec 4, 2012 at 1:28 PM, Dave Angel wrote: > On 12/03/2012 03:33 PM, Chris Angelico wrote: >> >> Is it possible that the error actually came from further up (with a >> faulty line number) and was actually because communicate() somehow >> returned an empty list? That's the only place in the

Re: Working with classes

2012-12-03 Thread Chris Angelico
On Tue, Dec 4, 2012 at 9:47 AM, wrote: > Hello, I've been working on this program for a long time but can't seem to > get it to work.. The first array is the input file, then a class, another > class and the actual program. Could anyone see what is wrong? I'm sorry if > the program doesn't mak

Re: noob: print and file.read()

2012-12-03 Thread Andrew Z
Mrab, you nailed it. thank you very much! AZ -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzling error msg.

2012-12-03 Thread Dave Angel
On 12/03/2012 03:33 PM, Chris Angelico wrote: > > Is it possible that the error actually came from further up (with a > faulty line number) and was actually because communicate() somehow > returned an empty list? That's the only place in the code quoted that > I'm seeing indexing, but communicate(

Can't get simplegui to display cards in Codesculptor (Blackjack project)

2012-12-03 Thread yambury
Help - I don't want to give up on this. I have all the logic working, but can't draw the cards on the canvas. Here is my link - Please try it out and offer suggestions http://www.codeskulptor.org/#user7-Ok26As4ZzMIuXVH-12.py Thanks, Jo -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with classes

2012-12-03 Thread Rhodri James
On Mon, 03 Dec 2012 22:47:53 -, wrote: Hello, I've been working on this program for a long time but can't seem to get it to work. I'm sorry, you are going to have to be a lot clearer. It isn't even a little bit obvious what you are talking about, which rather makes me suspect this is a

Re: noob: print and file.read()

2012-12-03 Thread MRAB
On 2012-12-03 23:06, Andrew Z wrote: Hello, why the following code doesn't print the content of the file: #!/usr/bin/python from_file ="file.txt" in_file = open(from_file) str = in_file.read() You've read the entire file, leaving the file pointer positioned at the end of the file. print "H

noob: print and file.read()

2012-12-03 Thread Andrew Z
Hello, why the following code doesn't print the content of the file: #!/usr/bin/python from_file ="file.txt" in_file = open(from_file) str = in_file.read() print "Here should be the output from the file - ", in_file.read() print "Here should be the output from the STR- ", str in_file.close() Th

Working with classes

2012-12-03 Thread laila
Hello, I've been working on this program for a long time but can't seem to get it to work.. The first array is the input file, then a class, another class and the actual program. Could anyone see what is wrong? I'm sorry if the program doesn't make any sense at all I'm just starting to learn th

Re: Conversion of List of Tuples

2012-12-03 Thread Walter Hurry
On Mon, 03 Dec 2012 22:11:40 +, Steven D'Aprano wrote: > On Mon, 03 Dec 2012 13:14:19 -0800, subhabangalore wrote: > >> Thanks. But I am not getting the counter "5posts 0 views"...if >> moderator can please check the issue. > > What counter are you talking about? > > This is an email mailin

Re: The default locale of sorted()

2012-12-03 Thread Ian Kelly
On Mon, Dec 3, 2012 at 3:17 PM, Peng Yu wrote: > Hi, > > I'm not able to find the documentation on what locale is used for > sorted() when the 'cmp' argument is not specified. Could anybody let > me what the default is? If I always want LC_ALL=C, do I need to > explicitly set the locale? Or it is

The default locale of sorted()

2012-12-03 Thread Peng Yu
Hi, I'm not able to find the documentation on what locale is used for sorted() when the 'cmp' argument is not specified. Could anybody let me what the default is? If I always want LC_ALL=C, do I need to explicitly set the locale? Or it is the default? Regards, Peng -- http://mail.python.org/mail

Re: Conversion of List of Tuples

2012-12-03 Thread Steven D'Aprano
On Mon, 03 Dec 2012 13:14:19 -0800, subhabangalore wrote: > Thanks. But I am not getting the counter "5posts 0 views"...if moderator > can please check the issue. What counter are you talking about? This is an email mailing list, also copied to the Usenet newsgroup comp.lang.python, and mirrore

Re: Conversion of List of Tuples

2012-12-03 Thread John Gordon
In subhabangal...@gmail.com writes: > Thanks. But I am not getting the counter "5posts 0 views"...if > moderator can please check the issue. I logged in via Google Groups and all the replies were present. What is your question? (This group is not moderated.) -- John Gordon

A Discussion on Python and Data Visualization

2012-12-03 Thread subhabangalore
Dear Group, I am trying to work out a data visualization module. Here, I am taking raw corpus,and processing it linguistically(tokenization,tagging,NED recognition) and then trying to link the NED's with Latent Semantic Analysis or Relationship Mining or Network graph theory or cluster analysis

Re: Conversion of List of Tuples

2012-12-03 Thread subhabangalore
On Tuesday, December 4, 2012 1:28:17 AM UTC+5:30, subhaba...@gmail.com wrote: > Dear Group, > > > > I have a tuple of list as, > > > > tup_list=[(1,2), (3,4)] > > Now if I want to covert as a simple list, > > > > list=[1,2,3,4] > > > > how may I do that? > > > > If any one can kindl

Re: Puzzling error msg.

2012-12-03 Thread Chris Angelico
On Tue, Dec 4, 2012 at 4:37 AM, wrote: > Traceback (most recent call last): > File "./Connection_Monitor.py", line 146, in > Google_up, Google_summary, Google_RTT, Google_stddev = > Google.connection_test() > File > "/Users/wrw/Dev/Python/Connection_Monitor/Version2.2/WorkingCopy/netwo

Re: Conversion of List of Tuples

2012-12-03 Thread Chris Angelico
On Tue, Dec 4, 2012 at 7:04 AM, John Gordon wrote: > In <6049bc85-6f8e-429b-a855-ecef47a9d...@googlegroups.com> > subhabangal...@gmail.com writes: > >> Dear Group, > >> I have a tuple of list as, > >> tup_list=[(1,2), (3,4)] >> Now if I want to covert as a simple list, > >> list=[1,2,3,4] > >> ho

Re: Conversion of List of Tuples

2012-12-03 Thread MRAB
On 2012-12-03 20:04, John Gordon wrote: In <6049bc85-6f8e-429b-a855-ecef47a9d...@googlegroups.com> subhabangal...@gmail.com writes: Dear Group, I have a tuple of list as, tup_list=[(1,2), (3,4)] Now if I want to covert as a simple list, list=[1,2,3,4] how may I do that? new_list

Re: Conversion of List of Tuples

2012-12-03 Thread Chris Kaynor
On Mon, Dec 3, 2012 at 11:58 AM, wrote: > Dear Group, > > I have a tuple of list as, > > tup_list=[(1,2), (3,4)] > Now if I want to covert as a simple list, > > list=[1,2,3,4] > > how may I do that? > > If any one can kindly suggest? Googling didn't help much. If you know they are always exactly

Re: Conversion of List of Tuples

2012-12-03 Thread John Gordon
In <6049bc85-6f8e-429b-a855-ecef47a9d...@googlegroups.com> subhabangal...@gmail.com writes: > Dear Group, > I have a tuple of list as, > tup_list=[(1,2), (3,4)] > Now if I want to covert as a simple list, > list=[1,2,3,4] > how may I do that? new_list = [] for t in tup_list: for item in

Conversion of List of Tuples

2012-12-03 Thread subhabangalore
Dear Group, I have a tuple of list as, tup_list=[(1,2), (3,4)] Now if I want to covert as a simple list, list=[1,2,3,4] how may I do that? If any one can kindly suggest? Googling didn't help much. Regards, Subhabrata. -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzling error msg.

2012-12-03 Thread wrw
On Dec 3, 2012, at 1:27 PM, Ian Kelly wrote: > On Mon, Dec 3, 2012 at 10:37 AM, wrote: > if found_0 == True or found_1 == True: > > Not related to your problem, but this line would be more pythonic as: > > if found_0 or found_1: > Thanks Ian - yes, Steven pointed out the same th

Re: Puzzling error msg.

2012-12-03 Thread wrw
On Dec 3, 2012, at 1:12 PM, Steven D'Aprano wrote: > On Mon, 03 Dec 2012 12:37:42 -0500, wrw wrote: > >> So far in my experience with Python, it's error messages have been >> clear, concise, and quite good at fingering my errors. However, the >> message below has me stumped. The routine in qu

Re: Puzzling error msg.

2012-12-03 Thread Ian Kelly
On Mon, Dec 3, 2012 at 10:37 AM, wrote: > if found_0 == True or found_1 == True: > Not related to your problem, but this line would be more pythonic as: if found_0 or found_1: My puzzle two-fold. First: how could that code generate an "index our of > range" error, and second: lin

Re: Puzzling error msg.

2012-12-03 Thread Steven D'Aprano
On Mon, 03 Dec 2012 12:37:42 -0500, wrw wrote: > So far in my experience with Python, it's error messages have been > clear, concise, and quite good at fingering my errors. However, the > message below has me stumped. The routine in question has been running > for weeks with no problems, then ye

Immediate Interview // Direct Client // QNXT Configuration Expert // 6 Months // Nashville, TN

2012-12-03 Thread Aditya
Hi Friends, This is Aditya Kiran Technical Recruiter for XpertTech in Boston, MA. My client is looking to hire a QNXT Configuration Expert for 6+ Months Position. If you available for new opportunities, I would love to speak to you about below mentioned job. Thank you for your time in advance

Puzzling error msg.

2012-12-03 Thread wrw
So far in my experience with Python, it's error messages have been clear, concise, and quite good at fingering my errors. However, the message below has me stumped. The routine in question has been running for weeks with no problems, then yesterday I got the following: Traceback (most recent

Re: List problem

2012-12-03 Thread John Gordon
In <8c0a3ea9-2560-47eb-a9c7-3770e41fe...@googlegroups.com> subhabangal...@gmail.com writes: > Dear Group, > I have a list of the following pattern, > [("''", "''"), ('Eastern', 'NNP'), ('Army', 'NNP'), ('Commander', 'NNP'), (= > 'Lt', 'NNP'), ('Gen', 'NNP'), ('Dalbir', 'NNP'), ('Singh', 'NNP'),

Re: New tutorials

2012-12-03 Thread Mitya Sirenef
On 12/02/2012 09:54 AM, Mitya Sirenef wrote: Hi everyone, I'm making a series of python tutorials and I've just finished the introductory part: http://lightbird.net/larks/intro.html I've just uploaded a new section -- a tictactoe game: I've also u

Re: New tutorials

2012-12-03 Thread Mitya Sirenef
While referencing the python tutorial, you should state how your > tutorial complement the already existing one, possibly which issues > you're trying to fix, or how different your approach is. > Cheers, > JM Thanks for the feedback, I've added the following line to the Intro section: M

Re: Python Noob Question.

2012-12-03 Thread Alexander Blinne
Hello, by having a quick look at their website i found a plugin for CoreTemp which acts as a server and can be asked for status information of the cpu. Now your task is really simple: write a little function or class that opens a network socket, connects to that plugin und asks it for the informat

Re: List problem

2012-12-03 Thread Neil Cerutti
On 2012-12-02, Thomas Bach wrote: > On Sun, Dec 02, 2012 at 04:16:01PM +0100, Lutz Horn wrote: >> >> len([x for x in l if x[1] == 'VBD']) >> > > Another way is > > sum(1 for x in l if x[1] == 'VBD') > > which saves the list creation. To also index them: vbdix = [i for i, a in emumerate(l) if a

Re: Python Noob Question.

2012-12-03 Thread Owatch
On Sunday, December 2, 2012 11:44:05 PM UTC+2, Steven D'Aprano wrote: > On Sun, 02 Dec 2012 12:33:58 -0800, Owatch wrote: > > > > > Sorry, but I was redirected here via a thread on another forum > > > concerning where to find help for Python. (Python-forums.org not working > > > for me) > > >

Re: Is it bad style to override the built-in function `type`?

2012-12-03 Thread Michael Herrmann
Hi Rusi, > Im entering this thread late (was off mail for a week), so pardon me > if someone has already said this -- but have you looked at the > difference between internal and external dsls: > http://martinfowler.com/bliki/DomainSpecificLanguage.html (and links > therein) ? > Roughly speaking

Re: setup.py Choosing Older Compiler On Windows

2012-12-03 Thread Ami Tavory
From: Irmen de Jong >> To: python-list@python.org >> Cc: >> Date: Mon, 03 Dec 2012 01:10:23 +0100 >> Subject: Re: setup.py Choosing Older Compiler On Windows >> On 2-12-2012 22:06, Dave Angel wrote: >> > On 12/02/2012 09:34 AM, Ami Tavory wrote: >> >> Hello, >> >> >> >> I'm porting a C++ exten

Re: New tutorials

2012-12-03 Thread Jean-Michel Pichavant
- Original Message - > Hi everyone, I'm making a series of python tutorials and I've just > finished the introductory part: http://lightbird.net/larks/intro.html > > Feedback is appreciated.. - mitya > > -- > http://mail.python.org/mailman/listinfo/p