Re: How to check in CGI if client disconnected

2008-08-24 Thread Graham Dumpleton
On Aug 25, 4:26 pm, Vishal <[EMAIL PROTECTED]> wrote: > Hi, > >   Thanks for the replies. In my case, the cgi is sending a large file > to the client. In case the the stop button is pressed on the browser > to cancel the download, i want to do some cleanup action. It's all one- > way transfer in th

Re: How to check in CGI if client disconnected

2008-08-24 Thread Vishal
Hi, Thanks for the replies. In my case, the cgi is sending a large file to the client. In case the the stop button is pressed on the browser to cancel the download, i want to do some cleanup action. It's all one- way transfer in this case, so i can't expect the client to send anything to me. I r

Re: Interrupt python thread

2008-08-24 Thread Fredrik Lundh
James Matthews wrote: def __stop(self): self.__block.acquire() self.__stopped = True self.__block.notifyAll() self.__block.release() have you tried using that method? what happened? looking at the code, what do you think it does? -- http://mail.python

Re: property() usage - is this as good as it gets?

2008-08-24 Thread castironpi
On Aug 24, 10:41 pm, alex23 <[EMAIL PROTECTED]> wrote: > On Aug 25, 12:42 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > I'm baffled.  I don't understand what you write.   > > Which is pretty much how I feel about -all- of your posts. Alright. You're articulate. I'm getting a better picture of

Re: property() usage - is this as good as it gets?

2008-08-24 Thread alex23
On Aug 25, 3:03 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > May I ask both of you to continue this in private? Certainly. But be warned, I -will- continue posting publicly if I believe someone is misinforming others here, whether it's willful or not. -- http://mail.python.org/mailman/list

Re: Books about Python.

2008-08-24 Thread Peter Anderson
Hi! I am currently working my way through "Python Programming: An introduction to computer science" by John Zelle. Published by Franklin, Beedle & Associates. ISBN: 1-887902-99-6. Book's home page: http://www.fbeedle.com/99-6.html I have a small but quite good Python library and this is the

Re: property() usage - is this as good as it gets?

2008-08-24 Thread Gabriel Genellina
En Mon, 25 Aug 2008 00:41:42 -0300, alex23 <[EMAIL PROTECTED]> escribió: > On Aug 25, 12:42 pm, castironpi <[EMAIL PROTECTED]> wrote: >> I'm baffled.  I don't understand what you write.   > Which is pretty much how I feel about -all- of your posts. May I ask both of you to continue this in privat

Re: Books about Python.

2008-08-24 Thread tshopshire
On Aug 24, 8:32 pm, [EMAIL PROTECTED] wrote: > I'm up to write a 20-30 research paper for my computer science course, > and I was considering choosing to do mine on Python.  I was curious if > anybody knows of any good books about python they could recommend that > have more of a technical view rat

emacs-mode for python, run the interpreter doesnt work

2008-08-24 Thread cnb
how do I run the interpreter In emacs? pythonmode works but I cant start the interpreter. do I need to add it to my load-path? what should I add exactly then? python.exe or pythonw.exe? -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 8: Byte Order Mark (BOM) vs coding cookie

2008-08-24 Thread Terry Reedy
twyk wrote: PEP 8 says ... Files using ASCII (or UTF-8, for Python 3.0) should not have a coding cookie. What about a BOM (Byte Order Mark)? Per Wikipedia ... http://en.wikipedia.org/wiki/Byte-order_mark#endnote_UTF-8) 'In UTF-8, this is not really a "byte order" mark. It identifies the

swig double[], under the gun and need help

2008-08-24 Thread Sells, Fred
I'm using python 2.4 under linux (centos 5.1). I need to pass an array of doubles to a c function but am getting an error, shown near the bottom of this post. my swig interface file looks like this * File: rug520.i */ %module rug520 %include "ty

Python cx_Oracle and Apache

2008-08-24 Thread Raja
Hi, I am trying to write a cgi program which would be executed on browser with Apache server installed. The program would make a connection to a database using cx_Oracle module and display results on page. The code is working fine on the command line but when executing it on the browser i get

Re: property() usage - is this as good as it gets?

