Re: [Tutor] SPE - Stani's Python Editor ?

2007-01-03 Thread Mike Hansen
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hengge Sent: Tuesday, January 02, 2007 4:57 PM To: Dick Moores Cc: tutor@python.org Subject: Re: [Tutor] SPE - Stani's Python Editor ? I've recently started playing with Eclipse and the

Re: [Tutor] Tutor Digest, Vol 35, Issue 8

2007-01-03 Thread Tony Cappellini
Take a look at Movable Python. It may not be exactly what you're looking for, but it may turn out to be a resource to leverage from. Message: 1 Date: Tue, 2 Jan 2007 21:14:16 -0500 From: Daniel McQuay [EMAIL PROTECTED] Subject: Re: [Tutor] Starting python from a DOS prompt from any

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-03 Thread Dick Moores
At 10:39 AM 1/2/2007, Kent Johnson wrote: Dick Moores wrote: from decimal import Decimal as D def bestFracForMinimumError(decimal, minimumError): denom = 0 while True: denom += 1 num = round(D(str(decimal)) * D(str(denom))) error = abs(str((str(D(num) /

Re: [Tutor] SPE - Stani's Python Editor ?

2007-01-03 Thread Chris Hengge
Pydev Extensions are only about $40. Most of the plugin's are $50 or less if not free... I'd personally much rather pay for the feature's I want, as I want them, then be forced bloated software (Visual Studio) that will cost hundreds to thousands of dollars, which will still require very

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-03 Thread Terry Carroll
On Wed, 3 Jan 2007, Dick Moores wrote: At 01:17 PM 1/2/2007, Terry Carroll wrote: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52317 Terry, that is truly ingenious. Is there an explication anywhere of exactly how it works? There is in the printed copy of the Python Cookbook.

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-03 Thread Danny Yoo
Dick, if your goal is to have a routine to get the fraction with the least possible error (as opposed to learing how to use Decimal), have a look at this recipe from the Python Cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52317 Terry, that is truly ingenious. Is

[Tutor] Python class at Foothill College

2007-01-03 Thread Elaine
If you would like to learn Python, Foothill College is offering a course starting Wed. evening, 10 January, at the Middlefield campus on the corner of San Antonio and Middlefield Road in south Palo Alto. The course is designed for students who are already familiar with some type of programming.

Re: [Tutor] how do i access object

2007-01-03 Thread Alan Gauld
Ketan Maheshwari [EMAIL PROTECTED] wrote of this class created using a constructor. The constructor essentially creates the circles and the update mathod makes them move randomly. However, at each updation, I want to access each circle to know its coordinates. At the moment I am not able

Re: [Tutor] how do i access object

2007-01-03 Thread Kent Johnson
Ketan Maheshwari wrote: Hi All I have this code from the web that I modified according to y requirements. It has a class called Circle. Then there are a few objects of this class created using a constructor. The constructor essentially creates the circles and the update mathod makes them

[Tutor] Embedding strings in a python script

2007-01-03 Thread Tony Cappellini
I have a number of text files which need to be checked into CVS. Each file needs a special text header/footer in order that CVS can track changes and version numbers. Python to the rescue. I've written a small python program which will write the header/footer to all files in the current

Re: [Tutor] Embedding strings in a python script

2007-01-03 Thread John Fouhy
On 04/01/07, Tony Cappellini [EMAIL PROTECTED] wrote: What I'd like to know, is there a way I can embed/endcode the cvs string above in the python script, so that when that script is modified and checked into cvs, that the cvs header string above will not be modified by cvs? What about this:

[Tutor] how to know if a file exists

2007-01-03 Thread shawn bright
hello there, i am writing an app for linux. what command would be easiest to test and see if a certain file exist ? i was going to do something like this try: file = open('/path/to/file', 'rb') return True except: return False but i thought that there would be an easier way. thanks

Re: [Tutor] how to know if a file exists

2007-01-03 Thread Luke Paireepinart
shawn bright wrote: hello there, i am writing an app for linux. what command would be easiest to test and see if a certain file exist ? i was going to do something like this try: file = open('/path/to/file', 'rb') return True except: return False You should except IOError

Re: [Tutor] how to know if a file exists

2007-01-03 Thread Andre Roberge
On 1/4/07, Luke Paireepinart [EMAIL PROTECTED] wrote: shawn bright wrote: hello there, i am writing an app for linux. what command would be easiest to test and see if a certain file exist ? i was going to do something like this try: file = open('/path/to/file', 'rb') return True

Re: [Tutor] how to know if a file exists

2007-01-03 Thread shawn bright
thanks, luke, Andre. appreciate it a lot shawn On 1/3/07, Andre Roberge [EMAIL PROTECTED] wrote: On 1/4/07, Luke Paireepinart [EMAIL PROTECTED] wrote: shawn bright wrote: hello there, i am writing an app for linux. what command would be easiest to test and see if a certain file

Re: [Tutor] how to know if a file exists

2007-01-03 Thread Danny Yoo
On Thu, 4 Jan 2007, Andre Roberge wrote: i am writing an app for linux. what command would be easiest to test and see if a certain file exist ? i was going to do something like this try: file = open('/path/to/file', 'rb') return True except: return False You should

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-03 Thread Dick Moores
At 01:17 PM 1/2/2007, Terry Carroll wrote: On Mon, 1 Jan 2007, Dick Moores wrote: bestFracForMinimumError() is only a small part of a program I wrote long ago, called frac.py Dick, if your goal is to have a routine to get the fraction with the least possible error (as opposed to learing how