install excel xlwt in ubuntu 9

2011-03-18 Thread ratna PB
Hey friends i tried a lot to install excel xlwt in ubuntu 9 but failed please help me before i get full fraustrated... -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax Error

2011-03-18 Thread Terry Reedy
On 3/19/2011 1:03 AM, Vlastimil Brom wrote: 2011/3/19 Manatee: I hope this is the place to post this question. Yes. Lesson 1. Report Python version used, as things change. For anything that seems like it might by os/system specific, include that too. Lesson 2. Always include tracebacks when

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread J Peyret
On Mar 18, 6:55 pm, Carl Banks wrote: > On Mar 18, 5:31 pm, J Peyret wrote: > > > If I ever specifically work on an OSS project's codeline, I'll post > > bug reports, but frankly that FF example is a complete turn-off to > > contributing by reporting bugs. > > You probably shouldn't take it so pe

Re: Syntax Error

2011-03-18 Thread Vlastimil Brom
2011/3/19 Manatee : > I hope this is the place to post this question. I am a really new > pythonista. I am studying Tkinter and when I run this basic code, I > get  a syntax error on line 20,  print "hi there, everyone". Its a > simple print line, but I can't see the problem. I am using Python > 2.

Re: Syntax Error

2011-03-18 Thread Thomas L. Shinnick
At 11:39 PM 3/18/2011, Manatee wrote: I hope this is the place to post this question. I am a really new pythonista. I am studying Tkinter and when I run this basic code, I get a syntax error on line 20, print "hi there, everyone". Its a simple print line, but I can't see the problem. I am using

Re: Syntax Error

2011-03-18 Thread xDog Walker
On Friday 2011 March 18 21:39, Manatee wrote: > I hope this is the place to post this question. I am a really new > pythonista. I am studying Tkinter and when I run this basic code, I > get a syntax error on line 20, print "hi there, everyone". Its a > simple print line, but I can't see the probl

Syntax Error

2011-03-18 Thread Manatee
I hope this is the place to post this question. I am a really new pythonista. I am studying Tkinter and when I run this basic code, I get a syntax error on line 20, print "hi there, everyone". Its a simple print line, but I can't see the problem. I am using Python 2.71, gVim for an editor, and a

How to install python xlwt in ubuntu 9

2011-03-18 Thread ratna PB
Hey friends i tried a lot to unstall excel xlwt in ubuntu 9 but failed please help me before i get full fraustrated... -- http://mail.python.org/mailman/listinfo/python-list

Re: Bounds checking

2011-03-18 Thread Terry Reedy
On 3/18/2011 10:24 AM, Martin De Kauwe wrote: def bounds_check(state): """ check state values are> 0 """ for attr in dir(state): if not attr.startswith('__') and getattr(state, attr)< 0.0: print "Error state values< 0: %s" % (attr) dir() has to do a bit a com

Re: class error

2011-03-18 Thread Terry Reedy
On 3/18/2011 5:27 PM, monkeys paw wrote: TypeError: Error when calling the metaclass bases module.__init__() takes at most 2 arguments (3 given) OK, i overlooked that and the error was not very enlightening. A detailed explanation: every module is an instance of a class we will call Module. E

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread Carl Banks
On Mar 18, 5:31 pm, J Peyret wrote: > If I ever specifically work on an OSS project's codeline, I'll post > bug reports, but frankly that FF example is a complete turn-off to > contributing by reporting bugs. You probably shouldn't take it so personally if they don't agree with you. But it's ok,

Re: Reading/Writing files

2011-03-18 Thread Dan Stromberg
On Fri, Mar 18, 2011 at 4:00 PM, Ethan Furman wrote: > Dan Stromberg wrote: > >> >> Are you on windows? >> >> You probably should use / as your directory separator in Python, not \. >> In Python, and most other programming languages, \ starts an escape >> sequence, so to introduce a literal \, y

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread Terry Reedy
On 3/18/2011 5:15 PM, Carl Banks wrote: Multiple people reproduce a Python hang/crash yet it looks like no one bothered to submit a bug report I did not because I did not initially see a problem... I observed the same behavior (2.6 and 3.2 on Linux, hangs) and went ahead and submitted a

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread J Peyret
On Mar 18, 2:15 pm, Carl Banks wrote: > Multiple people reproduce a Python hang/crash yet it looks like no one > bothered to submit a bug report > > I observed the same behavior (2.6 and 3.2 on Linux, hangs) and went > ahead and submitted a bug report. > > Carl Banks Speaking for myself, I'v