2008-08-24 Thread alex23
On Aug 25, 12:42 pm, castironpi <[EMAIL PROTECTED]> wrote: > I'm baffled.  I don't understand what you write.   Which is pretty much how I feel about -all- of your posts. > I think someone in > my shoes would be justified in dismissing it as either malicious or a > miscommunication.   No, it's f

Books about Python.

2008-08-24 Thread cscorley
I'm up to write a 20-30 research paper for my computer science course, and I was considering choosing to do mine on Python. I was curious if anybody knows of any good books about python they could recommend that have more of a technical view rather than a Teach-yourself-in-24-hours type. Thanks -

Re: How to search the Python manuals

2008-08-24 Thread Terry Reedy
BJörn Lindqvist wrote: 2008/8/22 Terry Reedy <[EMAIL PROTECTED]>: [snip] On the left, click [+] for Language Reference (3.0: The Python language reference). "Language Reference (for language lawyers)" Language Lawyer? That's almost as worser than Grammar Nazi, no wonder no one is finding

Re: Date Comparison and Manipulation Functions?

2008-08-24 Thread zuul
check out Pyfdate: http://www.ferg.org/pyfdate from pyfdate import * t = Time().add(hours=14) print "It is now", t.wdt datestring1 = "2005/10/05" #year,month,day datestring2 = "2002/09/22" #year,month,day datestring3 = "2007/11/11" #year,month,day year,month,day = numsplit(datestring1) # split

Re: property() usage - is this as good as it gets?

2008-08-24 Thread castironpi
On Aug 24, 7:43 pm, alex23 <[EMAIL PROTECTED]> wrote: > castironpi <[EMAIL PROTECTED]> wrote: > > Python isn't as clever as you think.  It's a language.   > > Yet another non-sequitur response from you. At which point in my post > did I make any such claims about Python's 'cleverness'? > > > Do you

Re: Python String Immutability Broken!

2008-08-24 Thread Patrick Maupin
On Aug 24, 8:49 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > (a lot of stuff related to using a string with a C library via ctypes) Very entertaining. But let me get this straight: Are you just complaining that if you pass a string to an arbitrary C function using ctypes, that that arb

Re: Hide Console

2008-08-24 Thread alex23
On Aug 25, 10:59 am, Kevin McKinley <[EMAIL PROTECTED]> wrote: > When I use py2exe to convert Python script to executable Windows programs I > always have a black console pop up behind my program.  If i run the script > before i convert it with py2exe it don't have the console because i save the

Hide Console

2008-08-24 Thread Kevin McKinley
When I use py2exe to convert Python script to executable Windows programs I always have a black console pop up behind my program. If i run the script before i convert it with py2exe it don't have the console because i save the script ending with .pyw instead of .py. Is there a way to get rid o

RE: exception handling in complex Python programs

2008-08-24 Thread Delaney, Timothy (Tim)
Lie wrote: > Ah... now I understand what the Zen is talking about when it said: > "Now is better then never, although never is often better than *right* > now." If you don't have all the necessary resources to fix an > exception right now, don't try to fix it, instead let it propagate, > and allow

Re: property() usage - is this as good as it gets?

2008-08-24 Thread alex23
castironpi <[EMAIL PROTECTED]> wrote: > Python isn't as clever as you think.  It's a language.   Yet another non-sequitur response from you. At which point in my post did I make any such claims about Python's 'cleverness'? > Do you want a > link to clever code?   Not if you wrote it or find it c

Re: Best way to set/get an object property

2008-08-24 Thread Steven D'Aprano
On Sun, 24 Aug 2008 12:28:53 +0200, Peter Otten wrote: > Hussein B wrote: > >> I noted that Python encourage the usage of: -- >> obj.prop = data >> x = obj.prop >> -- >> to set/get an object's property value. What if I want to run some logic >> upon setting/getting a property? What is Python pref

Re: What is class method?

