Re: ANN: pyparsing 1.5.1 released

2008-10-19 Thread Terry Reedy
Rob Williscroft wrote: AIUI the idea is that you write your 2.x python code (and tests) so that when they are processed by 2to3.py you get valid python 3.x code that will pass all its tests. You then maintain your 2.x code base adding another test where the code (and tests) is run through 2

Re: a question about Chinese characters in a Python Program

2008-10-19 Thread oyster
I believe that is the problem with encode/code. you can find more @ http://groups.google.com/group/python-cn -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pyparsing 1.5.1 released

2008-10-19 Thread oyster
but the pyparsing.py in pyparsing-1.5.1.tar.gz is marked as 2008-10-02 I think it is good too touch all the files' time up-to-date. -- http://mail.python.org/mailman/listinfo/python-list

search for a python compiler program whose name is jingle

2008-10-19 Thread oyster
I don't remember its name very clear, it may be 'jingle' or not this program runs on windows and can compile a python program into exe file without gcc it has no webspace but is announced on the author's blog when I find it some times ago. I can't find the link now. I there anybody else know it and

Re: a question about Chinese characters in a Python Program

2008-10-19 Thread est
On Oct 20, 10:48 am, Liang Chen <[EMAIL PROTECTED]> wrote: > Hope you all had a nice weekend. > > I have a question that I hope someone can help me out. I want to run a Python > program that uses Tkinter for the user interface (GUI). The program allows me > to type Chinese characters, but neverth

Re: Help with Iteration

2008-10-19 Thread Aaron Brady
On Oct 19, 8:47 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > On Oct 20, 6:10 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > > [snip] > > > If customers are stupid, should you sell stupid software? > > That's a hypothetical question with which we need never concern > ourselves.  After all, by definiti

Re: Help with Iteration

2008-10-19 Thread Aaron Brady
On Oct 19, 12:27 pm, "Eric Wertman" <[EMAIL PROTECTED]> wrote: > >> Aaron Brady wrote: > > >>> while 1: > >>>    calculate_stuff( ) > >>>    if stuff < 0.5: > >>>        break > > >> The thought police will come and get you. > > Based on Aaron's previous posting history,  I suspect this was a

Re: ANN: pyparsing 1.5.1 released

2008-10-19 Thread Benjamin
On Oct 17, 11:14 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > (Python 3.0 uses syntax for catching exceptions that is incompatible > with Python versions pre 2.6, so there is no way for me to support > both existing Python releases and Python 3.0 with a common source code > base.  For those who

a question about Chinese characters in a Python Program

2008-10-19 Thread Liang Chen
Hope you all had a nice weekend. I have a question that I hope someone can help me out. I want to run a Python program that uses Tkinter for the user interface (GUI). The program allows me to type Chinese characters, but neverthelss is unable to show them up on screen. The follow is some of th

Re: Help with Iteration

2008-10-19 Thread Asun Friere
On Oct 20, 6:10 am, Aaron Brady <[EMAIL PROTECTED]> wrote: [snip] > If customers are stupid, should you sell stupid software? That's a hypothetical question with which we need never concern ourselves. After all, by definition customers are not stupid, but "always right." -- http://mail.python.

Big money in a simple program!!!

2008-10-19 Thread [EMAIL PROTECTED]
IT'S SIMPLE AND IT'S LEGAL!!! Who doesn’t want to make tons of money ridiculously easy? Read this letter follow the instructions, and like me you’ll never have to worry about money again. I was browsing through news groups just like you are right now and Came across a article similar to this sa

Re: xor: how come so slow?

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steven D'Aprano > wrote: > >> On Sat, 18 Oct 2008 09:16:11 +1300, Lawrence D'Oliveiro wrote: >> >>> Data can come in fractional bits. That's how compression works. >> >> If you don't believe me, try com

Re: keyword in package name.

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steve Holden wrote: > Though I do think it's an inappropriate choice for Python. I'd characterize it as a Javaism. It exemplifies the difference between the corporate, management-driven Java development model, versus the more freewheeling, informal Python one. Like

Re: keyword in package name.

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Abhishek Mishra wrote: > I have the habit of using domain names (of either the application or > company) in reverse in package names. > > for e.g. com.spam.app1 > > I've recently started a project for an indian domain (tld = .in), > which leads to a package name l

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aahz wrote: > I'm strongly opposed to backslashes because they break when you get > whitespace after them. 1) I've never had that problem. 2) Even if I did, it would report a syntax error, it's not going to fail silently and introduce any run-time bugs, is it? -- h

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Dennis Lee Bieber wrote: > There is also the matter that the original material is using " on > each line to delimit the string, and then \" within the line to escape > the desired output "s, rather than either using ' for the string and > bare " for the output chara

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread david . lyon
Quoting [EMAIL PROTECTED]: Stef Mientki: it's just Object Pascal , which is inferior to Python. They are quite different languages, you can't compare them in a simple way. Delphi is kinda old, so today there are better languages than Delphi (like D), but when Delphi 2-3 was out, there weren't

