Re: [Tutor] Python assginment

2012-02-21 Thread Steven D'Aprano
On Wed, Feb 22, 2012 at 06:10:57AM +0530, Sukhpreet Sdhu wrote: > hi > i m working on Python assignment to convert roman numericals to arabic and > vice versa.I had tried many different codes but those are not working. > Can you please suggest me the code to do this by using while , if and else >

Re: [Tutor] Recognizing real numbers

2012-02-21 Thread Steven D'Aprano
On Tue, Feb 21, 2012 at 07:00:40PM -0800, Michael Lewis wrote: > It seems that the .isdigit() function that I use doesn't recognize the .5 > as a number and therefore doesn't multiply it. How can I get my code to > recognize numbers such as .5, 1.75 as numbers? As the saying goes, it is often Eas

Re: [Tutor] Pyhton editor

2012-02-21 Thread Steven D'Aprano
On Wed, Feb 22, 2012 at 01:01:50AM +, Alan Gauld wrote: > I seem to recall it was written in Borland's Delphi. > There is FreePascal which is very Delphi like, although not quite a > clone, it might be possible to port it to FreePascal if somebody was > keen enough! There is also GNU Pascal

[Tutor] Reading/dealing/matching with truly huge (ascii) files

2012-02-21 Thread Elaina Ann Hyde
So, Python question of the day: I have 2 files that I could normally just read in with asciitable, The first file is a 12 column 8000 row table that I have read in via asciitable and manipulated. The second file is enormous, has over 50,000 rows and about 20 columns. What I want to do is find th

Re: [Tutor] Pyhton editor

2012-02-21 Thread ken brockman
Pyscripter.. I played with it when I had Windows but it seemed to e tied to a specific version of Python. Has that changed?   *I have no clue which version you had ran it with, I am using it with Python 3.2.2 and it works great. > i love the simply way you

[Tutor] Recognizing real numbers

2012-02-21 Thread Michael Lewis
Hi everyone, I have some code where I import a file to use a module. That module that I import takes text and a multiplier, checks for any numbers in that text and will then multiply those numbers by the given multiplier. The imported module is below. I am getting the text from a file that I have

Re: [Tutor] Python Editor

2012-02-21 Thread cyclicf...@yahoo.com
man/listinfo/tutor -- next part -- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/tutor/attachments/20120221/1bad24e9/attachm ent-0001.html> -- Message: 2 Date: Wed, 22 Feb 2012 10:35:00 +1100 From: Steven D'Apran

Re: [Tutor] Pyhton editor

2012-02-21 Thread Alan Gauld
On 21/02/12 23:29, ken brockman wrote: I concur. Pyscripter , though I've only installed it a few days ago, seems to be one of the better ones. I played with it when I had Windows but it seemed to e tied to a specific version of Python. Has that changed? > i love the simply way you can use

Re: [Tutor] Python assginment

2012-02-21 Thread Dave Angel
On 02/21/2012 07:40 PM, Sukhpreet Sdhu wrote: hi i m working on Python assignment to convert roman numericals to arabic and vice versa.I had tried many different codes but those are not working. Can you please suggest me the code to do this by using while , if and else statements. thanks Sukhpr

Re: [Tutor] how to rewrite area.py

2012-02-21 Thread Alan Gauld
On 21/02/12 23:51, William Stewart wrote: I need to rewrite area.py program so that it has separate functions for the perimeter and area of a square, a rectangle, and a circle (3.14 * radius**2). You will find something similar in my tutorial in the topic Branching. Look under the heading "Pyt

[Tutor] Python assginment

2012-02-21 Thread Sukhpreet Sdhu
hi i m working on Python assignment to convert roman numericals to arabic and vice versa.I had tried many different codes but those are not working. Can you please suggest me the code to do this by using while , if and else statements. thanks Sukhpreet Sidhu___

Re: [Tutor] how to rewrite area.py

2012-02-21 Thread bob gailer
On 2/21/2012 6:51 PM, William Stewart wrote: hello I need to rewrite area.py program so that it has separate functions for the perimeter and area of a square, a rectangle, and a circle (3.14 * radius**2). "Need to"" - why? Is this a homework assignment? I am horrible at math and I cannot ev

Re: [Tutor] how to rewrite area.py

2012-02-21 Thread Steven D'Aprano
William Stewart wrote: hello I need to rewrite area.py program so that it has separate functions for the perimeter and area of a square, a rectangle, and a circle (3.14 * radius**2). I am horrible at math and I cannot even figure out what I need to do for this Any help would be appreciated Ha