2008-08-24 Thread Steven D'Aprano
On Sun, 24 Aug 2008 11:09:46 +0200, Hrvoje Niksic wrote: > Hussein B <[EMAIL PROTECTED]> writes: > >> Hi, >> I'm familiar with static method concept, but what is the class method? >> how it does differ from static method? when to use it? -- >> class M: >> def method(cls, x): >> pass >> >> m

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-24 Thread [EMAIL PROTECTED]
On Aug 23, 10:11 am, Scott David Daniels <[EMAIL PROTECTED]> wrote: > W. eWatson wrote: > > ... > > I'm working on this now, but my knowledge of python needs refreshing. > > Right now I have a file of all the az,el data I've collected, and I'd > > like to open it with Python for XP. However, Python

Re: Interrupt python thread

2008-08-24 Thread James Matthews
def __stop(self): self.__block.acquire() self.__stopped = True self.__block.notifyAll() self.__block.release() On Sun, Aug 24, 2008 at 11:59 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote: > James Matthews wrote: > > Group all the threads in a list and call the st

Re: How to check in CGI if client disconnected

2008-08-24 Thread Gabriel Genellina
En Sun, 24 Aug 2008 17:51:36 -0300, Wojtek Walczak <[EMAIL PROTECTED]> escribió: > On Sun, 24 Aug 2008 17:21:52 -0300, Gabriel Genellina wrote: >>>I am writing a CGI to serve files to the caller. I was wondering if >>> there is any way to tell in my CGI if the client browser is still >>> conne

Re: Python String Immutability Broken!

2008-08-24 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > It is reputed to belong to a programmer who was flayed alive Reminds me of that great old song from "Saturday Night Hacker": Oh, oh, oh, oh. Flaying alive, flaying alive. Oh, oh, oh, oh. Flaying ali-i-i-i-i-ive! -

Python String Immutability Broken!

2008-08-24 Thread Hendrik van Rooyen
South Africa. Sunday 24th August 2008. Our South African correspondent, Waffling Swiftly, reports the discovery of a corpse in the local cyberspace. It is reputed to belong to a programmer who was flayed alive by the C.L.P. group, because he had violated the immutability of a python string. Rum

Re: How to check in CGI if client disconnected

2008-08-24 Thread Wojtek Walczak
On Sun, 24 Aug 2008 17:21:52 -0300, Gabriel Genellina wrote: >>I am writing a CGI to serve files to the caller. I was wondering if >> there is any way to tell in my CGI if the client browser is still >> connected. If it is not, i want to execute some special code before >> exiting. >> >>Is

Re: In-place memory manager, mmap

2008-08-24 Thread castironpi
On Aug 24, 12:19 pm, Kris Kennaway <[EMAIL PROTECTED]> wrote: > castironpi wrote: > > On Aug 24, 9:52 am, Kris Kennaway <[EMAIL PROTECTED]> wrote: > >> castironpi wrote: > >>> Hi, > >>> I've got an "in-place" memory manager that uses a disk-backed memory- > >>> mapped buffer.  Among its possibiliti

Re: semantics of the |= operator

2008-08-24 Thread akva
thanks everybody. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check in CGI if client disconnected

2008-08-24 Thread Gabriel Genellina
En Sun, 24 Aug 2008 14:25:03 -0300, Vishal <[EMAIL PROTECTED]> escribió: >I am writing a CGI to serve files to the caller. I was wondering if > there is any way to tell in my CGI if the client browser is still > connected. If it is not, i want to execute some special code before > exiting. > >

Re: PEP 8: Byte Order Mark (BOM) vs coding cookie

2008-08-24 Thread Marc 'BlackJack' Rintsch
On Sun, 24 Aug 2008 07:28:53 -0700, twyk wrote: > So is it good style to omit the BOM in UTF-8 for Python 3.0? I'd say yes because it is unnecessary with UTF-8 and it messes up the she- bang line of scripts. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python

Re: Imports awareness in Imported modules problem

2008-08-24 Thread Gabriel Genellina
En Sun, 24 Aug 2008 07:34:41 -0300, Mohamed Yousef <[EMAIL PROTECTED]> escribió: > On Sun, Aug 24, 2008 at 9:59 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >> Mohamed Yousef wrote: >> >>> why am i doing this in the first place >>> I'm in the process of a medium project where imports of modules st

hr.rec.kladjenje,rec.pets.cats.anecdotes