SocketServer.BaseRequestHandler has the data, and now?

2011-03-18 Thread ao11
Hello, I wrote a test application to play around with UDP, the receiving part looks like: class proxyServer(SocketServer.ThreadingMixIn, SocketServer.UDPServer): pass class proxyHandler(SocketServer.BaseRequestHandler): def handle(self): data = self.request[0] source =

Re: multiprocessing Pool workers cannot create subprocesses

2011-03-18 Thread Jason Grout
On 3/18/11 3:29 PM, Ned Deily wrote: In article<4d838d28.5090...@creativetrax.com>, Jason Grout wrote: The problem appears to be that multiprocessing sets its workers to have the daemon flag set to True, which prevents workers from creating child processes. If I uncomment the line indicated

Re: Reading/Writing files

2011-03-18 Thread Jon Herman
Wow, Jack, that is one awesome and simple module...thank you so much! I am happily storing and accessing all the arrays I could ever want :) Thanks to all for the quick assistance! On Fri, Mar 18, 2011 at 4:24 PM, Jack Trades wrote: > > On Fri, Mar 18, 2011 at 5:21 PM, Jon Herman wrote: > >>

Re: Bounds checking

2011-03-18 Thread Dan Stromberg
Actually, I'd probably create a class with 3 arguments - an initial value, a lower bound, and an upper bound, give it a _check method, and call _check from the various operator methods. The class would otherwise impersonate an int. In code that isn't performance-critical, it's better to check for

Re: Reading/Writing files

2011-03-18 Thread Westley Martínez
On Fri, 2011-03-18 at 15:18 -0700, Dan Stromberg wrote: > > Are you on windows? > > You shouldn't use / or \ on Windows. You should use os.path.join(). On Windows, when you start mixing / with \\ and spaces things can get hairy and obscure. It's always best to just use os.path.join(). -

Re: Reading/Writing files

2011-03-18 Thread Ethan Furman
Dan Stromberg wrote: Are you on windows? You probably should use / as your directory separator in Python, not \. In Python, and most other programming languages, \ starts an escape sequence, so to introduce a literal \, you either need to prefix your string with r (r"\foo\bar") or double yo

Re: ctypes pointer to structure memory swap

2011-03-18 Thread Nobody
On Fri, 18 Mar 2011 15:16:40 -0700, Wanderer wrote: > Thanks for the reply, but I'm still not sure I understand. Why should > Object1 be at address1 and Object2 be at address2 and the next moment > Object2 is at address1 and Object1 is at address2? I'll try casting > them to see what the value is

Re: Bounds checking

2011-03-18 Thread Martin De Kauwe
> Offhand, my only quibble is that sys.exit is not helpful for debugging.   > Much better to raise an error: > >         if not self.funcTable.get(attribute, lambda x: True)(value): >             raise ValueError ('error out of bound') > > or define a subclass of ValueError just for this purpose.

Re: Bounds checking

2011-03-18 Thread Martin De Kauwe
> Don't check for bounds, fix any bug in the code that would set your > values out of bounds and use asserts while debugging. > whilst that is a nice idea in practice this just is not a practical solution. > Otherwise if you really need dynamic checks, it will cost you cpu, for > sure. Yes I a

Re: Reading/Writing files

2011-03-18 Thread Westley Martínez
On Fri, 2011-03-18 at 15:56 -0600, Jon Herman wrote: > Jack, > > thanks. > > Alright, so what I did is create a file called hello.txt with a single > line of text in there. I then did the following: > > f="fulldirectory\hello.txt" (where fulldirectory is of course the > actual full directory on

Re: Use cookies from a script in a browser

2011-03-18 Thread gervaz
On 18 Mar, 22:52, Miki Tebeka wrote: > You can use mechanize, which holds a cookie jar and can user the browser > cookies as well. I use: opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor()) urllib.request.install_opener(opener) I start scraping from http://page.com/home.ht

Re: Reading/Writing files

2011-03-18 Thread Jack Trades
On Fri, Mar 18, 2011 at 5:21 PM, Jon Herman wrote: > Folks, > > thanks for the many responses! Specifying the full file name (and not using > parentheses when inappropriate, thanks Jack :)) I am now happily > reading/writing files. > > My next question: what is the best way for me to write an arr

Re: Reading/Writing files