Re: keyword in package name.

2008-10-19 Thread Christian Heimes
Marc 'BlackJack' Rintsch wrote: `com_spam.app1`!? I would even recommend this with domains that don't clash with keywords because if several people start to use this package name convention you will get name clashes at package level. Say there are two vendors with a `com` TLD, how do you inst

Re: regexp in Python (from Perl)

2008-10-19 Thread bearophileHUGS
MRAB: > The regular expression changes the last sequence of digits to > "9" ("192.168.1.100" => "192.168.1.9") but the other code replaces the > last digit ("192.168.1.100" => "192.168.1.109"). Uhmm, this is a possible alternative: >>> s = " 192.168.1.100 " >>> ".".join(s.strip().split(".")[:3])

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread bearophileHUGS
Stef Mientki: > it's just Object Pascal , which is inferior to Python. They are quite different languages, you can't compare them in a simple way. Delphi is statically typed, and compiles very quickly producing "small" exes; "algorithmic" code can run a hundred times faster than Python code. There

Re: urllib2.HTTPError: HTTP Error 204: NoContent

2008-10-19 Thread Mark Sapiro
On Oct 19, 9:49 am, Philip Semanchuk <[EMAIL PROTECTED]> wrote: > On Oct 19, 2008, at 6:13 AM, silk.odyssey wrote: > > > I am getting the following error trying to download an html page using > > urllib2. > > > urllib2.HTTPError: HTTP Error 204: NoContent > > > The url is of this type: > > >http://

Re: regexp in Python (from Perl)

2008-10-19 Thread MRAB
On Oct 19, 5:47 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Pat a écrit : > > > I have a regexp in Perl that converts the last digit of an ip address to > >  '9'.  This is a very particular case so I don't want to go off on a > > tangent of IP octets. > > >  ( my $s = $str ) =~ s/((\d+\.){

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 20:50:46 +0200, Stef Mientki wrote: > Duncan, in windows it's begin to become less common to store settings in > Docs&Settings, > because these directories are destroyed by roaming profiles Isn't *everything* destroyed by roaming profiles? *wink* Seriously, I don't know anyo

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 15:40:32 +, Duncan Booth wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> In Linux, config files should go into: >> >> ~/./ or /etc// >> >> In Windows (which versions?) then should go into the Documents And >> Settings folder, where ever that is. >> >> There's n

Re: better scheduler with correct sleep times

2008-10-19 Thread James Mills
On Mon, Oct 20, 2008 at 5:31 AM, sokol <[EMAIL PROTECTED]> wrote: > >> from circuits.core import Manager, Component, Event, listener >> from circuits.timers import Timer > > what is circuits? If you're interested: An event framework with a focus on Component architectures. It can be downloaded cu

Re: better scheduler with correct sleep times

2008-10-19 Thread Scott David Daniels
sokol wrote: ... I see what you did there. You are keeping the queue empty so you get notified for free, while I introduced a new threading Condition to detect insertions. All that is missing in your version is to put back all pending tasks when somebody sends the stop (None) request. Shouldn't