2008-08-24 Thread jonnyrocks35
hr.rec.kladjenje,rec.pets.cats.anecdotes -- http://mail.python.org/mailman/listinfo/python-list

Re: Interrupt python thread

2008-08-24 Thread Fredrik Lundh
James Matthews wrote: Group all the threads in a list and call the stop method on all of them. what stop method? -- http://mail.python.org/mailman/listinfo/python-list

Re: Interrupt python thread

2008-08-24 Thread James Matthews
Group all the threads in a list and call the stop method on all of them. On Sun, Aug 24, 2008 at 1:48 AM, BlueBird <[EMAIL PROTECTED]> wrote: > Hi, > > I have a program with a master thread and several slave threads. > > Whenever an exception occurs, in the master thread or in one of the > slave

Re: EOF

2008-08-24 Thread Anjanesh Lekshminarayanan
Thanks for the shutil.copyfileobj. Oddly, the EOFError didnt work though. Gabriel Genellina wrote: En Fri, 22 Aug 2008 16:53:58 -0300, Wojtek Walczak <[EMAIL PROTECTED]> escribió: On Fri, 22 Aug 2008 22:18:37 +0530, Anjanesh Lekshminarayanan wrote: Im trying to download a file from a

How to check in CGI if client disconnected

2008-08-24 Thread Vishal
Hi, I am writing a CGI to serve files to the caller. I was wondering if there is any way to tell in my CGI if the client browser is still connected. If it is not, i want to execute some special code before exiting. Is there any way to do this? Any help on this is appreciated :) Regards, -

Re: In-place memory manager, mmap

2008-08-24 Thread Kris Kennaway
castironpi wrote: On Aug 24, 9:52 am, Kris Kennaway <[EMAIL PROTECTED]> wrote: castironpi wrote: Hi, I've got an "in-place" memory manager that uses a disk-backed memory- mapped buffer. Among its possibilities are: storing variable-length strings and structures for persistence and interprocess

Re: Date Comparison and Manipulation Functions?

2008-08-24 Thread Paul Rudin
"W. eWatson" <[EMAIL PROTECTED]> writes: > Are there some date and time comparison functions that would compare, say, > > Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) > Is 02/11/07 the same as 02/11/07? > > Is 14:05:18 after 22:02:51? (24 hour day is fine) > > How about the dat

Date Comparison and Manipulation Functions?

2008-08-24 Thread W. eWatson
Are there some date and time comparison functions that would compare, say, Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) Is 02/11/07 the same as 02/11/07? Is 14:05:18 after 22:02:51? (24 hour day is fine) How about the date after 02/28/04 is 02/29/04, or the date after 09/30/

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-24 Thread tom
http://matplotlib.sourceforge.net/ I'm using Python 2.4. The install looks pretty complicated for Windows. It doesn't seem like matplotlib is a module. Maybe going with the enthought edition would be easiest for you as it is a very complete set of tools all in one package. It's at http:

Re: IDE

2008-08-24 Thread Fredrik Lundh
krishna wrote: i need link of latest IDE of python(GUI) http://wiki.python.org/moin/IntegratedDevelopmentEnvironments (is google broken today?) -- http://mail.python.org/mailman/listinfo/python-list

IDE

2008-08-24 Thread krishna
i need link of latest IDE of python(GUI) -- http://mail.python.org/mailman/listinfo/python-list

Re: In-place memory manager, mmap (was: Fastest way to store ints and floats on disk)

2008-08-24 Thread Mohamed Yousef
source-forge places no limits and is a very good place (specific project site / releases / usage counters) -- http://mail.python.org/mailman/listinfo/python-list

Re: In-place memory manager, mmap (was: Fastest way to store ints and floats on disk)

2008-08-24 Thread castironpi
On Aug 24, 9:52 am, Kris Kennaway <[EMAIL PROTECTED]> wrote: > castironpi wrote: > > Hi, > > > I've got an "in-place" memory manager that uses a disk-backed memory- > > mapped buffer.  Among its possibilities are: storing variable-length > > strings and structures for persistence and interprocess c

Re: What is class method?

