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 an

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 dire

[Tutor] Question regarding parsing HTML with BeautifulSoup

2007-01-03 Thread Shuai Jiang (Runiteking1)
Hello, I'm working on a program that need to parse a financial document on the internet using BeautifulSoup. Because of the nature of the information, it is all grouped as a table. I needed to get 3 types of info and have succeeded quite well using BeautifulSoup, but encountered problems on the t

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((s

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 lear

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 expensive

[Tutor] how do i access object

2007-01-03 Thread Ketan Maheshwari
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 move randomly. However, at eac

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 Coo

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 ingenio

[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. Her

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 no

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 th

Re: [Tutor] Question regarding parsing HTML with BeautifulSoup

2007-01-03 Thread Kent Johnson
Shuai Jiang (Runiteking1) wrote: > Hello, > > I'm working on a program that need to parse a financial document on the > internet > using BeautifulSoup. Because of the nature of the information, it is all > grouped > as a table. I needed to get 3 types of info and have succeeded quite > well usi

[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 director

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 thi

[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 IOE

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') > retu

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 certai

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: >> > re

[Tutor] Find and test a device by MAC address

2007-01-03 Thread János Juhász
Dear All, I got a device that uses DHCP on my network, I know just the MAC address of it. Is it possible to find out (not from the DHCP server), what IP address is given for it ? I just mean something like ping_by_MAC 00-19-E7-5C-D4-28 Yours sincerely, __ Janos J

Re: [Tutor] Embedding strings in a python script

2007-01-03 Thread Tony Cappellini
Message: 5 Date: Thu, 4 Jan 2007 16:13:51 +1300 From: "John Fouhy" <[EMAIL PROTECTED]> Subject: Re: [Tutor] Embedding strings in a python script To: tutor-python Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 04/01/07, Tony Cappellini <[EMAIL

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 lear