Re: indentation

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 19:03:29 +0200, Bruno Desthuilliers wrote: > Steven D'Aprano a écrit : > > (snip) > >> You can use tabs, or spaces. If you use spaces, you can choose 4 >> spaces, or 8, or any number, > > By all means, make it 4 spaces - that's the standard. It's *a* standard. I believe it

Re: indentation

2008-10-19 Thread Jorgen Grahn
On Sun, 19 Oct 2008 15:50:59 -0400, Derek Martin <[EMAIL PROTECTED]> wrote: > On Sun, Oct 19, 2008 at 06:05:08PM +, Jorgen Grahn wrote: >> Doesn't pretty much everyone use spaces and a four-position indent? > > I can't speak for everyone, or even "pretty much everyone"... but I > know of seve

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread infixum
On Oct 19, 12:51 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > Lawrence D'Oliveiro wrote: > > In message <[EMAIL PROTECTED]>, Dotan > > Cohen wrote: > > >> I often see mention of SMBs that either want to upgrade their Windows > >> installations, or move to Linux, but cannot because of inhouse VB >

Re: indentation

2008-10-19 Thread Ben Finney
Gandalf <[EMAIL PROTECTED]> writes: > every time I switch editor all the script indentation get mixed up, > and python start giving me indentation weird errors. > indentation also hard to follow because it invisible unlike brackets > { } > > is there any solution to this problems? Follow PEP

Re: indentation

2008-10-19 Thread bearophileHUGS
Derek Martin: > I know of several people who favor the idea of "indent with tab, align > with space." [...] I favor this myself actually, [...] Thanks Guido, in Python3 this is finally a Syntax Error (I have asked for this probably about three years ago). Unfortunately the new Python-syntax-based

Re: better scheduler with correct sleep times

2008-10-19 Thread sokol
On Oct 19, 6:25 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > qvx wrote: > > I need a scheduler which can delay execution of a > > function for certain period of time. > > My attempt was something like this:  ... <<>> > > Is there a better way or some library that does that? > > The trick is

Re: indentation

2008-10-19 Thread Derek Martin
On Sun, Oct 19, 2008 at 06:05:08PM +, Jorgen Grahn wrote: > Doesn't pretty much everyone use spaces and a four-position indent? I can't speak for everyone, or even "pretty much everyone"... but I know of several people who favor the idea of "indent with tab, align with space." The advantage

Re: better scheduler with correct sleep times

2008-10-19 Thread sokol
> from circuits.core import Manager, Component, Event, listener > from circuits.timers import Timer what is circuits? -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with Iteration

2008-10-19 Thread Aaron Brady
Hendrik van Rooyen wrote: > Aaron Brady wrote: > >>while 1: >>calculate_stuff( ) >>if stuff < 0.5: >>break > > The thought police will come and get you. > > You are doing things by "side effect"! > You are using a global called "stuff"! > You are relying on an implementation >

Re: indentation

2008-10-19 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : (snip) You can use tabs, or spaces. If you use spaces, you can choose 4 spaces, or 8, or any number, By all means, make it 4 spaces - that's the standard. -- http://mail.python.org/mailman/listinfo/python-list

Re: re.search over a list

2008-10-19 Thread Bruno Desthuilliers
Pat a écrit : While I can use a for loop looking for a match on a list, I was wondering if there was a one-liner way. In particular, one of my RE's looks like this '^somestring$' so I can't just do this: re.search( '^somestring$', str( mylist ) ) I'm not smart enough (total newbie) to code u

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Aaron Brady
Duncan Booth wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> In Linux, config files should go into: >> >> ~/./ or /etc// >> >> In Windows (which versions?) then should go into the Documents And >> Settings folder, where ever that is. >> >> There's no single string which can represent

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Stef Mientki
Eric Wertman wrote: I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I'm in agreement that perfect probably isn't applicable. If I were doing this myself, I might store the information in a tuple: base = 'some root structure ('/' or 'C') path = ['some','set

Re: indentation