2008-08-24 Thread Medardo Rodriguez (Merchise Group)
On Sun, Aug 24, 2008 at 4:32 AM, Hussein B <[EMAIL PROTECTED]> wrote: > I'm familiar with static method concept, but what is the class method? > how it does differ from static method? when to use it? "Class Methods" are related to the meta-class concept introduced since the first beginning of OOP

Re: recursively change values in list of lists

2008-08-24 Thread mblume
Am Sun, 24 Aug 2008 15:17:46 +0100 schrieb Carson Farmer: > Dear list, > > I'm sure this is a relatively trivial problem, but I have been unable to > find any good examples/explanations on how to do this, so here goes: > > I have multi-polygon object, which is simply a list of polygons, where > e

Re: recursively change values in list of lists

2008-08-24 Thread Maric Michaud
Le Sunday 24 August 2008 16:17:46 Carson Farmer, vous avez écrit : > Dear list, > > I'm sure this is a relatively trivial problem, but I have been unable > to find any good examples/explanations on how to do this, so here > goes: > > I have multi-polygon object, which is simply a list of polygons,

Re: In-place memory manager, mmap (was: Fastest way to store ints and floats on disk)

2008-08-24 Thread Kris Kennaway
castironpi wrote: Hi, I've got an "in-place" memory manager that uses a disk-backed memory- mapped buffer. Among its possibilities are: storing variable-length strings and structures for persistence and interprocess communication with mmap. It allocates segments of a generic buffer by length a

Re: recursively change values in list of lists

2008-08-24 Thread castironpi
On Aug 24, 9:17 am, "Carson Farmer" <[EMAIL PROTECTED]> wrote: > Dear list, > > I'm sure this is a relatively trivial problem, but I have been unable > to find any good examples/explanations on how to do this, so here > goes: > > I have multi-polygon object, which is simply a list of polygons, wher

Re: recursively change values in list of lists

2008-08-24 Thread Medardo Rodriguez (Merchise Group)
On Sun, Aug 24, 2008 at 10:17 AM, Carson Farmer <[EMAIL PROTECTED]> wrote: > So in the end, the only thing that should be changed is the values, > not the lists themselves... clear as mud? > > Any hints, and/or suggestions are greatly appreciated, You gave the solution yourself. I don't know if y

Re: recursively change values in list of lists

2008-08-24 Thread twyk
I see no recursion in the problem as stated. Can a polygon contain another polygon? I can see that if you had ... e_1 = [(0,0),(3,0)] e_2 = [(3,0),(2,3)] e_3 = [(2,3),(0,0)] triangle_1 = [e_1,e_2,e_3] w_1 = [triangle_1,] ... you might want to make a copy of triangle_1 that was offset

Re: What is class method?

2008-08-24 Thread Maric Michaud
Le Sunday 24 August 2008 10:32:34 Hussein B, vous avez écrit : > Hi, > I'm familiar with static method concept, but what is the class method? > how it does differ from static method? when to use it? > -- > class M: > def method(cls, x): > pass > > method = classmethod(method) As it has been

PEP 8: Byte Order Mark (BOM) vs coding cookie

2008-08-24 Thread twyk
PEP 8 says ... Files using ASCII (or UTF-8, for Python 3.0) should not have a coding cookie. What about a BOM (Byte Order Mark)? Per Wikipedia ... http://en.wikipedia.org/wiki/Byte-order_mark#endnote_UTF-8) 'In UTF-8, this is not really a "byte order" mark. It identifies the text as UTF-8 but

Re: ctypes initializer

2008-08-24 Thread castironpi
On Aug 23, 7:11 pm, castironpi <[EMAIL PROTECTED]> wrote: > On Aug 23, 6:43 pm, [EMAIL PROTECTED] wrote: > > > > > castironpi napisa³(a): > > > > Is there a way to initialize a ctypes Structure to point to an offset > > > into a buffer? I don't know if the way I'm doing it is supported. > > > There

Re: Imports visibility in imported modules problem