Re: [Tutor] how to rewrite area.py

2012-02-21 Thread Dave Angel
On 02/21/2012 06:51 PM, William Stewart wrote: hello I need to rewrite area.py program so that it has separate functions for the perimeter and area of a square, a rectangle, and a circle (3.14 * radius**2). I am horrible at math and I cannot even figure out what I need to do for this Any help wo

[Tutor] how to rewrite area.py

2012-02-21 Thread William Stewart
hello I need to rewrite area.py program so that it has separate functions for the perimeter and area of a square, a rectangle, and a circle (3.14 * radius**2). I am horrible at math and I cannot even figure out what I need to do for this Any help would be appreciated All I have is the menu which

Re: [Tutor] Checking for file completion.

2012-02-21 Thread Steven D'Aprano
Tony Pelletier wrote: Missing a return statement in the case of an exception. Can you explain this? Why would I want the return on the exception? Because if you don't, it will return None. -- Steven ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] Pyhton editor

2012-02-21 Thread ken brockman
From: "Prasad, Ramit" To: "tutor@python.org" Sent: Tuesday, February 21, 2012 10:08 AM Subject: Re: [Tutor] Pyhton editor >>However I stumbled upon PyScripter and I find it really amazing. >Pity it is only for Windows. WINE? Ramit I concur. Pyscripter ,

Re: [Tutor] Checking for file completion.

2012-02-21 Thread Dave Angel
On 02/21/2012 05:20 PM, Tony Pelletier wrote: def getReport(service, reportId): reportIds = service.client.factory.create('ArrayOfstring') reportIds.string.append(reportId) try: result = service.client.service.ReportQueryById(reportIds, 'True')

Re: [Tutor] Checking for file completion.

2012-02-21 Thread Tony Pelletier
>> >> def getReport(service, reportId): >>        reportIds = service.client.factory.create('ArrayOfstring') >>        reportIds.string.append(reportId) >> >>        try: >>                result = service.client.service.ReportQueryById(reportIds, >> 'True') >>                if result.Report[0].Re

[Tutor] chat openssl

2012-02-21 Thread ml
hello guys hello master of python "Fu" hello I just finished a chat with openssl rewrite this for secure connections. my script is it well written? https://github.com/fakessh/openprojectssl/blob/master/pyCHATopenssl.py can you tell me what is wrong built sincerely -- http://pgp.mit.edu:113

Re: [Tutor] Checking for file completion.

2012-02-21 Thread Dave Angel
On 02/21/2012 01:42 PM, Tony Pelletier wrote: Please post your message again, as a text message rather than an html one. Reading non-trivial python code that's lost all its indentation is impossible. You've done it before, but that case was simple enough to not matter much. -- DaveA Sor

Re: [Tutor] Checking for file completion.

2012-02-21 Thread Tony Pelletier
> Please post your message again, as a text message rather than an html one. >  Reading non-trivial python code that's lost all its indentation is > impossible.  You've done it before, but that case was simple enough to not > matter much. > > > > -- > > DaveA > Sorry about that. I actually though

Re: [Tutor] Checking for file completion.

2012-02-21 Thread Dave Angel
On 02/21/2012 01:10 PM, Tony Pelletier wrote: Hi, I'm struggling with what I think seems to be a problem. I've created a program that does numerous SOAP calls. In short, I create a report on a report server, pull that file down then parse that file that's been written locally for data to make

Re: [Tutor] Pyhton editor

2012-02-21 Thread Prasad, Ramit
>>However I stumbled upon PyScripter and I find it really amazing. >Pity it is only for Windows. WINE? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -- This email is confidential and subject to impo

Re: [Tutor] '__name__' == '__main__'

2012-02-21 Thread Alan Gauld
On 21/02/12 04:55, Michael Lewis wrote: I am back to being confused. I just tried running the module without first importing it, and it worked just fine. How do I do this properly to where the module only runs if I import it? Whoooah! That paragraph is so full of ambiguities as to be meaningles

Re: [Tutor] __name__=='__main__'

2012-02-21 Thread Alan Gauld
On 21/02/12 03:07, Michael Lewis wrote: Now that I am better understanding '__name__'=='__main__', > if '__name__' == '__main__': > GetUserInput() Note that __name__ is a variable so it should NOT have quotes around it. What you are doing is comparing two literal strings which are obvious