2008-10-19 Thread Bruno Desthuilliers
Gandalf a écrit : every time I switch editor all the script indentation get mixed up, and python start giving me indentation weird errors. indentation also hard to follow because it invisible unlike brackets { } is there any solution to this problems? Properly configure your eidtors to use

Re: regexp in Python (from Perl)

2008-10-19 Thread Bruno Desthuilliers
Pat a écrit : I have a regexp in Perl that converts the last digit of an ip address to '9'. This is a very particular case so I don't want to go off on a tangent of IP octets. ( my $s = $str ) =~ s/((\d+\.){3})\d+/${1}9/ ; While I can do this in Python which accomplishes the same thing: i

re.search over a list

2008-10-19 Thread Pat
While I can use a for loop looking for a match on a list, I was wondering if there was a one-liner way. In particular, one of my RE's looks like this '^somestring$' so I can't just do this: re.search( '^somestring$', str( mylist ) ) I'm not smart enough (total newbie) to code up a generator e

Re: xor: how come so slow?

2008-10-19 Thread Aaron Brady
Steven D'Aprano wrote: > On Sun, 19 Oct 2008 04:38:04 +, Tim Roberts wrote: > >> Steven D'Aprano <[EMAIL PROTECTED]> wrote: >>> >>>On Fri, 17 Oct 2008 20:51:37 +1300, Lawrence D'Oliveiro wrote: >>> Is piece really meant to be random? If so, your create_random_block function isn't ach

Re: inserting Unicode character in dictionary - Python

2008-10-19 Thread Martin v. Löwis
> Well, the if no encoding is declared, it (quite sensibly) assumes UTF-8, > so for my purposes this boils down to using a UTF-8 editor -- which I > always do anyway. But do I still have to put a "u" before my string > literals in order to have it treated as characters rather than bytes? Yes. >

Re: indentation

2008-10-19 Thread Jorgen Grahn
On 19 Oct 2008 14:34:45 GMT, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 19 Oct 2008 07:16:44 -0700, Gandalf wrote: > >> every time I switch editor all the script indentation get mixed up, and >> python start giving me indentation weird errors. indentation also hard >> to follow because

regexp in Python (from Perl)

2008-10-19 Thread Pat
I have a regexp in Perl that converts the last digit of an ip address to '9'. This is a very particular case so I don't want to go off on a tangent of IP octets. ( my $s = $str ) =~ s/((\d+\.){3})\d+/${1}9/ ; While I can do this in Python which accomplishes the same thing: ip = ip[ :-1 ] i

Re: better scheduler with correct sleep times

2008-10-19 Thread Scott David Daniels
Scott David Daniels wrote: def time_server(commands): '''Process all scheduled operations that arrive on queue commands''' ... queue = Queue.Queue() thread.thread.start_new_thread(queue) > queue.put((time.time() + dt, callable, args, {})) > ... And of course of the three lines that wer

Re: IDE Question