2008-08-24 Thread Maric Michaud
Le Sunday 24 August 2008 12:11:03 Mohamed Yousef, vous avez écrit : > On Sun, Aug 24, 2008 at 5:54 AM, Patrick Maupin <[EMAIL PROTECTED]> wrote: > > On Aug 23, 7:27 pm, "Mohamed Yousef" <[EMAIL PROTECTED]> wrote: > >> The problem I'm asking about is how can imported modules be aware of > >> other i

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-24 Thread W. eWatson
David wrote: What modules do I need to use pylab? I've installed scipy and numpy. http://matplotlib.sourceforge.net/ I'm using Python 2.4. The install looks pretty complicated for Windows. It doesn't seem like matplotlib is a module. -- Wayne Watson (Watson Adventures, Prop.,

recursively change values in list of lists

2008-08-24 Thread Carson Farmer
Dear list, I'm sure this is a relatively trivial problem, but I have been unable to find any good examples/explanations on how to do this, so here goes: I have multi-polygon object, which is simply a list of polygons, where each polygon is a list of lines, where each line is a list of points. Wha

Re: Best way to set/get an object property

2008-08-24 Thread castironpi
On Aug 24, 5:07 am, Hussein B <[EMAIL PROTECTED]> wrote: > Hey, > I noted that Python encourage the usage of: > -- > obj.prop = data > x = obj.prop > -- > to set/get an object's property value. > What if I want to run some logic upon setting/getting a property? > What is Python preferred method to

Re: What is class method?

2008-08-24 Thread castironpi
On Aug 24, 3:35 am, MeTheGameMakingGuy <[EMAIL PROTECTED]> wrote: > On Aug 24, 6:32 pm, Hussein B <[EMAIL PROTECTED]> wrote: > > > Hi, > > I'm familiar with static method concept, but what is the class method? > > how it does differ from static method? when to use it? > > -- > > class M: > >  def m

Re: property() usage - is this as good as it gets?

2008-08-24 Thread castironpi
On Aug 24, 5:00 am, alex23 <[EMAIL PROTECTED]> wrote: > castironpi <[EMAIL PROTECTED]> wrote: > > and we'll write Python. > > I haven't seen anything you've contributed to this group that would so > far be considered well-written Python. > > Confusing and border-line insane, yes. Pythonic? Not at a

Re: A variables variables

2008-08-24 Thread Maric Michaud
Le Sunday 24 August 2008 03:24:29 Terry Reedy, vous avez écrit : > Gandalf wrote: > > how can I declare a variable with another variable  name? > > > > for example  I will use PHP: > > > > $a= "hello"; > > > > $a_hello="baybay"; > > > > print ${'a_'.$a)  //output: baybay > > > > > > how can i do it

Re: Imports awareness in Imported modules problem

2008-08-24 Thread Fredrik Lundh
Mohamed Yousef wrote: mm , this seems to be logically or another good behind logic . as PHP already uses that convention -from which i thought python also does - I'm not sure arguing with anyone who tries to help you is the best way to learn a new programming language. -- http://mail.pyth

so many model click here

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

gender beutiful clever

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

heavanly place

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

you play football games click here

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

get more info for your bright future

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

get more info for your bright future

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Hai you looking Real Esate Agents India

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

tax is importent life in after we family

2008-08-24 Thread [EMAIL PROTECTED]
http://www.moneymaking4.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-08-24 Thread Martin Gregorie
On Sat, 23 Aug 2008 21:22:05 -0400, John W Kennedy wrote: > Martin Gregorie wrote: >> On Sat, 23 Aug 2008 00:06:28 -0400, John W Kennedy wrote: >> >>> Martin Gregorie wrote: Not necessarily. An awful lot of CPU cycles were used before microcode was introduced. Mainframes and minis desig

Re: Imports awareness in Imported modules problem

2008-08-24 Thread alex23
On Aug 24, 9:43 pm, "Mohamed Yousef" <[EMAIL PROTECTED]> wrote: > but what about module-wide variables what is the approach to them , > will i have to store them in a memory table (SQL) , or keep passing > them between objects - which i really hate - If you have a set of global variables that you

Re: Regex on a huge text

2008-08-24 Thread Paddy
On Aug 22, 9:19 pm, "Medardo Rodriguez" <[EMAIL PROTECTED]> wrote: > On Fri, Aug 22, 2008 at 11:24 AM, Dan <[EMAIL PROTECTED]> wrote: > > I'm looking on how to apply a regex on a pretty huge input text (a file > > that's a couple of gigabytes). I found finditer which would return results > > iterat

