Re: [Tutor] The '45' bug in round()

2007-03-19 Thread andrew clarke
On Mon, Mar 19, 2007 at 03:04:03AM -0700, Dick Moores wrote: > Yesterday I was shocked, SHOCKED, to discover that round() is > occasionally rounding incorrectly. For example, "Garbage In, Garbage Out" :-) Floating point numbers in Python (and other computer languages) are only an approximation:

Re: [Tutor] [tutor] ipconfig

2006-08-10 Thread andrew clarke
On Thu, Aug 10, 2006 at 04:47:43PM +0300, [EMAIL PROTECTED] wrote: > is there in python an independent from the system way to obtain the IP >>> import socket >>> hostname = socket.gethostname() >>> ip = socket.gethostbyname(hostname) >>> print ip 192.168.1.10 _

Re: [Tutor] IDE for Python

2006-07-25 Thread andrew clarke
On Tue, Jul 25, 2006 at 08:34:39PM +0530, Basavaraj SP. wrote: > I am new to Python. > > I want to know which IDE I should use for programming. > > If so from where can I get it? ActivePython is a good start: http://www.activestate.com/Products/ActivePython/ ___

Re: [Tutor] I am not really convinced using Python...

2006-07-25 Thread andrew clarke
On Tue, Jul 25, 2006 at 05:14:35PM +0200, Rob Sinclar wrote: > Yep Python is an interpreted language. In other words every python app needs > the python interpreter to be able to run. I'm not sure, but I don't think there's anything particular about the language that says it should be interprete

Re: [Tutor] Using python to create and save a Ms Word file

2006-07-20 Thread andrew clarke
On Thu, Jul 20, 2006 at 01:25:26PM -0400, Andrew Robert wrote: > I have a text file being broadcast on a web site and I would like to download > it > and save it as an MS Word file. ... > I found the following code on the web that comes close to what i need. > > It: > > - - reads a file pass

Re: [Tutor] ASCII

2006-03-30 Thread andrew clarke
On Wed, Mar 29, 2006 at 01:51:30PM +0530, Kaushal Shriyan wrote: > > How do i use this ASCII values in my day to day activities, I am going > > through learning python, > > Its a very general question not related to python at all, I have a > minimum knowledge in ASCII just wanted to know how it i

Re: [Tutor] How to monitor streaming data from the internet via modem?

2006-03-09 Thread andrew clarke
On Thu, Mar 09, 2006 at 12:57:53PM +, Ben Vinger wrote: > On 3/8/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > > > Ethereal is one well known and powerful one, but there are others > > which may be simpler to use. > > Yes, with Ethereal comes a command-line version called tethereal, which I've

Re: [Tutor] Python interpreter/Xemacs and the py-execute-buffer

2006-03-09 Thread andrew clarke
On Wed, Mar 08, 2006 at 11:46:37PM -0800, Francesco Queirolo wrote: > I have been using Xemacs 21.4 Patch 13 on Windows XP with Python 2.4.2 > (final). Whenever I try to run a script inside the xemacs window using: > C-c C-c I get the following: Opening output file: Invalid argument, > C:\Document

Re: [Tutor] how to write a string into a specific line in a file

2006-03-08 Thread andrew clarke
On Tue, Mar 07, 2006 at 11:18:27AM -, Alan Gauld wrote: > > I was wondering if it is possible to write a string to a specific line > > in a file without reading in the whole file in as the below. > > Some languages, such as COBOL and some BASICs etc support > random access files, unfortunate

Re: [Tutor] saving .csv file as an xl worksheet

2006-03-06 Thread andrew clarke
On Mon, Mar 06, 2006 at 02:46:36PM +0530, arun wrote: > Can i save a file with a desired extension?? > for ex: I have a .csv file (test.csv) and i want to save this file as > test.xls from a python script. Just changing the file extension from .csv to .xls won't change the file format. OpenOf

Re: [Tutor] Iron Python

2006-03-04 Thread andrew clarke
On Sat, Mar 04, 2006 at 12:21:56AM -0800, ryan luna wrote: > Hello, i have a question about Iron Python, what exactly does it do? > i know its something about .net but i still dont understand exactly > what it does, To use it do you still write your scripts in the Python > IDLE, or what 0-o, It's