2008-10-19 Thread Jorgen Grahn
On Sat, 18 Oct 2008 19:17:35 -0300, Fabio Zadrozny <[EMAIL PROTECTED]> wrote: [I wrote] >> (As a side note: I don't use Eclipse myself, but I have seen novice >> programmers editing Python code with it, and what saw wasn't >> impressive. They *did* some kind of Python "plugin" installed, but >> wer

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Eric Wertman
>> I (again) wonder what's the perfect way to store, OS-independent, >> filepaths ? I'm in agreement that perfect probably isn't applicable. If I were doing this myself, I might store the information in a tuple: base = 'some root structure ('/' or 'C') path = ['some','set','of','path','names'] f

The truth about Prophet Muhammad (Peace Be Upon Him)

2008-10-19 Thread hi
The truth about Prophet Muhammad (Peace Be Upon Him) Loving him is following him Muslims all over the world are deeply hurt by the recent caricatures of our beloved Prophet Muhammad , in Danish and several other publications. Every now and then, some Western media outlets provoke Muslims by in

python-list@python.org

2008-10-19 Thread Larry Bird
http://militarybodyarmor.blogspot.com/2008/10/law-enforcement-certifications.html - Here it is don't miss out! -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread Aahz
In article <[EMAIL PROTECTED]>, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: >On 19 Oct 2008 07:44:52 -0700 >[EMAIL PROTECTED] (Aahz) wrote: >>> sys.stdout.write \ >>> ( >> >> Why are you using a backslash? > >Because he hasn't opened the paren yet. He could have put the open >paren on the

Paramiko, termios - interactive shell connection.

2008-10-19 Thread Pawel Gega
Hi, I am coding a small SSH client, I ve got some issues with creating pseudo terminal on server side, or at least I suppose that's the problem. That is the 'ps auxf' run on SSH server: root 4317 0.0 0.3 33744 876 ?Ss 11:36 0:00 /usr/sbin/sshd *### **4525** is th

Re: Help with Iteration

2008-10-19 Thread Eric Wertman
>> Aaron Brady wrote: >> >>> while 1: >>>calculate_stuff( ) >>>if stuff < 0.5: >>>break >> >> The thought police will come and get you. Based on Aaron's previous posting history, I suspect this was a joke. -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2.HTTPError: HTTP Error 204: NoContent

2008-10-19 Thread Philip Semanchuk
On Oct 19, 2008, at 6:13 AM, silk.odyssey wrote: I am getting the following error trying to download an html page using urllib2. urllib2.HTTPError: HTTP Error 204: NoContent The url is of this type: http://www.amazon.com/gp/offer-listing/B000KJX3A0%3FSubscriptionId%3D183VXJS74KNQ89D0NRR2%26t

Re: Help with Iteration

2008-10-19 Thread Steve Holden
Hendrik van Rooyen wrote: > Aaron Brady wrote: > >> while 1: >>calculate_stuff( ) >>if stuff < 0.5: >>break > > The thought police will come and get you. > > You are doing things by "side effect"! > You are using a global called "stuff"! > You are relying on an implementatio

Re: keyword in package name.

2008-10-19 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: > On Sat, 18 Oct 2008 23:05:38 -0700, Abhishek Mishra wrote: > >> I have the habit of using domain names (of either the application or >> company) in reverse in package names. [...] > The `__init__.py` of which vendor > should live at the `com/` directory level? If

Re: keyword in package name.

2008-10-19 Thread Steve Holden
Abhishek Mishra wrote: > On Oct 19, 12:11 pm, Tino Wildenhain <[EMAIL PROTECTED]> wrote: >> Abhishek Mishra wrote: >>> Hello Everyone, >>> I have the habit of using domain names (of either the application or >>> company) in reverse in package names. >>> for e.g. com.spam.app1 >> While this seemed a

Re: Finding the instance reference of an object

2008-10-19 Thread Steve Holden
Steven D'Aprano wrote: [...] > when you talk about "call by value > where the value is a reference", it sounds to me as if you are insisting > that cars are ACTUALLY horse and buggies, where the horse is the engine, > why are we inventing new terms like 'automobile', that just confuses > peopl

Re: xor: how come so slow?

2008-10-19 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steven D'Aprano > wrote: > >> On Sat, 18 Oct 2008 09:16:11 +1300, Lawrence D'Oliveiro wrote: >> >>> Data can come in fractional bits. That's how compression works. >> If you don't believe me, try compressing a single bit and see if you g

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-19 Thread dsyzling
Damien Wyart wrote: * Carl Banks <[EMAIL PROTECTED]> in comp.lang.python: The python-mode.el on Subversion (python-mode's Subversion on source forge, not the ancient version of python-mode in the Python repository) has a fix for this issue. It doesn't look like there's any way to browse the subv

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Grant Edwards
On 2008-10-19, Stef Mientki <[EMAIL PROTECTED]> wrote: > I (again) wonder what's the perfect way to store, OS-independent, > filepaths ? The question appears to me to be meaningless. File paths are not OS independant, so an OS-independant way to store them doesn't seem to be a useful thing to ta

Re: better scheduler with correct sleep times

2008-10-19 Thread Scott David Daniels
qvx wrote: I need a scheduler which can delay execution of a function for certain period of time. My attempt was something like this: ... <<>> Is there a better way or some library that does that? The trick is to use Queue's timeout argument to interrupt your sleep when new requests come in.

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: import os os.path.splitdrive('C://My Documents/My File.txt') > ('C:', 'My Documents\\My File.txt') > > I had to fake the above output because I'm not running Windows, so > excuse me if I got it wrong. Not that it matters, but: >>> os.path

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > In Linux, config files should go into: > > ~/./ or /etc// > > In Windows (which versions?) then should go into the Documents And > Settings folder, where ever that is. > > There's no single string which can represent both of these conventions! The

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 14:35:01 +0200, Stef Mientki wrote: > hello, > > I (again) wonder what's the perfect way to store, OS-independent, > filepaths ? "Perfect"? I can't imagine any scheme which will work on every imaginable OS, past present and future. However, in practice I think there are two

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread D'Arcy J.M. Cain
On 19 Oct 2008 07:44:52 -0700 [EMAIL PROTECTED] (Aahz) wrote: > > sys.stdout.write \ > > ( > > Why are you using a backslash? Because he hasn't opened the paren yet. He could have put the open paren on the same line as the write obviating the need for the backslash but then his open/close

Re: Linux.com: Python 3 makes a big break

2008-10-19 Thread Aahz
In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >In message ><[EMAIL PROTECTED]>, Kay >Schluehr wrote: >> >> If someone had solved the hard problem of finding a less >> cumbersome way of writing sys.stdout.write(...) ... > >I don't see what the big deal is. I regular

Re: indentation

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 07:16:44 -0700, Gandalf wrote: > every time I switch editor all the script indentation get mixed up, and > python start giving me indentation weird errors. indentation also hard > to follow because it invisible unlike brackets { } Indentation is not invisible. Can

Re: a new brawser (avant) it is very very good

2008-10-19 Thread George Sakkis
On Oct 17, 5:59 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > mina2020 wrote: > > what has this todo with Python ? Do you take the time to reply to every spam you receive ? -- http://mail.python.org/mailman/listinfo/python-list

Re: xor: how come so slow?

2008-10-19 Thread MRAB
On Oct 19, 7:13 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 19 Oct 2008 04:38:04 GMT, Tim Roberts <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > > > > For those who got a bit lost here, I'd would point out that Knuth[1] has an > > excellent chapter on random n

indentation

2008-10-19 Thread Gandalf
every time I switch editor all the script indentation get mixed up, and python start giving me indentation weird errors. indentation also hard to follow because it invisible unlike brackets { } is there any solution to this problems? thank you! -- http://mail.python.org/mailman/listinfo/pyth

Re: keyword in package name.

2008-10-19 Thread MRAB
On Oct 19, 7:05 am, Abhishek Mishra <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > I have the habit of using domain names (of either the application or > company) in reverse in package names. > > for e.g. com.spam.app1 > > I've recently started a project for an indian domain (tld = .in), > which

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread [EMAIL PROTECTED]
On Oct 19, 8:35 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > I (again) wonder what's the perfect way to store, OS-independent, > filepaths ? I don't think there is any such thing. What problem are you trying to solve? -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pyparsing 1.5.1 released

2008-10-19 Thread Rob Williscroft
Paul McGuire wrote in news:[EMAIL PROTECTED] in comp.lang.python: > On Oct 18, 1:05 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: >> Paul McGuire wrote: >> > I've just uploaded to SourceForge and PyPI the latest update to >> > (Python 3.0 uses syntax for catching exceptions that is >> > incompatible

Re: inserting Unicode character in dictionary - Python

2008-10-19 Thread Joe Strout
On Oct 18, 2008, at 1:20 AM, Martin v. Löwis wrote: Do you then have a proper UTF-8 string, but the problem is that none of the standard Python library methods know how to properly interpret UTF-8? There is (probably) no such thing as a "proper UTF-8 string" (in the sense in which you proba

Re: a new brawser (avant) it is very very good

2008-10-19 Thread Stef Mientki
mina2020 wrote: what has this todo with Python ? Avant Browser allows users to browse multiple Web sites simultaneously and to block all unwanted pop-up pages and Flash ads automatically. The integrated cleaner helps users clear all traces and maintain privacy. The built-in Yahoo and Google searc

What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Stef Mientki
hello, I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I can think of something like: - use a relative path if drive is identical to the application (I'm still a Windows guy) - use some kind of OS-dependent translation table if on another drive - use ? if on a ne

Re: loops

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 03:17:51 -0700, John Machin wrote: > Steven D'Aprano wrote: > >> On Sat, 18 Oct 2008 20:45:47 -0700, John Machin wrote: >> >> > On Oct 19, 2:30 pm, Steven D'Aprano <[EMAIL PROTECTED] >> > cybersource.com.au> wrote: >> > [snip] >> >> making your code easy to read and easy to ma

Re: keyword in package name.

2008-10-19 Thread Diez B. Roggisch
Abhishek Mishra schrieb: On Oct 19, 2:06 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: `com_spam.app1`!? I would even recommend this with domains that don't clash with keywords because if several people start to use this package name convention you will get name clashes at package lev

Re: default value in __init__

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 00:56:17 -0700, Paul McGuire wrote: > On Oct 14, 1:36 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: ... >> In particular default parameters should work the way the user expects! >> The fact that different users will expect different things here is no >> excuse... >> > Are yo

Re: Finding the instance reference of an object

2008-10-19 Thread Steven D'Aprano
On Fri, 17 Oct 2008 09:56:17 -0600, Joe Strout wrote: > On Oct 16, 2008, at 11:23 PM, Dennis Lee Bieber wrote: > >> On Thu, 16 Oct 2008 21:19:28 -0600, Joe Strout <[EMAIL PROTECTED]> >> declaimed the following in comp.lang.python: >> >>> Now that IS mysterious. Doesn't calling a function add a f

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread Stef Mientki
Francesco Bochicchio wrote: Il Sun, 19 Oct 2008 10:34:23 +0200, Stef Mientki ha scritto: ... I'm very satisfied with Python, and must say it's much more beautiful language than Delphi, seen over the full width of programming. Although both languages are Object Oriented, for some (unknown)

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread Stef Mientki
Dotan Cohen wrote: 2008/10/19 Stef Mientki <[EMAIL PROTECTED]>: Dotan Cohen wrote: 2008/10/19 Stef Mientki <[EMAIL PROTECTED]>: Sorry but for GUI design, Python is pre-historic ;-) Stef Really, even with the cross-platform Qt bindings? I skipped Qt because o

Re: keyword in package name.

2008-10-19 Thread Abhishek Mishra
On Oct 19, 2:06 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > `com_spam.app1`!?  I would even recommend this with domains that don't > clash with keywords because if several people start to use this package > name convention you will get name clashes at package level.  Say there > are

Re: loops

2008-10-19 Thread John Machin
Steven D'Aprano wrote: > On Sat, 18 Oct 2008 20:45:47 -0700, John Machin wrote: > > > On Oct 19, 2:30 pm, Steven D'Aprano <[EMAIL PROTECTED] > > cybersource.com.au> wrote: > > [snip] > >> making your code easy to read and easy to maintain is far more > >> important. > >> > >> for x in (2**i for

Re: Normalizing arguments

2008-10-19 Thread Dan Ellis
On Oct 17, 7:16 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > George Sakkis has a recipe that might help. > > http://code.activestate.com/recipes/551779/ Looks like just the thing. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread Francesco Bochicchio
Il Sun, 19 Oct 2008 10:34:23 +0200, Stef Mientki ha scritto: ... I'm very > satisfied with Python, and must say it's much more beautiful language > than Delphi, seen over the full width of programming. Although both > languages are Object Oriented, for some (unknown) reason it's 10 times > easi

urllib2.HTTPError: HTTP Error 204: NoContent

2008-10-19 Thread silk.odyssey
I am getting the following error trying to download an html page using urllib2. urllib2.HTTPError: HTTP Error 204: NoContent The url is of this type: http://www.amazon.com/gp/offer-listing/B000KJX3A0%3FSubscriptionId%3D183VXJS74KNQ89D0NRR2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D3

Re: default value in __init__

2008-10-19 Thread Chris Rebert
On Sun, Oct 19, 2008 at 12:56 AM, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Oct 14, 1:36 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: >> > Well... How to say.. Is there any chance these people will read anything >> > *at all* ? >> >> No. That's exactly the point! Basic Python is so transpar

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread Dotan Cohen
2008/10/19 Stef Mientki <[EMAIL PROTECTED]>: > Dotan Cohen wrote: >> >> 2008/10/19 Stef Mientki <[EMAIL PROTECTED]>: >> >>> >>> Sorry but for GUI design, Python is pre-historic ;-) >>> Stef >>> >> >> Really, even with the cross-platform Qt bindings? >> > > I skipped Qt because of the weird license

Re: keyword in package name.

2008-10-19 Thread Terry Reedy
Abhishek Mishra wrote: Hello Everyone, I have the habit of using domain names (of either the application or company) in reverse in package names. for e.g. com.spam.app1 I've recently started a project for an indian domain (tld = .in), which leads to a package name like in.spam.app1 This caus

Re: Finding the instance reference of an object

2008-10-19 Thread Steven D'Aprano
On Fri, 17 Oct 2008 16:36:24 -0400, Steve Holden wrote: > People here don't describe Python as different just because they *want* > it to be different. Python acknowledges intellectual debts to many > languages, none of which is exactly like it. I understand that Python's object and calling seman

Re: keyword in package name.

2008-10-19 Thread Marc 'BlackJack' Rintsch
On Sat, 18 Oct 2008 23:05:38 -0700, Abhishek Mishra wrote: > I have the habit of using domain names (of either the application or > company) in reverse in package names. > > for e.g. com.spam.app1 > > I've recently started a project for an indian domain (tld = .in), which > leads to a package na

Re: Help with Iteration

2008-10-19 Thread Hendrik van Rooyen
Aaron Brady wrote: >while 1: >calculate_stuff( ) >if stuff < 0.5: >break The thought police will come and get you. You are doing things by "side effect"! You are using a global called "stuff"! You are relying on an implementation detail! While their cudgels are bouncing off

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread Stef Mientki
Dotan Cohen wrote: 2008/10/19 Stef Mientki <[EMAIL PROTECTED]>: Sorry but for GUI design, Python is pre-historic ;-) Stef Really, even with the cross-platform Qt bindings? I skipped Qt because of the weird license (I make both commercial and free-open software) Can you recommend a

Re: keyword in package name.

2008-10-19 Thread Abhishek Mishra
On Oct 19, 12:11 pm, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Abhishek Mishra wrote: > > Hello Everyone, > > > I have the habit of using domain names (of either the application or > > company) in reverse in package names. > > > for e.g. com.spam.app1 > > While this seemed a good idea for java,

Re: Porting VB apps to Python for Window / Linux use

2008-10-19 Thread Dotan Cohen
2008/10/19 Stef Mientki <[EMAIL PROTECTED]>: > Sorry but for GUI design, Python is pre-historic ;-) > Stef Really, even with the cross-platform Qt bindings? Can you recommend a better language? (not java no please not java) -- Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-

Re: xor: how come so slow?

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 04:38:04 +, Tim Roberts wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> >>On Fri, 17 Oct 2008 20:51:37 +1300, Lawrence D'Oliveiro wrote: >> >>> Is piece really meant to be random? If so, your create_random_block >>> function isn't achieving much--xoring random data t

[ANN] pyKook 0.0.1 - a simple build tool similar to Make or Ant

2008-10-19 Thread kwatch
Hi all, I have released pyKook 0.0.1. http://pypi.python.org/pypi/Kook/0.0.1 http://www.kuwata-lab.com/kook/ http://www.kuwata-lab.com/kook/pykook-users-guide.html pyKook is a simple build tool similar to Make, Ant, Rake, or SCons. pyKook regards software project as cooking. Terms used in pyKook

  1   2   >