Re: Psyco == tracing optimization?

2008-08-24 Thread Banibrata Dutta
Apologies for the inaccurate comment, without completely researching the "Trace trees" logic. Indeed, it is not apparent that Perl or other common languages use it or have used it for long. On 8/24/08, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Banibrata Dutta wrote: > > AFAIK, the same logic us

Re: Newbie question about sending and receiving data to the command prompt.

2008-08-24 Thread Gabriel Genellina
En Fri, 22 Aug 2008 18:25:49 -0300, n00m <[EMAIL PROTECTED]> escribió: > Is it possible to communicate in loop fashion? > > > import subprocess as s > proc = s.Popen('cmd.exe', stdin=s.PIPE, stdout=s.PIPE) > while 1: > cmd = raw_input('cmd:') > res = pr

Re: How to search the Python manuals

2008-08-24 Thread BJörn Lindqvist
2008/8/22 Terry Reedy <[EMAIL PROTECTED]>: [snip] > On the left, click [+] for Language Reference > (3.0: The Python language reference). "Language Reference (for language lawyers)" Language Lawyer? That's almost as worser than Grammar Nazi, no wonder no one is finding anything there. -- mvh

Re: Imports awareness in Imported modules problem

2008-08-24 Thread Mohamed Yousef
On Sun, Aug 24, 2008 at 2:27 PM, alex23 <[EMAIL PROTECTED]> wrote: > On Aug 24, 8:34 pm, "Mohamed Yousef" <[EMAIL PROTECTED]> wrote: >> and sys ,string.. etc add them all twice or four / n times ? >> remove one and then forget to remove one of them in a file and start >> debugging ... this really

Re: Imports awareness in Imported modules problem

2008-08-24 Thread alex23
On Aug 24, 8:34 pm, "Mohamed Yousef" <[EMAIL PROTECTED]> wrote: > and sys  ,string.. etc add them all twice or four / n times ? > remove one and then forget to remove one of them in a file and start > debugging ... this really doesn't look to be a good practice No, having each module contain all o

Re: Best way to set/get an object property

2008-08-24 Thread Hussein B
On Aug 24, 5:28 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Hussein B wrote: > > I noted that Python encourage the usage of: > > -- > > obj.prop = data > > x = obj.prop > > -- > > to set/get an object's property value. > > What if I want to run some logic upon setting/getting a property? > > What

Re: Best way to set/get an object property

2008-08-24 Thread Peter Otten
Hussein B wrote: > I noted that Python encourage the usage of: > -- > obj.prop = data > x = obj.prop > -- > to set/get an object's property value. > What if I want to run some logic upon setting/getting a property? > What is Python preferred method to do so (using the new feature > 'property')? >

Re: Imports awareness in Imported modules problem

2008-08-24 Thread Mohamed Yousef
On Sun, Aug 24, 2008 at 9:59 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Mohamed Yousef wrote: > >> why am i doing this in the first place >> I'm in the process of a medium project where imports of modules start >> to make a jungle and i wanted all needed imports to be in a single >> file (namel

Re: EOF

2008-08-24 Thread Gabriel Genellina
En Fri, 22 Aug 2008 16:53:58 -0300, Wojtek Walczak <[EMAIL PROTECTED]> escribió: > On Fri, 22 Aug 2008 22:18:37 +0530, Anjanesh Lekshminarayanan wrote: > >> Im trying to download a file from a server. But how do I detect EOF ? > > Whenever read() method returns empty string/list. > > >> while f1:

Re: property() usage - is this as good as it gets?

2008-08-24 Thread Raymond Hettinger
On Aug 22, 1:18 pm, David Moss <[EMAIL PROTECTED]> wrote: > It works well enough, but I can't help feeling there a cleaner more > readable way of doing this (with less duplication, etc). > > Is this as good as it gets or can this be refined and improved > especially if I was to add in a couple more

Re: Imports visibility in imported modules problem