2011-03-18 Thread Jon Herman
Folks, thanks for the many responses! Specifying the full file name (and not using parentheses when inappropriate, thanks Jack :)) I am now happily reading/writing files. My next question: what is the best way for me to write an array I generated to a file? And what is the best way for me to load

Re: Reading/Writing files

2011-03-18 Thread Alexander Kapps
On 18.03.2011 22:33, Jon Herman wrote: Hello all, I am pretty new to Python and am trying to write data to a file. However, I seem to be misunderstanding how to do so. For starters, I'm not even sure where Python is looking for these files or storing them. The directories I have added to my PYTH

Re: ctypes pointer to structure memory swap

2011-03-18 Thread Wanderer
On Mar 18, 5:48 pm, Nobody wrote: > On Fri, 18 Mar 2011 10:34:35 -0700, Wanderer wrote: > > I'm observing some strange behavior with ctypes. I created this test > > code to try to figure out what I'm doing wrong creating pointers to > > structures. > > What makes you think that you're doing anythi

Re: Reading/Writing files

2011-03-18 Thread Dan Stromberg
Are you on windows? You probably should use / as your directory separator in Python, not \. In Python, and most other programming languages, \ starts an escape sequence, so to introduce a literal \, you either need to prefix your string with r (r"\foo\bar") or double your backslashes ("\\foo\\bar

Re: Reading/Writing files

2011-03-18 Thread Jack Trades
On Fri, Mar 18, 2011 at 4:59 PM, Jack Trades wrote: > > > On Fri, Mar 18, 2011 at 4:56 PM, Jon Herman wrote: > >> Jack, >> >> thanks. >> >> Alright, so what I did is create a file called hello.txt with a single >> line of text in there. I then did the following: >> >> f="fulldirectory\hello.txt"

Re: Reading/Writing files

2011-03-18 Thread Dan Stromberg
For open() or os.open(), it should look in your Current Working Directory (CWD). Your python's CWD defaults to what the CWD was when python was started, and it is changed with os.chdir(). Absolute paths will of course be relative to / on most OS's (or C:/ if you're on C:, D:/ if you're on D:, etc

Re: Reading/Writing files

2011-03-18 Thread Jack Trades
On Fri, Mar 18, 2011 at 4:56 PM, Jon Herman wrote: > Jack, > > thanks. > > Alright, so what I did is create a file called hello.txt with a single line > of text in there. I then did the following: > > f="fulldirectory\hello.txt" (where fulldirectory is of course the actual > full directory on my

Re: Reading/Writing files

2011-03-18 Thread Jon Herman
Jack, thanks. Alright, so what I did is create a file called hello.txt with a single line of text in there. I then did the following: f="fulldirectory\hello.txt" (where fulldirectory is of course the actual full directory on my computer) open("f", "w") And I get the following error: IOError: [E

Re: Use cookies from a script in a browser

2011-03-18 Thread Miki Tebeka
You can use mechanize, which holds a cookie jar and can user the browser cookies as well. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading/Writing files

2011-03-18 Thread Ethan Furman
Jon Herman wrote: Hello all, I am pretty new to Python and am trying to write data to a file. However, I seem to be misunderstanding how to do so. For starters, I'm not even sure where Python is looking for these files or storing them. The directories I have added to my PYTHONPATH variable (w

Re: Reading/Writing files

2011-03-18 Thread Jack Trades
On Fri, Mar 18, 2011 at 4:33 PM, Jon Herman wrote: > Hello all, > > I am pretty new to Python and am trying to write data to a file. However, I > seem to be misunderstanding how to do so. For starters, I'm not even sure > where Python is looking for these files or storing them. The directories I

Re: Reading/Writing files

2011-03-18 Thread Matt Chaput
On 18/03/2011 5:33 PM, Jon Herman wrote: I am pretty new to Python and am trying to write data to a file. However, I seem to be misunderstanding how to do so. For starters, I'm not even sure where Python is looking for these files or storing them. The directories I have added to my PYTHONPATH var

Use cookies from a script in a browser

2011-03-18 Thread gervaz
Hi all, I use a scraper to retrieve data from a web page. In order to do that I need to enable cookies. The data that I'm looking for is contained in a bunch of web pages. Is there a way to show this web pages in a browser using the cookies used in the script (otherwise it doesn't work). Thanks,

Re: ctypes pointer to structure memory swap

2011-03-18 Thread Nobody
On Fri, 18 Mar 2011 10:34:35 -0700, Wanderer wrote: > I'm observing some strange behavior with ctypes. I created this test > code to try to figure out what I'm doing wrong creating pointers to > structures. What makes you think that you're doing anything wrong. Note that the hex number shown whe

Reading/Writing files

2011-03-18 Thread Jon Herman
Hello all, I am pretty new to Python and am trying to write data to a file. However, I seem to be misunderstanding how to do so. For starters, I'm not even sure where Python is looking for these files or storing them. The directories I have added to my PYTHONPATH variable (where I import modules f

Re: class error

2011-03-18 Thread monkeys paw
On 3/18/2011 4:43 PM, Alexander Kapps wrote: On 18.03.2011 21:13, monkeys paw wrote: I have the following file: FileInfo.py: import UserDict After this import statement, the name "UserDict" refers to the module. class FileInfo(UserDict): Here you are trying to subclass the module. What y

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread Carl Banks
On Mar 18, 2:18 am, Duncan Booth wrote: > Terry Reedy wrote: > > On 3/17/2011 10:00 PM, Terry Reedy wrote: > >> On 3/17/2011 8:24 PM, J Peyret wrote: > >>> This gives a particularly nasty abend in Windows - "Python.exe has > >>> stopped working", rather than a regular exception stack error. I've

Re: class error

2011-03-18 Thread Alexander Kapps
On 18.03.2011 21:13, monkeys paw wrote: I have the following file: FileInfo.py: import UserDict After this import statement, the name "UserDict" refers to the module. class FileInfo(UserDict): Here you are trying to subclass the module. What you need instead is: class FileInfo(UserDict.U

Re: class error

2011-03-18 Thread Ethan Furman
monkeys paw wrote: I have the following file: FileInfo.py: import UserDict class FileInfo(UserDict): "store file metadata" def __init__(self, filename=None): UserDict.__init__(self) self["name"] = filename When i import it like so: import FileInfo i get this error

Re: class error

2011-03-18 Thread MRAB
On 18/03/2011 20:13, monkeys paw wrote: I have the following file: FileInfo.py: import UserDict class FileInfo(UserDict): "store file metadata" def __init__(self, filename=None): UserDict.__init__(self) self["name"] = filename When i import it like so: import FileIn

Re: multiprocessing Pool workers cannot create subprocesses

2011-03-18 Thread Ned Deily
In article <4d838d28.5090...@creativetrax.com>, Jason Grout wrote: > The problem appears to be that multiprocessing sets its workers to have > the daemon flag set to True, which prevents workers from creating child > processes. If I uncomment the line indicated in the code, I can create > chi

class error

2011-03-18 Thread monkeys paw
I have the following file: FileInfo.py: import UserDict class FileInfo(UserDict): "store file metadata" def __init__(self, filename=None): UserDict.__init__(self) self["name"] = filename When i import it like so: import FileInfo i get this e

Re: Could I joined in this Happy family

2011-03-18 Thread Nick Stinemates
Welcome aboard ! On Mar 18, 2011 11:34 AM, "duxiu xiang" wrote: > Dear friends: > I am in China.For some rearon,I cannot visit your Google Group.May > I joint this mail list for help in learning Python? > > -- > 笑看嫣红染半山,逐风万里白云间。 -- http://mail.python.org/mailman/listinfo/python-list

Could I joined in this Happy family

2011-03-18 Thread duxiu xiang
Dear friends: I am in China.For some rearon,I cannot visit your Google Group.May I joint this mail list for help in learning Python? -- 笑看嫣红染半山,逐风万里白云间。 -- http://mail.python.org/mailman/listinfo/python-list

Re: Two random lists from one list

2011-03-18 Thread noydb
Thanks All for your responses, all a help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Bounds checking

2011-03-18 Thread Katie T
On Fri, Mar 18, 2011 at 3:01 PM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > > Don't check for bounds, fix any bug in the code that would set your values > out of bounds and use asserts while debugging. > > Otherwise if you really need dynamic checks, it will cost you cpu, for > sure.

ctypes pointer to structure memory swap

2011-03-18 Thread Wanderer
I'm observing some strange behavior with ctypes. I created this test code to try to figure out what I'm doing wrong creating pointers to structures. from ctypes import * class QCamSettingId(Structure): """ QCam_settings_id """ _fields_ = [("f1", c_ulong), ("f2", c_usho

Re: Bounds checking

2011-03-18 Thread Miki Tebeka
> def bounds_check(state): > """ check state values are > 0 """ > for attr in dir(state): > if not attr.startswith('__') and getattr(state, attr) < 0.0: > print "Error state values < 0: %s" % (attr) > sys.exit() Not that related to the question. But it's usua

multiprocessing Pool workers cannot create subprocesses

2011-03-18 Thread Jason Grout
In a recent application, a student of mine tried to create child processes inside of a multiprocessing Pool worker (for security and convenience reasons, we wanted to run some code inside of a child process). Here is some test code for python 2.7: = import multipro

RE: Remove all directories using wildcard

2011-03-18 Thread Andreas Tawn
> I'm new to python and I am trying to figure out how to remove all sub > directories from a parent directory using a wildcard. For example, > remove all sub directory folders that contain the word "PEMA" from the > parent directory "C:\Data". > > I've trying to use os.walk with glob, but I'm not

Re: Remove all directories using wildcard

2011-03-18 Thread Tim Golden
On 18/03/2011 16:41, JSkinn3 wrote: I'm new to python and I am trying to figure out how to remove all sub directories from a parent directory using a wildcard. For example, remove all sub directory folders that contain the word "PEMA" from the parent directory "C:\Data". I've trying to use os.w

Remove all directories using wildcard

2011-03-18 Thread JSkinn3
I'm new to python and I am trying to figure out how to remove all sub directories from a parent directory using a wildcard. For example, remove all sub directory folders that contain the word "PEMA" from the parent directory "C:\Data". I've trying to use os.walk with glob, but I'm not sure if thi

Re: email library

2011-03-18 Thread Ethan Furman
peterob wrote: Im completely confinvalided from email library. When you parse email from file it creates object Message. f = open(emailFile, 'r') msg = email.message_from_file(f) f.close() How can I access RAW header of email represented by object msg? I dont wanna access each header field by

Re: value of pi and 22/7

2011-03-18 Thread Adam Tauno Williams
On Fri, 2011-03-18 at 14:16 +, Grant Edwards wrote: > On 2011-03-18, peter wrote: > > The Old Testament (1 Kings 7,23) says ... "And he made a molten sea, > > ten cubits from the one brim to the other: it was round all about, and > > his height was five cubits: and a line of thirty cubits did

Re: Bounds checking

2011-03-18 Thread Mel
Jean-Michel Pichavant wrote: > Martin De Kauwe wrote: > Don't check for bounds, fix any bug in the code that would set your > values out of bounds and use asserts while debugging. [ ... ] > def __setattr__(self, attribute, value): >if not self.funcTable.get(attribute, lambda x: True)(v

Re: Bounds checking

2011-03-18 Thread Jean-Michel Pichavant
Martin De Kauwe wrote: Hi, if one has a set of values which should never step outside certain bounds (for example if the values were negative then they wouldn't be physically meaningful) is there a nice way to bounds check? I potentially have 10 or so values I would like to check at the end of e

Re: Bounds checking

2011-03-18 Thread Katie T
What sort of checks are you making ? - in general greater than/less than tend to be fairly optimal, although you might be able to do a faster "is negative" test Katie On Fri, Mar 18, 2011 at 2:24 PM, Martin De Kauwe wrote: > Hi, > > if one has a set of values which should never step outside ce

Re: value of pi and 22/7

2011-03-18 Thread John Gordon
In <8uh0rcfe1...@mid.individual.net> Neil Cerutti writes: > RIIght. What's a cubit? How long can you tread water? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edw

Bounds checking

2011-03-18 Thread Martin De Kauwe
Hi, if one has a set of values which should never step outside certain bounds (for example if the values were negative then they wouldn't be physically meaningful) is there a nice way to bounds check? I potentially have 10 or so values I would like to check at the end of each iteration. However as

Re: value of pi and 22/7

2011-03-18 Thread Kee Nethery
On Mar 18, 2011, at 5:17 AM, Neil Cerutti wrote: > On 2011-03-18, peter wrote: >> The Old Testament (1 Kings 7,23) says ... "And he made a molten >> sea, ten cubits from the one brim to the other: it was round >> all about, and his height was five cubits: and a line of thirty >> cubits did compa

Re: value of pi and 22/7

2011-03-18 Thread Grant Edwards
On 2011-03-18, peter wrote: > The Old Testament (1 Kings 7,23) says ... "And he made a molten sea, > ten cubits from the one brim to the other: it was round all about, and > his height was five cubits: and a line of thirty cubits did compass it > round about. ". So pi=3. End Of. There's nothin

Re: value of pi and 22/7

2011-03-18 Thread Stefan Behnel
Sherm Pendley, 18.03.2011 14:46: Stefan Behnel writes: Neil Cerutti, 18.03.2011 13:17: On 2011-03-18, peter wrote: The Old Testament (1 Kings 7,23) says ... "And he made a molten sea, ten cubits from the one brim to the other: it was round all about, and his height was five cubits: and a li

Re: value of pi and 22/7

2011-03-18 Thread Westley Martínez
On Fri, 2011-03-18 at 02:10 -0700, peter wrote: > On Mar 17, 5:22 pm, Kee Nethery wrote: > > My favorite approximation is: 355/113 (visualize 113355 split into two 113 > > 355 and then do the division). The first 6 decimal places are the same. > > > > 3.141592920353982 = 355/113 > > vs > > 3.141

Re: value of pi and 22/7

2011-03-18 Thread Sherm Pendley
Stefan Behnel writes: > Neil Cerutti, 18.03.2011 13:17: >> On 2011-03-18, peter wrote: >>> The Old Testament (1 Kings 7,23) says ... "And he made a molten >>> sea, ten cubits from the one brim to the other: it was round >>> all about, and his height was five cubits: and a line of thirty >>> cubi

Re: value of pi and 22/7

2011-03-18 Thread Aage Andersen
"peter" Kee Nethery > My favorite approximation is: 355/113 (visualize 113355 split into two 113 355 and then do the division). The first 6 decimal places are the same. > > 3.141592920353982 = 355/113 > vs > 3.1415926535897931 > > Kee Nethery Or (more for fun than any practical application) try

Re: value of pi and 22/7

2011-03-18 Thread Neil Cerutti
On 2011-03-18, Stefan Behnel wrote: > Neil Cerutti, 18.03.2011 13:17: >> On 2011-03-18, peter wrote: >>> The Old Testament (1 Kings 7,23) says ... "And he made a molten >>> sea, ten cubits from the one brim to the other: it was round >>> all about, and his height was five cubits: and a line of th

Re: value of pi and 22/7

2011-03-18 Thread Stefan Behnel
Neil Cerutti, 18.03.2011 13:17: On 2011-03-18, peter wrote: The Old Testament (1 Kings 7,23) says ... "And he made a molten sea, ten cubits from the one brim to the other: it was round all about, and his height was five cubits: and a line of thirty cubits did compass it round about. ". So pi=3

Re: value of pi and 22/7

2011-03-18 Thread Neil Cerutti
On 2011-03-18, peter wrote: > The Old Testament (1 Kings 7,23) says ... "And he made a molten > sea, ten cubits from the one brim to the other: it was round > all about, and his height was five cubits: and a line of thirty > cubits did compass it round about. ". So pi=3. End Of. RIIght. Wh

Re: Multiprocessing.Process Daemonic Behavior

2011-03-18 Thread Anssi Saari
"John L. Stephens" writes: > As the parent process terminates 'normally' (either through normal > termination or SIGINT termination), mulitprocessing steps in and > performs child process cleanup via the x.terminate() method. If the > parent terminates any other way, multiprocessing doesn't have

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread eryksun ()
On Thursday, March 17, 2011 8:24:36 PM UTC-4, J Peyret wrote: > > I suspect that object.__str__ is really object.__repr__ by default, as > they both print out the same string, so that this doesn't make any > sense. They're not the same object, and they don't have all of the same methods. In [1]:

Re: Fitting polynomial curve

2011-03-18 Thread eryksun ()
On 3/17/2011 1:42 AM, Astan Chee wrote: > > I have 2 points in 3D space and a bunch of points in-between them. I'm > trying to fit a polynomial curve on it. Currently I'm looking through > numpy but I don't think the function exists to fit a function like this: > y = ax**4 + bx**3 + cx**2 + dx + e

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread Duncan Booth
Terry Reedy wrote: > On 3/17/2011 10:00 PM, Terry Reedy wrote: >> On 3/17/2011 8:24 PM, J Peyret wrote: >>> This gives a particularly nasty abend in Windows - "Python.exe has >>> stopped working", rather than a regular exception stack error. I've >>> fixed it, after I figured out the cause, which

Re: value of pi and 22/7

2011-03-18 Thread peter
On Mar 17, 5:22 pm, Kee Nethery wrote: > My favorite approximation is: 355/113  (visualize 113355 split into two 113 > 355 and then do the division). The first 6 decimal places are the same. > > 3.141592920353982 = 355/113 > vs > 3.1415926535897931 > > Kee Nethery Or (more for fun than any pract