Re: is there enough information?

2008-02-26 Thread Gabriel Genellina
En Wed, 27 Feb 2008 00:50:19 -0200, <[EMAIL PROTECTED]> escribió: > On Feb 26, 8:31 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Tue, 26 Feb 2008 15:49:00 -0200, <[EMAIL PROTECTED]> escribió: >> >> > I'm not quite sure a semaphore is exactly the synchronization object >> > I'm lookin

Re: How to pass shell variable to shell script from python

2008-02-26 Thread Rockins Chen
Clearly, I made some typing mistake, it's the shbang line! it should be: #!/usr/bin/python then, just set os.environ is okay: os.environ["target"] = "localhost.localdomain.org" according python's documentation, setting os.environ will implicitly call os.putenv(). 2008/2/27, Rockins Chen <[EMAIL

Re: is there enough information?

2008-02-26 Thread Paul McGuire
On Feb 26, 8:50 pm, [EMAIL PROTECTED] wrote: > > Doesn't Queue.Queue operate by side effect? Are you sure you aren't a Turing testbot? What does that question even *mean*? Wait! Don't bother answering, I'm already bored with this thread. I agree with Gabriel. Instead of randomly sprinkling lock

Re: Documentation - which format

2008-02-26 Thread Ben Finney
Jumping Arne <[EMAIL PROTECTED]> writes: > On Wed, 27 Feb 2008 05:51:11 +0100, Ben Finney wrote > (in article <[EMAIL PROTECTED]>): > > > Your needs are met amply with reStructuredText. It's still under > > active development > > is http://docutils.sourceforge.net/ still the official site (I > d

Hyphenation module PyHyphen-0.4 released - good news for Windows users

2008-02-26 Thread Dr. leo
Thank you very much for your interest, helpful comments and suggestions. Two of you have even sent me .pyd files one of which (arguably compiled with MSVC 2003) is contained in version 0.4 for manual installation. This has spared me the hazzle to install cygwin etc. I have made the following chang

Re: Unknown locale error for Malayalam language in Python

2008-02-26 Thread Terry Reedy
"maxinbjohn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Dear friends, | | I am a Python programmer from Kerala, India. When I tried to run a | simple python program which uses the Malayalam language (ml), | | import os | import locale | os.environ['LANG']='ml' | print locale.ge

Re: Unknown locale error for Malayalam language in Python

2008-02-26 Thread Jeroen Ruigrok van der Werven
-On [20080227 06:03], maxinbjohn ([EMAIL PROTECTED]) wrote: >ValueError: unknown locale: ml This is highly dependent on the operating system you are on. Last I remember Debian, for example, required a locale package. FreeBSD already has all locales installed, your mileage may vary. Try ls /usr/sh

How to pass shell variable to shell script from python

2008-02-26 Thread Rockins Chen
Hi all, I encountered a problem: I have a python script, let's just name it caller.py, It calls a shell script, which is named callee.sh. In callee.sh, it need a shell variable $target, which should be supplied by caller.py(cannot pass by argument). I try to use os.environ to do this, as follows:

Re: Documentation - which format

2008-02-26 Thread Jumping Arne
On Wed, 27 Feb 2008 05:51:11 +0100, Ben Finney wrote (in article <[EMAIL PROTECTED]>): > Your needs are met amply with reStructuredText. It's still under > active development is http://docutils.sourceforge.net/ still the official site (I didn't find anything else) -- http://mail.python.org/mai

Re: bribery tax-deductible in Netherlands?

2008-02-26 Thread castironpi
> > Netherlands - 2006 Investment Climate Statement - The Netherlands > >         This has NOTHING to do with comp.lang.python, and posts such as this > are the signs of spammers and trolls, and will rapidly lead to one being > kill-filed. Biography Van Rossum was born and grew up in the Netherlan

Re: time.time() strangeness

2008-02-26 Thread Gabriel Genellina
En Tue, 26 Feb 2008 17:37:22 -0200, Nitro <[EMAIL PROTECTED]> escribió: > today I encountered a very odd situation. I am on Windows Vista and using > Python 2.5.2. Here's a code snippet to illustrate my problem: > > # uncomment the next line to trigger the problem > # myExtensionModule.CreateDirec

How, python with Tk extensions enabled to import Tkinter

2008-02-26 Thread Murat Gunduz
Dear list member, I am using a Linux machine (Fedora Core 7, 64 bit): Linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64 I tried to compile a software (ncvtk) with the simple command below % python setup.py install ERROR: could not import Tkinter. You need python with Tk exten

Re: __getattribute__ meta class?

2008-02-26 Thread bambam
Thank you both. If I understand correctly, I have two new ways to creating my new classes: class _Communicate(commandset2.CommandSet_Communicate): __metaclass__ = My_meta or _Communicate = create_wrapper_class |('_Communicate',commandset2.CommandSet_Communicate) and also two new ways to ch

Re: How about adding rational fraction to Python?

2008-02-26 Thread Paul Rubin
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > They exist since this semantic change was introduced *seven* *years* > ago, in 2001, so it's not that suddenly the Python world is going to > be upside down... I can't believe how long this thread is by now... I don't think it's a sudden uproar a

Re: How about adding rational fraction to Python?

2008-02-26 Thread Paul Rubin
Mark Dickinson <[EMAIL PROTECTED]> writes: > > So use:  return sum(number_list) / float(len(number_list)) > > That makes it somewhat more explicit what you want.  Otherwise > > But that fails for a list of Decimals... Again, that depends on what your application considers to be failure. Heck, int

Re: How about adding rational fraction to Python?

2008-02-26 Thread Gabriel Genellina
En Wed, 27 Feb 2008 00:39:09 -0200, Mark Dickinson <[EMAIL PROTECTED]> escribió: > On Feb 26, 9:00 pm, Paul Rubin wrote: >> Certainly, I'd expect that if x and y are both integers and x is an >> exact multiple of y, then x/y will be computable and not overflow. >> But t

Re: How about adding rational fraction to Python?

2008-02-26 Thread Mark Dickinson
On Feb 26, 11:55 pm, Paul Rubin wrote: > So use:  return sum(number_list) / float(len(number_list)) > That makes it somewhat more explicit what you want.  Otherwise But that fails for a list of Decimals... Mark -- http://mail.python.org/mailman/listinfo/python-list

library

2008-02-26 Thread Raj kumar
hi, how to open python api documetation in linux machine? i think there should be a way to open installed library as a HTML pages. Thanks in advance. Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/ -- http://mail.py

Re: network programming: how does s.accept() work?

2008-02-26 Thread Micah Cowan
Gabriel Genellina wrote: > En Tue, 26 Feb 2008 07:53:24 -0200, 7stud <[EMAIL PROTECTED]> > escribió: > >> --- >> When you surf the Web, say to http://www.google.com, your Web browser >> is a client. The program you contact at Google is a server. When a >> server is run, it sets up business at a ce

Re: network programming: how does s.accept() work?

2008-02-26 Thread Micah Cowan
Grant Edwards wrote: > On 2008-02-26, Micah Cowan <[EMAIL PROTECTED]> wrote: > >> 7stud, what you seem to be missing, and what I'm not sure if anyone has >> clarified for you (I have only skimmed the thread), is that in TCP, >> connections are uniquely identified by a /pair/ of sockets (where >> "

Unknown locale error for Malayalam language in Python

2008-02-26 Thread maxinbjohn
Dear friends, I am a Python programmer from Kerala, India. When I tried to run a simple python program which uses the Malayalam language (ml), import os import locale os.environ['LANG']='ml' print locale.getdefaultlocale() It throws the following error : Traceback (most recent call last): F

Re: How about adding rational fraction to Python?

2008-02-26 Thread Paul Rubin
Mark Dickinson <[EMAIL PROTECTED]> writes: > def mean(number_list): > return sum(number_list)/len(number_list) > > If you pass a list of floats, complex numbers, Fractions, or Decimal > instances to mean() then it'll work just fine. But if you pass > a list of ints or longs, it'll silently r

Re: Documentation - which format

2008-02-26 Thread Ben Finney
Jumping Arne <[EMAIL PROTECTED]> writes: > I'm considering using plain text file for documenting certain things > (nothing to do with Python) and I'm looking at different "formatting > systems" ... preferable with a python implementation to render the > text at least as HTML - preferable also othe

Re: How about adding rational fraction to Python?

2008-02-26 Thread Jeff Schwab
Mark Dickinson wrote: > On Feb 26, 9:00 pm, Paul Rubin wrote: >> Certainly, I'd expect that if x and y are both integers and x is an >> exact multiple of y, then x/y will be computable and not overflow. >> But try computing 10**5000 / 10**4000 under future division (that

Re: How about adding rational fraction to Python?

2008-02-26 Thread Gabriel Genellina
En Tue, 26 Feb 2008 15:01:57 -0200, Jeff Schwab <[EMAIL PROTECTED]> escribió: > J. Cliff Dyer wrote: >> Of course. That's why I think you ought to spell it 3//4. Nobody gets >> confused when a strange operator that they've never seen before does >> something unusual. Average Jo off the street

Re: is there enough information?

2008-02-26 Thread castironpi
On Feb 26, 2:17 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 26 Feb 2008 10:39:04 -0800 (PST), [EMAIL PROTECTED] declaimed > the following in comp.lang.python: > > The relevant snippet is: > > > def thloop( thd ): > >     while thd.cont: > >         with thd.step[1]: > >             i

Re: is there enough information?

2008-02-26 Thread castironpi
On Feb 26, 4:15 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Feb 26, 12:42 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > ... > > th1       th2 > > set cmd > >           run cmd > > get result > >           acknowledge > > continue  continue > >

Re: dict.get and str.xsplit

2008-02-26 Thread Gabriel Genellina
En Tue, 26 Feb 2008 12:33:01 -0200, <[EMAIL PROTECTED]> escribió: > On Feb 26, 8:14 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> I guess it's the method lookup that's the slow part.  Factor it out of >> the >> loop and measure again:: >> >>     adict_get = adict.get >>     for _ in

Re: How about adding rational fraction to Python?

2008-02-26 Thread Mark Dickinson
On Feb 26, 4:59 pm, Ross Ridge <[EMAIL PROTECTED]> wrote: > No, the discussion has been about the behaviour of the division operator > in Python when used with Python's integral and floating-point data types. > These data types include many numbers that are not natural numbers. I'm surprised that

Re: Fwd: Problem with threads in python????????

2008-02-26 Thread castironpi
On Feb 26, 7:56 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 26 Feb 2008 01:46:48 -0200, Manikandan R <[EMAIL PROTECTED]>   > escribió: > > > Hai, > > >           Is it possible to share a single variable between multiple > > threads. For eg: > > > Class A: > >          thread_init(

Re: along the lines, hash and obj. id.

2008-02-26 Thread castironpi
On Feb 26, 1:11 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 25 Feb 2008 23:58:52 -0800 (PST), [EMAIL PROTECTED] declaimed > the following in comp.lang.python: > > > The generic solution involves a second level of indirection: tuple* d= > > &obj.a.  I can't land a clean solution to it

Re: is there enough information?

2008-02-26 Thread castironpi
On Feb 26, 8:31 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 26 Feb 2008 15:49:00 -0200, <[EMAIL PROTECTED]> escribió: > > > I'm not quite sure a semaphore is exactly the synchronization object > > I'm looking for, but I'm a little new to concurrency myself. > > The easiest way to i

Re: network programming: how does s.accept() work?

2008-02-26 Thread Gabriel Genellina
En Tue, 26 Feb 2008 07:53:24 -0200, 7stud <[EMAIL PROTECTED]> escribió: > --- > When you surf the Web, say to http://www.google.com, your Web browser > is a client. The program you contact at Google is a server. When a > server is run, it sets up business at a certain port, say 80 in the > Web c

Re: How about adding rational fraction to Python?

2008-02-26 Thread Mark Dickinson
On Feb 26, 9:00 pm, Paul Rubin wrote: > Certainly, I'd expect that if x and y are both integers and x is an > exact multiple of y, then x/y will be computable and not overflow. > But try computing 10**5000 / 10**4000 under future division (that is > supposed to give a flo

Re: is there enough information?

2008-02-26 Thread Gabriel Genellina
En Tue, 26 Feb 2008 15:49:00 -0200, <[EMAIL PROTECTED]> escribió: > I'm not quite sure a semaphore is exactly the synchronization object > I'm looking for, but I'm a little new to concurrency myself. The easiest way to implement a producer-consumer model in Python, is using a Queue.Queue object

Re: How about adding rational fraction to Python?

2008-02-26 Thread Grant Edwards
On 2008-02-27, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > But I don't think that *was* the issue in the first place. The > issue is whether python's division should only yield integers > when given integer inputs. "Natural" is a polemical term no > matter who is using it in this argument, so l

Re: network programming: how does s.accept() work?

2008-02-26 Thread Roy Smith
In article <[EMAIL PROTECTED]>, 7stud <[EMAIL PROTECTED]> wrote: > If two sockets are bound to the same host and port on the server, how > does data sent by the client get routed? Can both sockets recv() the > data? Undefined. You certainly won't find the answer in the RFCs which define the p

Re: How about adding rational fraction to Python?

2008-02-26 Thread Paul Rubin
"J. Clifford Dyer" <[EMAIL PROTECTED]> writes: > If the issue is that it should > remain an integer because that mimics how the computer works, than I > think it is worth pointing out that allowing a conversion to a long also > goes against how the computer works; the computer would have a register

Re: time.time() strangeness

2008-02-26 Thread Roel Schroeven
Nitro schreef: >> Nevertheless time.time() shouldn't fail here unless DirectX is really >> badly tinkering with my system. > > I can tell you more now. If I pass D3DCREATE_FPU_PRESERVE while creating > the DirectX device the bug does not appear. This flag means "Direct3D > defaults to single

Re: Fwd: Problem with threads in python????????

2008-02-26 Thread Gabriel Genellina
En Tue, 26 Feb 2008 01:46:48 -0200, Manikandan R <[EMAIL PROTECTED]> escribió: > Hai, > > Is it possible to share a single variable between multiple > threads. For eg: > > Class A: > thread_init() > >def run(): > fun1() > > def fun(): > assume s

RE: European python developers

2008-02-26 Thread jerry
Hi Terry, Thank you for taking the time to respond. I enjoyed 7 weeks in Barcelona two springs ago, but I think I would pick a different city to live. Yes, I am talking about relocating full or part-time for myself, but a small fulltime location. Thanks, Jerry -Original Message- From: T

Re: How about adding rational fraction to Python?

2008-02-26 Thread J. Clifford Dyer
On Tue, 2008-02-26 at 14:08 -0800, Jeff Schwab wrote: > J. Cliff Dyer wrote: > > On Tue, 2008-02-26 at 13:51 -0500, D'Arcy J.M. Cain wrote: > >> On Tue, 26 Feb 2008 13:39:38 -0500 > >> "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > >> a = 2 * 2 > >> b = 20 * 20 > >> type(a

Re: reg - timer........

2008-02-26 Thread Gabriel Genellina
En Fri, 22 Feb 2008 04:11:56 -0200, Manikandan R <[EMAIL PROTECTED]> escribió: > url = 'http:\\username:[EMAIL PROTECTED]' > urllib.urlopen(url) > >It opens fine when its correct web page else it hangs there > So I > have planned to start a timer when i launch the

Re: Indentation and optional delimiters

2008-02-26 Thread castironpi
On Feb 26, 5:22 pm, [EMAIL PROTECTED] wrote: > Steven D'Aprano: > > > Usability for beginners is a good thing, but not at the expense of > > teaching them the right way to do things. Insisting on explicit requests > > before copying data is a *good* thing. If it's a gotcha for newbies, > > that's j

Re: European python developers

2008-02-26 Thread Terry Jones
Hi Jerry > I am hoping one or two members of this list might help me locate in Europe Do you mean you want to re-locate here or that you're trying to locate (i.e., find) people already here? > My personal first choice is Spain I'm in Barcelona (but not looking for work!). There are a couple of

Portable linux python install

2008-02-26 Thread Mike M
Hello, I've been digging around the list archives and I haven't found a good answer to this, so I was hoping someone on this list could help me out. Here's my conundrum: I have a python application which I'd like to distribute to thousands of machines in our server farm. The good news is, all o

Re: Odd behaviour of *.pth files and Apache

2008-02-26 Thread Gabriel Genellina
En Tue, 26 Feb 2008 11:44:48 -0200, D'Arcy J.M. Cain <[EMAIL PROTECTED]> escribió: > On Tue, 26 Feb 2008 03:01:33 -0200 > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >> En Sat, 23 Feb 2008 12:52:45 -0200, D'Arcy J.M. Cain <[EMAIL PROTECTED]> >> escribió: >> > I have more information now. It

European python developers

2008-02-26 Thread jerry
Hi Python Enthusiasts, I am hoping one or two members of this list might help me locate in Europe to begin a small team of developers with a focus on python for the central part of the server development. My personal first choice is Spain only because I like it, and will eventually have Spanish

Python refuses to import SVN

2008-02-26 Thread Tomas
Dear group. I have some big problems getting python to work with svn. Python SVN and SWIG is compiled from source. I have been testing Python 2.5.1 and 2.4.4 together with SWIG 1.3.25 and 1.3.33 and SVN 1.4.5 and 1.4.6 All combinations creates the same problem: [EMAIL PROTECTED] libsvn]# python P

Re: Question about PyPI and 'easy_install'

2008-02-26 Thread makoto kuwata
On 2008-02-26, Vsevolod Balashov <[EMAIL PROTECTED]> wrote: > > I`m think this patch is helpful for you > > ---BEGIN PATCH--- > > --- setup.py.orig       2007-10-23 03:54:18.0 +0400 > +++ setup.py    2008-02-26 14:08:44.66000 +0300 > @@ -6,12 +6,10 @@ > >  import sys, re > -if len(sys.a

Re: Is crawling the stack "bad"? Why?

2008-02-26 Thread Carl Friedrich Bolz
Paul Rubin wrote: > Russell Warren <[EMAIL PROTECTED]> writes: >> That is exactly where I started (creating my own request handler, >> snagging the IP address and stashing it), but I couldn't come up with >> a stash location that would work for a threaded server. > > How about a dictionary indexed

Re: Indentation and optional delimiters

2008-02-26 Thread bearophileHUGS
Steven D'Aprano: > Usability for beginners is a good thing, but not at the expense of > teaching them the right way to do things. Insisting on explicit requests > before copying data is a *good* thing. If it's a gotcha for newbies, > that's just a sign that newbies don't know the Right Way from the

Re: Adobe CS3

2008-02-26 Thread Ken
Yeah, those are all very good points. There is really no excuse for top posting. Jeff Schwab wrote: D'Arcy J.M. Cain wrote: On Tue, 26 Feb 2008 12:58:53 -0800 Tobiah <[EMAIL PROTECTED]> wrote: A: Because it messes up the order in which people normally read text. Q: Why is top-posting

Documentation - which format

2008-02-26 Thread Jumping Arne
I'm considering using plain text file for documenting certain things (nothing to do with Python) and I'm looking at different "formatting systems" ... preferable with a python implementation to render the text at least as HTML - preferable also other formats like LaTeX. So far I've found +

Re: Windows System Administration: State of the Art on Python?

2008-02-26 Thread Martin v. Löwis
> I am a long-time user of Perl who comes to you in peace and is > evaluating different scripting languages for use as a scripting > platform for system administrators on the Windows platform. Perl > already has many modules that allow sys admins and devolpers to do > lots of things with the Window

Re: time.time() strangeness

2008-02-26 Thread Ross Ridge
Nitro <[EMAIL PROTECTED]> wrote: >I can tell you more now. If I pass D3DCREATE_FPU_PRESERVE while creating >the DirectX device the bug does not appear. This flag means "Direct3D >defaults to single-precision round-to-nearest" (see [1]) mode. >Unfortunately it is not an option to pass this flag

Re: Adobe CS3

2008-02-26 Thread Jeff Schwab
D'Arcy J.M. Cain wrote: > On Tue, 26 Feb 2008 12:58:53 -0800 > Tobiah <[EMAIL PROTECTED]> wrote: >>> A: Because it messes up the order in which people normally read text. >>> Q: Why is top-posting such a bad thing? >> But then again, when just adding a quip to a long thread in which >> the readers

Re: is there enough information?

2008-02-26 Thread Jeff Schwab
[EMAIL PROTECTED] wrote: > On Feb 26, 12:42 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: ... > th1 th2 > set cmd > run cmd > get result > acknowledge > continue continue > th2 won't -run cmd- until th1 completes -set cmd-. th1 won't -get >

Re: How about adding rational fraction to Python?

2008-02-26 Thread Jeff Schwab
Grant Edwards wrote: > On 2008-02-26, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Grant Edwards wrote: >> >>> I guess it must depend on where you went to shool. >> Temple Israel. You? > > Good one. :) I make a lot of typo's on Usenet, so I'm always secretly relieved when other people do, too. (I

Re: Indentation and optional delimiters

2008-02-26 Thread wolfram . hinderer
On 26 Feb., 14:36, [EMAIL PROTECTED] wrote: > A possible solution to this problem is "optional delimiters". What's > the path of less resistance to implement such "optional delimiters"? > Is to use comments. For example: #} or #: or something similar. > If you use such pairs of symbols in a systema

Re: How about adding rational fraction to Python?

2008-02-26 Thread Jeff Schwab
Paul Rubin wrote: > "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: >>> http://en.wikipedia.org/wiki/Natural_number >> Recheck the context. I was talking about the natural result, not >> natural numbers. > > The natural result of doing arithmetic with natural numbers is more > natural numbers.

Re: How about adding rational fraction to Python?

2008-02-26 Thread Jeff Schwab
J. Cliff Dyer wrote: > On Tue, 2008-02-26 at 13:51 -0500, D'Arcy J.M. Cain wrote: >> On Tue, 26 Feb 2008 13:39:38 -0500 >> "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: >> a = 2 * 2 >> b = 20 * 20 >> type(a) >>> >> type(b) >>> >> A long int is still integral which is

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Matthew Woodcraft
Nicola Musatti <[EMAIL PROTECTED]> wrote: > Sebastian Kaliszewski <[EMAIL PROTECTED]> wrote: >> 3. You can't handle clean-up errors in reasonable way in C++ish approach, so >> anything more complex should not by handled that way anyway. > So it's okay for a Python mechanism to deal with 95% of th

Get Python News On Twitter

2008-02-26 Thread [EMAIL PROTECTED]
I have launched a Twitter service called pythonnews - News about the Python Programming Language brought to you on Twitter! If you want to publicise something Python related just direct message pythonnews Thanks, Davy Mitchell -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-26 Thread Steven D'Aprano
On Tue, 26 Feb 2008 14:46:04 -0500, D'Arcy J.M. Cain wrote: > I am really having a hard time accepting that "TRUTH (tm)" is determined > by election. But you're apparently perfectly comfortable that "TRUTH (tm)" is decided by fiat. -- Steven -- http://mail.python.org/mailman/listinfo/python-

Re: How about adding rational fraction to Python?

2008-02-26 Thread Arnaud Delobelle
On Feb 26, 9:47 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Tue, 26 Feb 2008 11:43:56 -0500, D'Arcy J.M. Cain wrote: > > Integer division means integer result to me in a very real sense. > > So, when you have five children over for a birthday party, and one cake, > do you

Re: How about adding rational fraction to Python?

2008-02-26 Thread Ross Ridge
Ross Ridge <[EMAIL PROTECTED]> writes: > D'Arcy said nothing about natural numbers, and bringing them up adds > nothing to this discussion. Paul Rubin wrote: > The numbers D'Arcy is proposing to operate on that way are natural > numbers whether he says so or not. No, t

Re: Indentation and optional delimiters

2008-02-26 Thread Steven D'Aprano
On Tue, 26 Feb 2008 05:36:57 -0800, bearophileHUGS wrote: > So it can be invented a language > (that may be slower than Python, but many tricks and a JIT may help to > reduce this problem) where > > a = [1, 2, 3] > b = a > Makes b a copy-on-write copy of a, that is without reference semantics. U

Re: How about adding rational fraction to Python?

2008-02-26 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > On 2008-02-26, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Grant Edwards writes: >> >>> [...] >>> >>> Nope. I would prefer that int OP int always produce an int. >> >> And 2**-1? > > An error. ? Not here. Tschö, Torsten. -- Torsten Bronger, aquisgrana,

Re: Windows System Administration: State of the Art on Python?

2008-02-26 Thread Mike Driscoll
On Feb 26, 3:23 pm, Krishna Kirti Das <[EMAIL PROTECTED]> wrote: > I am a long-time user of Perl who comes to you in peace and is > evaluating different scripting languages for use as a scripting > platform for system administrators on the Windows platform. Perl > already has many modules that allo

Re: How about adding rational fraction to Python?

2008-02-26 Thread Steven D'Aprano
On Tue, 26 Feb 2008 11:43:56 -0500, D'Arcy J.M. Cain wrote: > Integer division means integer result to me in a very real sense. So, when you have five children over for a birthday party, and one cake, do you say "Sorry kids, no cake for you: one cake divided by five is zero"? Of course you do,

Re: Windows System Administration: State of the Art on Python?

2008-02-26 Thread jay graves
On Feb 26, 3:23 pm, Krishna Kirti Das <[EMAIL PROTECTED]> wrote: > I am a long-time user of Perl who comes to you in peace and is > evaluating different scripting languages for use as a scripting > platform for system administrators on the Windows platform. Perl > already has many modules that allo

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Steven D'Aprano
On Tue, 26 Feb 2008 06:35:21 -0800, Aaron Watters wrote: > I have found in the corporate > environment that managers frequently don't like it when you do in a few > days that things that they themselves don't know how to do in less than > several months. Especially when it makes the other program

time.time() strangeness

2008-02-26 Thread Nitro
> Nevertheless time.time() shouldn't fail here unless DirectX is really > badly tinkering with my system. I can tell you more now. If I pass D3DCREATE_FPU_PRESERVE while creating the DirectX device the bug does not appear. This flag means "Direct3D defaults to single-precision round-to-neare

Re: How about adding rational fraction to Python?

2008-02-26 Thread Grant Edwards
On 2008-02-26, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > Grant Edwards writes: > >> [...] >> >> Nope. I would prefer that int OP int always produce an int. > > And 2**-1? An error. > Your formulation tries to suggest some sort of logical > consequence but in my opinion, it's st

Re: How about adding rational fraction to Python?

2008-02-26 Thread Grant Edwards
On 2008-02-26, Paul Rubin wrote: > "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: >> > http://en.wikipedia.org/wiki/Natural_number >> Recheck the context. I was talking about the natural result, not >> natural numbers. > > The natural result of doing arithmetic with natural numbers is more > natu

Re: How about adding rational fraction to Python?

2008-02-26 Thread Paul Rubin
Ross Ridge <[EMAIL PROTECTED]> writes: > > The natural result of doing arithmetic with natural numbers is more > > natural numbers. > > D'Arcy said nothing about natural numbers, and bringing them up adds > nothing to this discussion. The numbers D'Arcy is proposing to operate on that way are n

Windows System Administration: State of the Art on Python?

2008-02-26 Thread Krishna Kirti Das
I am a long-time user of Perl who comes to you in peace and is evaluating different scripting languages for use as a scripting platform for system administrators on the Windows platform. Perl already has many modules that allow sys admins and devolpers to do lots of things with the Windows OS, and

Re: How about adding rational fraction to Python?

2008-02-26 Thread Ross Ridge
Paul Rubin wrote: > http://en.wikipedia.org/wiki/Natural_number "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > Recheck the context. I was talking about the natural result, not > natural numbers. Paul Rubin wrote: > The natural result of d

Re: Adobe CS3

2008-02-26 Thread D'Arcy J.M. Cain
On Tue, 26 Feb 2008 12:58:53 -0800 Tobiah <[EMAIL PROTECTED]> wrote: > > A: Because it messes up the order in which people normally read text. > > Q: Why is top-posting such a bad thing? > > But then again, when just adding a quip to a long thread in which > the readers have already seen the previ

Re: How about adding rational fraction to Python?

2008-02-26 Thread Paul Rubin
"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > > http://en.wikipedia.org/wiki/Natural_number > Recheck the context. I was talking about the natural result, not > natural numbers. The natural result of doing arithmetic with natural numbers is more natural numbers. -- http://mail.python.org/ma

Re: How about adding rational fraction to Python?

2008-02-26 Thread Ross Ridge
D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: >I don't think that it is a travesty either. I would also not be so >offended if the language treated it that way from the start although I >would still have had to get used to it having spent so much time in C >and assembler which has natural results.

Re: How about adding rational fraction to Python?

2008-02-26 Thread Terry Reedy
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message | >>> 3/5 | 0.59998 I think this either changed in 3.0a2 or may in upcoming releases. -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
On 26 Feb 2008 12:53:48 -0800 Paul Rubin <"http://phr.cx"@NOSPAM.invalid> wrote: > "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > > Note, I use the word "natural" above. Natural is an opinion and that > > happens to be mine. > > http://en.wikipedia.org/wiki/Natural_number Recheck the context

Re: Adobe CS3

2008-02-26 Thread Tobiah
Dotan Cohen wrote: > On 26/02/2008, john_sm3853 <[EMAIL PROTECTED]> wrote: >> Hey guys wondering, if you are using Adobe CS3 and do you think, if there >> are >> other alternatives to CS3. Would you recommend CS3 or wait for something >> else. >> > > For writing python? > > Dotan Cohen > >

Re: How about adding rational fraction to Python?

2008-02-26 Thread Paul Rubin
"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > Note, I use the word "natural" above. Natural is an opinion and that > happens to be mine. http://en.wikipedia.org/wiki/Natural_number -- http://mail.python.org/mailman/listinfo/python-list

SimpleHTTPServer send wrong Content-Length for text/* on Windows?

2008-02-26 Thread Christof Hoeke
hi, I noticed while trying a simple (but still very useful) server based on SimpleHTTP that it does report a wrong "Content-Length" for "text/*" files if Windows line-end "\r\n" is used. Most clients (e.g. browsers) do simply ignore a wrong Content-Length but there are programs that do care and

Asynchronous urllib (urllib+asyncore)?

2008-02-26 Thread Jonathan Gardner
So, I ran into a problem that I would like to write as little code as possible to solve. The problem is that I would like to send out a bunch of HTTP requests simultaneously, using asynchronous techniques, and then do stuff with the results in parallel. Think of something like Google's map-reduce.

Re: How about adding rational fraction to Python?

2008-02-26 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > [...] > > Nope. I would prefer that int OP int always produce an int. And 2**-1? Your formulation tries to suggest some sort of logical consequence but in my opinion, it's still a mere matter of taste and habits. I remember my first steps in C++ 12 years ago

first time use of swig, python and c++ .. it's a mess ... please advice

2008-02-26 Thread Eric von Horst
Hi, we have a third-party product that has a C++ api on HP-UX. I would like be able to use the API in Python (as I remember Python is good at doing this). I have no experience with this so I Googled and tried to find some info on what I had to do. So, I installed Python 2.4.4 and Swig 1.3.33 T

Re: Regular Expression Help

2008-02-26 Thread John Machin
On Feb 27, 6:28 am, [EMAIL PROTECTED] wrote: > Hi All, > > I have a python utility which helps to generate an excel file for > language translation. For any new language, we will generate the excel > file which will have the English text and column for interested > translation language. The transla

time.time() strangeness

2008-02-26 Thread Nitro
> The granularity of time.time can be quite large, maybe as much > as 1 second in some systems. Also, if the user can set the time, > the output might not be monotone. They might set the clock backwards > if it has drifted ahead, or something like that. Better to use an > explicit counter if you

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
On Tue, 26 Feb 2008 14:16:20 -0500 "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > I agree that integer division is useful and important, but I don't think > it's a travesty to support other kinds of division, especially when > integer division still has its own operator. I don't think that it is a t

Re: time.time() strangeness

2008-02-26 Thread Paul Rubin
Nitro <[EMAIL PROTECTED]> writes: > With the line commented time.time() returns a changing value which is > what I expect. However, when I uncomment it and create a Direct3D9 > Device [1][2] it keeps printing the very same number over and over! The granularity of time.time can be quite large, ma

Re: network programming: how does s.accept() work?

2008-02-26 Thread Grant Edwards
On 2008-02-26, Micah Cowan <[EMAIL PROTECTED]> wrote: > 7stud, what you seem to be missing, and what I'm not sure if anyone has > clarified for you (I have only skimmed the thread), is that in TCP, > connections are uniquely identified by a /pair/ of sockets (where > "socket" here means an address

time.time() strangeness

2008-02-26 Thread Nitro
Hello, today I encountered a very odd situation. I am on Windows Vista and using Python 2.5.2. Here's a code snippet to illustrate my problem: # uncomment the next line to trigger the problem # myExtensionModule.CreateDirect3D9Device() import time for i in range(0,100): print time.time()

Re: How about adding rational fraction to Python?

2008-02-26 Thread Grant Edwards
On 2008-02-26, J. Cliff Dyer <[EMAIL PROTECTED]> wrote: > So do you believe that you should not be able to do natural > division without explicitly casting ints as floats, IMO, you're begging the question by using the phrase "natural division" when what you mean is "floating point division", but

Regular Expression Help

2008-02-26 Thread Lythoner
Hi All, I have a python utility which helps to generate an excel file for language translation. For any new language, we will generate the excel file which will have the English text and column for interested translation language. The translator will provide the language string and again I will h

Re: How about adding rational fraction to Python?

2008-02-26 Thread Grant Edwards
On 2008-02-26, Mensanator <[EMAIL PROTECTED]> wrote: >> How soon before 2.x is completely deprecated and I have to become a >> Walmart greeter? > > Personally, I plan to drop Python if support for the gmpy module > ever dries up. But I won't be a quitter, just have to start using > C which will su

Re: How about adding rational fraction to Python?

2008-02-26 Thread Grant Edwards
On 2008-02-26, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> I guess it must depend on where you went to shool. > > Temple Israel. You? Good one. :) -- Grant Edwards grante Yow! Do you think the at

  1   2   3   >