2008-08-24 Thread Mohamed Yousef
On Sun, Aug 24, 2008 at 5:54 AM, Patrick Maupin <[EMAIL PROTECTED]> wrote: > On Aug 23, 7:27 pm, "Mohamed Yousef" <[EMAIL PROTECTED]> wrote: > >> The problem I'm asking about is how can imported modules be aware of >> other imported modules so they don't have to re-import them (avoiding >> importin

Best way to set/get an object property

2008-08-24 Thread Hussein B
Hey, I noted that Python encourage the usage of: -- obj.prop = data x = obj.prop -- to set/get an object's property value. What if I want to run some logic upon setting/getting a property? What is Python preferred method to do so (using the new feature 'property')? I don't think __getattr__ and __s

Re: property() usage - is this as good as it gets?

2008-08-24 Thread alex23
castironpi <[EMAIL PROTECTED]> wrote: > and we'll write Python. I haven't seen anything you've contributed to this group that would so far be considered well-written Python. Confusing and border-line insane, yes. Pythonic? Not at all. Here's a tip: try actually developing some real-world applica

Re: No method overloading

2008-08-24 Thread alex23
On Aug 24, 6:15 pm, Hussein B <[EMAIL PROTECTED]> wrote: > Please correct me if I'm wrong but Python doesn't support method > overload, right? Guido once wrote an article on rolling your own: http://www.artima.com/weblogs/viewpost.jsp?thread=101605 -- http://mail.python.org/mailman/listinfo/pyth

Re: Psyco == tracing optimization?

2008-08-24 Thread Paddy
On Aug 24, 8:11 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Banibrata Dutta wrote: > > AFAIK, the same logic used in runtime optimization of several other > > dynamic languages or shell-scripting languages (including Perl), for > > quite a while. > > Trace trees are widely used?  Got any referen

Re: What is class method?

2008-08-24 Thread Hrvoje Niksic
Hussein B <[EMAIL PROTECTED]> writes: > Hi, > I'm familiar with static method concept, but what is the class method? > how it does differ from static method? when to use it? > -- > class M: > def method(cls, x): > pass > > method = classmethod(method) Use it when your method needs to know w

Interrupt python thread

2008-08-24 Thread BlueBird
Hi, I have a program with a master thread and several slave threads. Whenever an exception occurs, in the master thread or in one of the slave threads, I would like to interrupt all the threads and the main program. Threading API does not seem to provide a way to stop a thread, is there anyway to

Re: What is class method?

2008-08-24 Thread MeTheGameMakingGuy
On Aug 24, 6:32 pm, Hussein B <[EMAIL PROTECTED]> wrote: > Hi, > I'm familiar with static method concept, but what is the class method? > how it does differ from static method? when to use it? > -- > class M: >  def method(cls, x): >     pass > >  method = classmethod(method) > -- > Thank you for y

What is class method?

2008-08-24 Thread Hussein B
Hi, I'm familiar with static method concept, but what is the class method? how it does differ from static method? when to use it? -- class M: def method(cls, x): pass method = classmethod(method) -- Thank you for your time. -- http://mail.python.org/mailman/listinfo/python-list

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-24 Thread David
What modules do I need to use pylab? I've installed scipy and numpy. http://matplotlib.sourceforge.net/ -- Have Fun, David A. Powered by Gentoo GNU/LINUX http://www.linuxcrazy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: No method overloading

2008-08-24 Thread Fredrik Lundh
Hussein B wrote: Please correct me if I'm wrong but Python doesn't support method overload, right? -- def method(self): #code def method(self, data): #code -- The last declaration of method() erase the previous one (like JavaScript). in Python, methods are callable attributes, and an attribu

Re: No method overloading

2008-08-24 Thread MeTheGameMakingGuy
On Aug 24, 6:15 pm, Hussein B <[EMAIL PROTECTED]> wrote: > Hey, > Please correct me if I'm wrong but Python doesn't support method > overload, right? > -- > def method(self): >  #code > def method(self, data): >  #code > -- > The last declaration of method() erase the previous one (like > JavaScrip

No method overloading

2008-08-24 Thread Hussein B
Hey, Please correct me if I'm wrong but Python doesn't support method overload, right? -- def method(self): #code def method(self, data): #code -- The last declaration of method() erase the previous one (like JavaScript). Thanks. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >