Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Arnaud Delobelle
Josh <[EMAIL PROTECTED]> writes: > If you were a beginning programmer and willing to make an investment > in steep learning curve for best returns down the road, which would > you pick? > > I know this topic has been smashed around a bit already, but 'learning > curve' always seems to be an arguem

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Joe Riopel
On Sat, Nov 29, 2008 at 3:44 PM, Josh <[EMAIL PROTECTED]> wrote: > Thanks in advance, There is no right, or wrong, answer to this question. Try one for a few weeks, force yourself to use it as exclusively as possible for all your text editing needs. After that, repeat that process with the other e

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread [EMAIL PROTECTED]
On Nov 29, 12:44 pm, Josh <[EMAIL PROTECTED]> wrote: > If you were a beginning programmer and willing to make an investment in > steep learning curve for best returns down the road, which would you pick? > > I know this topic has been smashed around a bit already, but 'learning > curve' always seem

~ Hot Pics and Videos totally free

2008-11-29 Thread Rapid Share
http://enormusjugs.blogspot.com/ - Download some of the hottest videos and pics on the net totally free! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python surpasses Perl in popularity?

2008-11-29 Thread Tam Ha
Stephane CHAZELAS wrote: > There's a common confusion in this in the nature of /bin/sh. > There's no standard (neither POSIX nor Unix) that specifies that > /bin/sh should be any variant of the Bourne shell. Sure there is, POSIX. Or rather their Austin Group. And while they done an extremely poor

Re: Exhaustive Unit Testing

2008-11-29 Thread Terry Reedy
Steven D'Aprano wrote: On Sun, 30 Nov 2008 03:42:50 +, Steven D'Aprano wrote: def lcm(a, b): return a/gcd(a, b)*b (By the way: there's a subtle bug in lcm() that will hit you in Python 3. Can you spot it? Er, ignore this. Division in Python 3 only returns a float if the remainder i

Is there any library that can convert RGB colors to ANSI colors?

2008-11-29 Thread ZelluX
Convert RGB colors to the closest ANSI colors. For example, given RGB color FF, it should print [31m. -- http://mail.python.org/mailman/listinfo/python-list

Re: HELP!...Google SketchUp needs a Python API

2008-11-29 Thread r
Greg, You have made my week friend! I had given up hope that anybody cared about Python! -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any project whose patches are all available?

2008-11-29 Thread ZelluX
That's exactly what i want, thanks for all your replies On Nov 28, 8:48 pm, [EMAIL PROTECTED] wrote: >     zellux> I want to write a version-tracking tool for Python projects, and >     zellux> need some sample projects whose even smallest modifications can >     zellux> be downloaded from the inte

Re: HELP!...Google SketchUp needs a Python API

2008-11-29 Thread greg
I for one would love to see a Python scripting interface for Sketchup. I carried out a fairly major Sketchup scripting exercise recently [1], and while it was fun, I would have enjoyed it more if I'd been able to use Python. However, I think it's going to be a fairly tall order to persuade the Sk

Re: Exhaustive Unit Testing

2008-11-29 Thread Steven D'Aprano
On Sun, 30 Nov 2008 03:42:50 +, Steven D'Aprano wrote: > def lcm(a, b): > return a/gcd(a, b)*b > > (By the way: there's a subtle bug in lcm() that will hit you in Python 3. Can you spot it? Er, ignore this. Division in Python 3 only returns a float if the remainder is non-zero, and whe

About Anshu's Designer Studio ( www.anshusdesigns.com)

2008-11-29 Thread anshusdesigns
Anshu's Designer Studio, opened on August 27th, 2005 has gained a reputation among all fashion aware generation in this short span of time. Nevertheless to say it will reach more heights in coming time as we can predict from the fame Anshu's is gaining at the moment. Anshu's was started as a dr

Re: newbie question: if var1 == var2:

2008-11-29 Thread Andrew Robert
Two issues regarding script. You have a typo on the file you are trying to open. It is listed with a file extension of .in when it should be .ini . The next issue is that you are comparing what was read from the file versus the variable. The item read from file also contains and end-of-line

how can I open an excel sheet with specified name

2008-11-29 Thread Zuo, Changchun
Dear Sir, Could you please send me an example script example of * Opening an excel workbook with specified name * Read or write number in a specified spreadsheet Thanks, Zuo, Changchun, P.Eng System Performance Planning and Assessment, BCTC 604-699-7361 (7-7361) Suite 11

Re: Exhaustive Unit Testing

2008-11-29 Thread Steven D'Aprano
On Sat, 29 Nov 2008 17:13:00 +0100, Roel Schroeven wrote: > Except that I'm always told that the goal of unit tests, at least > partly, is to protect us agains mistakes when we make changes to the > tested functions. They should tell me wether I can still trust spam() > after refactoring it. Doesn

Re: unicode and hashlib

2008-11-29 Thread Jeff H
On Nov 29, 12:23 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Scott David Daniels wrote: > > ... > > > If you now, and for all time, decide that the only source you will take > > is cp1252, perhaps you should decode to cp1252 before hashing. > > Of course my dyslexia sticks out here as I ge

Re: Pyhon (with wxPython) on Windows' cygwin: can it be done fully ?

2008-11-29 Thread alex23
On Nov 30, 7:31 am, Lie <[EMAIL PROTECTED]> wrote: > Python's learning > curve shouldn't raise with time, it should get lower so more people > can join in the board. I understand the altruistic urge present in such a desire. At the risk of being considered an elitist, as a professional programmer

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread J.T. Hurley
> If you were a beginning programmer and willing to make an investment in > steep learning curve for best returns down the road, which would you pick? I'd actually recommend starting with IDLE. It's pretty python-centric, and should give you a good idea if you want an IDE or an editor. If the form

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Ben Finney
Stef Mientki <[EMAIL PROTECTED]> writes: > Mario Testinori wrote: > > First, you must understand that this is an extremelly dangerous > > question to ask on a public newsgroup (expecially regarding the > > first and the third in the series). Wars have began over this. > > Many people were harmed i

Re: Using thread in an asyncronous application

2008-11-29 Thread Aaron Brady
On Nov 29, 5:27 am, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > On 29 Nov, 02:24, Aaron Brady <[EMAIL PROTECTED]> wrote: > > > > > On Nov 27, 9:03 am, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > I'm the maintainer of an asynchronous FTP server implementation based > > > on

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Mario Testinori
On Sat, 29 Nov 2008 20:27:54 -0500, Albert Hopkins <[EMAIL PROTECTED]> wrote: >On Sun, 2008-11-30 at 02:18 +0100, Stef Mientki wrote: > >> > First, you must understand that this is an extremelly dangerous >> > question to ask on a public newsgroup (expecially regarding the first >> > and the third

Re: Unicode regex and Hindi language

2008-11-29 Thread Martin v. Löwis
John Machin wrote: > On Nov 30, 4:33 am, Terry Reedy <[EMAIL PROTECTED]> wrote: >> Martin v. Löwis wrote: >>> To be fair to Python (and SRE), > > I was being unfair? No - sorry if I gave that impression. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: end of print = lower productivity ?

2008-11-29 Thread Steven D'Aprano
On Sat, 29 Nov 2008 13:24:29 -0800, Lie wrote: > I am a perfectionists But not enough of a perfectionist to tell the difference between one perfectionist and two perfectionists. *wink* -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Albert Hopkins
On Sun, 2008-11-30 at 02:18 +0100, Stef Mientki wrote: > > First, you must understand that this is an extremelly dangerous > > question to ask on a public newsgroup (expecially regarding the first > > and the third in the series). Wars have began over this. Many people > > were harmed in those war

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Stef Mientki
Mario Testinori wrote: On Sat, 29 Nov 2008 12:44:14 -0800, Josh <[EMAIL PROTECTED]> wrote: If you were a beginning programmer and willing to make an investment in steep learning curve for best returns down the road, which would you pick? I know this topic has been smashed around a bit alre

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Mario Testinori
On Sat, 29 Nov 2008 12:44:14 -0800, Josh <[EMAIL PROTECTED]> wrote: >If you were a beginning programmer and willing to make an investment in >steep learning curve for best returns down the road, which would you pick? > >I know this topic has been smashed around a bit already, but 'learning >curv

Re: Convert hexadecimal characters to ascii

2008-11-29 Thread Durand
Wow, I didn't expect so many responses! Thanks! I will have to try out all those solutions when I have access to my computer.. What I meant was that when the string was printed onto a text file, it showed lots of boxes that are usually associated with unknown characters...When I tried to work out w

Re: end of print = lower productivity ?

2008-11-29 Thread Grant Edwards
On 2008-11-29, Tim Chase <[EMAIL PROTECTED]> wrote: > [...] Python only requires a text editor. If typing a few > extra parens for "print"ing is the worst of your efficiency > concerns in Notepad, you need to go out and see what > productivity-enhancing features other text-editors offer. On > Wi

Re: Embedded Program Icon (wxPython)

2008-11-29 Thread Bart
On Nov 29, 10:14 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Nov 29, 2:30 pm, Bart <[EMAIL PROTECTED]> wrote: > > > > > Dear members, > > It's not (yet) easy to find my way through the bunch of info scattered > > over the internet to find out how to embed an icon. It could be that > > I’m loo

Re: Debugging in Python

2008-11-29 Thread Scott David Daniels
Stef Mientki wrote: I'm not completely satisfied with even the "best" debuggers, most of the good ones are too difficult, so I want to wrap rpdb2 and don't want to miss any great features ;-) I think ActiveState has a free 21-day trial, so you could check it out yourself if you are willin

Re: end of print = lower productivity ?

2008-11-29 Thread Scott David Daniels
Tim Roberts wrote: ... I can sympathize with what you are saying. I spend virtually all of my time in a command line. As a Windows driver guy, I work a lot in the \windows\system32\drivers directory. I got used to typing that as \wi \syst \dr letting tab completion fill it in. Well, in Wi

Re: end of print = lower productivity ?

2008-11-29 Thread Tim Chase
It's not so much "ridiculous" as a failure of your editor to assist you. In Vim (my editor-of-choice), I'd do something like seriously, I don't think anyone in Windows uses vim Are you just guessing, or do you have any sort of facts to back this up? It's my editor of choice when I'm stuck in

Re: Version upgrade blocked mentally

2008-11-29 Thread Martin v. Löwis
>>> I have read in my copy of Programming Python that all strings will be >>> Unicode and there will be a byte type. >> Actually that change is scheduled for 3.0. > > Yes, but it's available in 2.6 as well: >>>> from __future__ import unicode_literals >>>> type('') > That's different,

Re: newbie question: if var1 == var2:

2008-11-29 Thread John Machin
On Nov 29, 2:53 pm, [EMAIL PROTECTED] wrote: > Hi All, > > I dont understand why the following code cannot find the > variable "tree".  It is very simple but I could not find the answer > to this on the Python Tutorials.  Here is the code, input and runtime: > > #!/usr/bin/python > > fname = open("

Re: PYTHONPATH in Windows

2008-11-29 Thread Martin v. Löwis
> But no PYTHONPATH variable shows up in my environment settings. To answer a long question with a single sentence: just add the variable, and be done with it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert hexadecimal characters to ascii

2008-11-29 Thread John Machin
On Nov 30, 7:39 am, Durand <[EMAIL PROTECTED]> wrote: > Hi, > > I've got this weird problem where in some strings, parts of the string are in > hexadecimal, or thats what I think they are. I'm not exactly sure...I get > something like this: 's\x08 \x08Test!' from parsing a log file. From what I

Re: Unicode regex and Hindi language

2008-11-29 Thread Terry Reedy
John Machin wrote: John, nothing I wrote was directed at you. If you feel insulted, you have my apology. My intention was and is to get future movement on an issue that was reported 20 months ago but which has lain dead since, until re-reported (a bit more clearly) a week ago, because of a

Re: Unicode regex and Hindi language

2008-11-29 Thread John Machin
On Nov 30, 4:33 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > Martin v. Löwis wrote: > > To be fair to Python (and SRE), I was being unfair? In the context, "bug" == "needs to be changed"; see below. > SRE predates TR#18 (IIRC) - atleast > > annex C was added somewhere between revision 6 and 9, i.

Re: Version upgrade blocked mentally

2008-11-29 Thread Jean-Paul Calderone
On Sat, 29 Nov 2008 13:40:00 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: Adam E wrote: I have read in my copy of Programming Python that all strings will be Unicode and there will be a byte type. Actually that change is scheduled for 3.0. Yes, but it's available in 2.6 as well:

Re: Unicode regex and Hindi language

2008-11-29 Thread Terry Reedy
MRAB wrote: Terry Reedy wrote: I notice from the manual "All identifiers are converted into the normal form NFC while parsing; comparison of identifiers is based on NFC." If NFC used accented letters, then the issue is finesses away for European words simply because Unicode includes include

Re: newbie question: if var1 == var2:

2008-11-29 Thread Massimo Di Pierro
because when you loop over open(...) is the same as looping over open (...).readlines() and readlines() reads everything including newlines. Try replace: if item == var: with if item.strip() == var: Massimo On Nov 28, 2008, at 9:47 PM, [EMAIL PROTECTED] wrote: Hi All, I dont un

Re: Debugging in Python

2008-11-29 Thread Stef Mientki
Scott David Daniels wrote: Stef Mientki wrote: The debugging ability of the Komodo IDE is _significantly_ better than the freely available debuggers. If you like the Komodo Editor, you'll love the debugger. hi Scott, can you tell us, > why Komodo debugger is better than PyScripter or even

Re: PYTHONPATH in Windows

2008-11-29 Thread waltbrad
On Nov 29, 1:39 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > waltbrad schrieb: > > > > > PYTHONPATH is a concept I've never been able to get straight.  I can't > > see the difference between this and just setting paths in the Windows > > environment variables. So, for the longest time I just

Re: Version upgrade blocked mentally

2008-11-29 Thread Scott David Daniels
Adam E wrote: I have read in my copy of Programming Python that all strings will be Unicode and there will be a byte type. Actually that change is scheduled for 3.0. As a tool for simplifying conversions and compatible code, the name "bytes" is provided in 2.6 as a synonym of "str". This allow

Re: Pyhon (with wxPython) on Windows' cygwin: can it be done fully ?

2008-11-29 Thread Lie
On Nov 26, 1:45 pm, "Barak, Ron" <[EMAIL PROTECTED]> wrote: > Hi Pythonistas, > > I read diaz's comments with interest, but - in my current configuration, I'm > unable to use pdb. > > I'm developing on cygwin and use wxPython. > Consequently, I cannot use native cygwin Python, but my Python is act

how to find help/doc files ?

2008-11-29 Thread Stef Mientki
hello, For an IDE, I want to find the installed help files, either in the form of chm or html files. I'm specially interested in the files for: - python - wxpython - vpython but I fact I want link to all installed docs. Is there a general way to find (by code) these docs ? If not, are there st

Re: Convert hexadecimal characters to ascii

2008-11-29 Thread Albert Hopkins
On Sat, 2008-11-29 at 20:39 +, Durand wrote: > Hi, > > I've got this weird problem where in some strings, parts of the string > are in hexadecimal, or thats what I think they are. I'm not exactly > sure...I get something like this: 's\x08 \x08Test!' from parsing a log > file. From what I fo

Re: end of print = lower productivity ?

2008-11-29 Thread Lie
On Nov 26, 3:08 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > On Nov 25, 5:05 pm, peter <[EMAIL PROTECTED]> wrote: > >> BUT you now can do > > > p = print > > p("f") > >> Voila, 4 keystrokes saved :-) > > > All right. Let's talk about that. > > > W

Re: Embedded Program Icon (wxPython)

2008-11-29 Thread Mike Driscoll
On Nov 29, 2:30 pm, Bart <[EMAIL PROTECTED]> wrote: > Dear members, > It's not (yet) easy to find my way through the bunch of info scattered > over the internet to find out how to embed an icon. It could be that > I’m looking at the wrong places, I'm new to Python and wxPython. > Nevertheless, I wo

Re: end of print = lower productivity ?

2008-11-29 Thread Lie
On Nov 25, 11:44 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > p = print > > p("f") > >> Voila, 4 keystrokes saved :-) > > > When I write "print", it is both effortless and instantaneous : my > > hands do not move, a wave goes through my fingers, it all happens in a > > tenth of a second. >

Re: Convert hexadecimal characters to ascii

2008-11-29 Thread Mensanator
On Nov 29, 2:39�pm, Durand <[EMAIL PROTECTED]> wrote: > Hi, > > I've got this weird problem where in some strings, parts of the string are in > hexadecimal, or thats what I think they are. I'm not exactly sure...I get > something like this: 's\x08 \x08Test!' from parsing a log file. From what I

Re: Version upgrade blocked mentally

2008-11-29 Thread Albert Hopkins
On Sat, 2008-11-29 at 12:32 -0800, Adam E wrote: > I have read in my copy of Programming Python that all strings will be > Unicode and there will be a byte type. > > This is mentally keeping me from upgrading to 2.6 . Care to explain? Actually what you describe is a change change takes place in

Re: newbie question: if var1 == var2:

2008-11-29 Thread Reggie Dugard
On Fri, 2008-11-28 at 19:47 -0800, [EMAIL PROTECTED] wrote: > Hi All, > > I dont understand why the following code never finds "tree". The problem is that the lines you are reading from the file have a newline at the end so 'tree' != 'tree\n'. See below for suggested changes. > I could not find

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Joe Riopel
On Sat, Nov 29, 2008 at 3:44 PM, Josh <[EMAIL PROTECTED]> wrote: > Thanks in advance, There is no right, or wrong, answer to this question. Try one for a few weeks, force yourself to use it as exclusively as possible for all your text editing needs. After that, repeat that process with the other e

Re: Quick Newbie Question

2008-11-29 Thread Josh
alex23 wrote: On Nov 29, 5:09 pm, Josh <[EMAIL PROTECTED]> wrote: Can Python be used on one Linux machine to drive another Linux machine through SSH? I am currently running Putty on my XP box to run tests on a Linux box. I need to automate these tests and thought it would be fun to do so from

Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Josh
If you were a beginning programmer and willing to make an investment in steep learning curve for best returns down the road, which would you pick? I know this topic has been smashed around a bit already, but 'learning curve' always seems to be an arguement. If you feel that one is easier or ha

Re: Debugging in Python

2008-11-29 Thread Scott David Daniels
Stef Mientki wrote: The debugging ability of the Komodo IDE is _significantly_ better than the freely available debuggers. If you like the Komodo Editor, you'll love the debugger. hi Scott, can you tell us, > why Komodo debugger is better than PyScripter or even Winpdb(rpdb2) used in most py

Convert hexadecimal characters to ascii

2008-11-29 Thread Durand
Hi, I've got this weird problem where in some strings, parts of the string are in hexadecimal, or thats what I think they are. I'm not exactly sure...I get something like this: 's\x08 \x08Test!' from parsing a log file. From what I found on the internet, x08 is the backspace character but I'm s

Version upgrade blocked mentally

2008-11-29 Thread Adam E
I have read in my copy of Programming Python that all strings will be Unicode and there will be a byte type. This is mentally keeping me from upgrading to 2.6 . I'm curious, but are there still some who prefer Python 2.5? I don't mind constructive criticsm. -- http://mail.python.org/mailman/listi

Embedded Program Icon (wxPython)

2008-11-29 Thread Bart
Dear members, It's not (yet) easy to find my way through the bunch of info scattered over the internet to find out how to embed an icon. It could be that I’m looking at the wrong places, I'm new to Python and wxPython. Nevertheless, I would like to share this little script with the rest of the worl

Re: Debugging in Python

2008-11-29 Thread Stef Mientki
The debugging ability of the Komodo IDE is _significantly_ better than the freely available debuggers. If you like the Komodo Editor, you'll love the debugger. hi Scott, can you tell us, why Komodo debugger is better than PyScripter or even Winpdb(rpdb2) used in most python build IDE's ? th

How to Setup SFTP Server using twisted

2008-11-29 Thread Siah
The only implementation I could find is mangled with Zope. Anyone has any resources handy on the subject? Thank you in advanced, Sia -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows Installer testing using python.

2008-11-29 Thread Fuzzyman
On Nov 28, 10:02 am, kalyan <[EMAIL PROTECTED]> wrote: > Hi, > > How can we test Windows Installer using python. > Is there any module available for testing? > Please mail to [EMAIL PROTECTED] > > Thanks, > Kalyan. What do you need to test? We test our msi installers by automating them from Python

Re: Pycon 2009

2008-11-29 Thread Fuzzyman
On Nov 29, 4:22 am, r <[EMAIL PROTECTED]> wrote: > Sorry friend, i could not view your link, but if you are trying to > garner support for python nobody here cares. I have already been > lynched by the community for tying to promote python. > > see the > thread:http://groups.google.com/group/comp.

Re: PYTHONPATH in Windows

2008-11-29 Thread Diez B. Roggisch
waltbrad schrieb: PYTHONPATH is a concept I've never been able to get straight. I can't see the difference between this and just setting paths in the Windows environment variables. So, for the longest time I just never worried about it. Now, I'm going through James Bennett's "Practical Django P

Re: Python surpasses Perl in popularity?

2008-11-29 Thread Xah Lee
Great to see quality post from real expert once in a while. Thanks! Xah ∑ http://xahlee.org/ ☄ On Nov 29, 9:03 am, Stephane CHAZELAS <[EMAIL PROTECTED]> wrote: > There's a common confusion in this in the nature of /bin/sh. > There's no standard (neither POSIX nor Unix) that specifies that > /b

PYTHONPATH in Windows

2008-11-29 Thread waltbrad
PYTHONPATH is a concept I've never been able to get straight. I can't see the difference between this and just setting paths in the Windows environment variables. So, for the longest time I just never worried about it. Now, I'm going through James Bennett's "Practical Django Projects" and the iss

Re: unicode and hashlib

2008-11-29 Thread Scott David Daniels
Scott David Daniels wrote: ... If you now, and for all time, decide that the only source you will take is cp1252, perhaps you should decode to cp1252 before hashing. Of course my dyslexia sticks out here as I get encode and decode exactly backwards -- Marc 'BlackJack' Rintsch has it right. Cha

Re: Unicode regex and Hindi language

2008-11-29 Thread MRAB
Terry Reedy wrote: Martin v. Löwis wrote: To be fair to Python (and SRE), SRE predates TR#18 (IIRC) - atleast annex C was added somewhere between revision 6 and 9, i.e. in early 2004. Python's current definition of \w is a straight-forward extension of the historical \w definition (of Perl, I b

Re: 'new' module deprecation in python2.6

2008-11-29 Thread Scott David Daniels
David Pratt wrote: ... import new class FirstBase(object): foo = 'bar' biz = 'baz' class SecondBase(object): bla = 'blu' buz = 'brr' attr = { 'fiz': 'An attribute', 'fuz': 'Another one'} Test = new.classobj( ^^^ replace with: Test = type( 'Test', (FirstBase, Second

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Hey Christian. Many thanks for explanation. Clears that up :-) Regards, David On Nov 29, 2008, at 1:52 PM, Christian Heimes wrote: David Pratt wrote: Hi Mike. Many thanks for your reply and thank you for reference. I have code that looks like the following so initially looking at what wil

Re: Debugging in Python

2008-11-29 Thread Scott David Daniels
Vicent Giner wrote: As far as I've understood, [the free version of] ActivePython is just a [good, ready-to-work] Python distribution. Also, it contains and editor, PythonWin Editor. Has that editor the ability of performing good debugging tasks? I mean, is it enough for doing debugging? rudimen

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Rob. Sweet! Many thanks. Regards, David On Nov 29, 2008, at 1:46 PM, Rob Williscroft wrote: David Pratt wrote in news:mailman.4664.1227980181.3487.python- [EMAIL PROTECTED] in comp.lang.python: import new class FirstBase(object): foo = 'bar' biz = 'baz' class SecondBase(object):

Re: 'new' module deprecation in python2.6

2008-11-29 Thread Christian Heimes
David Pratt wrote: Hi Mike. Many thanks for your reply and thank you for reference. I have code that looks like the following so initially looking at what will need to be done as it doesn't appear new will survive. So first need to find way of translating this sort of thing using types. I see

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Yeah, can just use types.ClassType instead of new.classobj, but still wonder what happens when we get to python 3. Regards, David On Nov 29, 2008, at 1:04 PM, Michael Crute wrote: On Sat, Nov 29, 2008 at 11:52 AM, David Pratt <[EMAIL PROTECTED]> wrote: Can someone tell me why 'new' has bee

Re: 'new' module deprecation in python2.6

2008-11-29 Thread Rob Williscroft
David Pratt wrote in news:mailman.4664.1227980181.3487.python- [EMAIL PROTECTED] in comp.lang.python: > import new > > class FirstBase(object): > foo = 'bar' > biz = 'baz' > > class SecondBase(object): > bla = 'blu' > buz = 'brr' > > attr = { > 'fiz': 'An attribute', 'f

Re: 'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Hi Mike. Many thanks for your reply and thank you for reference. I have code that looks like the following so initially looking at what will need to be done as it doesn't appear new will survive. So first need to find way of translating this sort of thing using types. I see there is a Clas

Re: Unicode regex and Hindi language

2008-11-29 Thread Terry Reedy
Martin v. Löwis wrote: To be fair to Python (and SRE), SRE predates TR#18 (IIRC) - atleast annex C was added somewhere between revision 6 and 9, i.e. in early 2004. Python's current definition of \w is a straight-forward extension of the historical \w definition (of Perl, I believe), which, unfo

Re: newbie question: if var1 == var2:

2008-11-29 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: Hi All, I dont understand why the following code never finds "tree". I could not find the answer in the Python tutorials. Here is the code, test43.in, and runtime: #!/usr/bin/python fname = open("test43.in") var = 'tree' for item in fname: print "item: ", item,

Re: unicode and hashlib

2008-11-29 Thread Scott David Daniels
Jeff H wrote: ... Actually, what I am surprised by, is the fact that hashlib cares at all about the encoding. A md5 hash can be produced for an .iso file which means it can handle bytes, why does it care what it is being fed, as long as there are bytes. I would have assumed that it would take w

Re: Python surpasses Perl in popularity?

2008-11-29 Thread Stephane CHAZELAS
2008-11-29, 16:23(+00), Tam Ha: > Jorgen Grahn <[EMAIL PROTECTED]> wrote: >>(I could get away with using Bash in these cases. It has functions, >>local variables and so on. Writing portable Bourne shell is not as >>much fun.) > > Can you explain this? Bourne is always more portable than Bash. >

Re: 'new' module deprecation in python2.6

2008-11-29 Thread Michael Crute
On Sat, Nov 29, 2008 at 11:52 AM, David Pratt <[EMAIL PROTECTED]> wrote: > Can someone tell me why 'new' has been deprecated in python 2.6 and provide > direction for code that uses new for the future. > I find new is invaluable for some forms of automation. I don't see a > replacement for python 3

'new' module deprecation in python2.6

2008-11-29 Thread David Pratt
Can someone tell me why 'new' has been deprecated in python 2.6 and provide direction for code that uses new for the future. I find new is invaluable for some forms of automation. I don't see a replacement for python 3 either. Many thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode and hashlib

2008-11-29 Thread Marc 'BlackJack' Rintsch
On Sat, 29 Nov 2008 06:51:33 -0800, Jeff H wrote: > Actually, what I am surprised by, is the fact that hashlib cares at all > about the encoding. A md5 hash can be produced for an .iso file which > means it can handle bytes, why does it care what it is being fed, as > long as there are bytes. Bu

Re: Python surpasses Perl in popularity?

2008-11-29 Thread Tam Ha
Jorgen Grahn <[EMAIL PROTECTED]> wrote: >(I could get away with using Bash in these cases. It has functions, >local variables and so on. Writing portable Bourne shell is not as >much fun.) Can you explain this? Bourne is always more portable than Bash. That's why you'll find experienced shell

Re: Exhaustive Unit Testing

2008-11-29 Thread Roel Schroeven
Thanks for your answer. I still don't understand completely though. I suppose it's me, but I've been trying to understand some of this for quite some and somehow I can't seem to wrap my head around it. Steven D'Aprano schreef: On Sat, 29 Nov 2008 11:36:56 +0100, Roel Schroeven wrote: The firs

Re: double import protection - how to ?

2008-11-29 Thread Peter Otten
Helmut Jarausch wrote: > Peter Otten wrote: >> Helmut Jarausch wrote: >> >>> I have a module which gets imported at several different places >>> not all of which are under my control. >>> >>> How can I achieve that all/some statements within that module >>> get executed only at the very first im

Re: double import protection - how to ?

2008-11-29 Thread Fuzzyman
On Nov 29, 3:40 pm, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > Peter Otten wrote: > > Helmut Jarausch wrote: > > >> I have a module which gets imported at several different places > >> not all of which are under my control. > > >> How can I achieve that  all/some statements within that module > >

Re: Exhaustive Unit Testing

2008-11-29 Thread Fuzzyman
On Nov 29, 3:33 am, "Emanuele D'Arrigo" <[EMAIL PROTECTED]> wrote: > On Nov 29, 12:35 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > Your experiences are one of the reasons that writing the tests *first* > > can be so helpful. You think about the *behaviour* you want from your > > units and you test

Re: double import protection - how to ?

2008-11-29 Thread Helmut Jarausch
Peter Otten wrote: Helmut Jarausch wrote: I have a module which gets imported at several different places not all of which are under my control. How can I achieve that all/some statements within that module get executed only at the very first import? What you describe is Python's default be

Re: newbie question: if var1 == var2:

2008-11-29 Thread kirby urner
It's the newline after each word that's messing you up. var = "tree\n" ... or if item.strip() == var: ... etc. Kirby On Fri, Nov 28, 2008 at 7:47 PM, <[EMAIL PROTECTED]> wrote: > Hi All, > > I dont understand why the following code never finds "tree". > I could not find the answer in the Py

Re: newbie question: if var1 == var2:

2008-11-29 Thread Mike Howard
item = "tree\n" != 'tree' [EMAIL PROTECTED] wrote: Hi All, I dont understand why the following code never finds "tree". I could not find the answer in the Python tutorials. Here is the code, test43.in, and runtime: #!/usr/bin/python fname = open("test43.in") var = 'tree' for item in fname:

Re: HELP!...Google SketchUp needs a Python API

2008-11-29 Thread r
After careful consideration and much pondering of the subject, I will NOT retract my words. And I will give you truthful answers for my reasons. People have said that i ripped Ruby in my promotion of Python. This just IS NOT True. Lets go over the facts here, and let them speak louder than words.

Re: unicode and hashlib

2008-11-29 Thread Jeff H
On Nov 29, 8:27 am, Jeff H <[EMAIL PROTECTED]> wrote: > On Nov 28, 2:03 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > > > > > Jeff H wrote: > > > hashlib.md5 does not appear to like unicode, > > >   UnicodeEncodeError: 'ascii' codec can't encode character u'\xa6' in > > > position 1650: ordinal not

Re: unicode and hashlib

2008-11-29 Thread Jeff H
On Nov 28, 2:03 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Jeff H wrote: > > hashlib.md5 does not appear to like unicode, > >   UnicodeEncodeError: 'ascii' codec can't encode character u'\xa6' in > > position 1650: ordinal not in range(128) > > It is the (default) ascii encoder that does not like

Re: unicode and hashlib

2008-11-29 Thread Jeff H
On Nov 28, 1:24 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Jeff H wrote: > > hashlib.md5 does not appear to like unicode, > >   UnicodeEncodeError: 'ascii' codec can't encode character u'\xa6' in > > position 1650: ordinal not in range(128) > > > After googling, I've found BDFL and others

Re: newbie question: if var1 == var2:

2008-11-29 Thread filtered
Any reason for posting such an issue to the account list? Pillock! On Sat, Nov 29, 2008 at 4:47 AM, <[EMAIL PROTECTED]> wrote: > Hi All, > > I dont understand why the following code never finds "tree". > I could not find the answer in the Python tutorials. > Here is the code, test43.in, and runti

Re: Python docs and enumeration of sections

2008-11-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Kay Schluehr <[EMAIL PROTECTED]> wrote: > >Is there a reason why enumeration of sections and subsections has been >dropped after the switch to the Sphinx documentation tool? > >It doesn't really make quoting library sections easier or do you know >what I mean when I

Re: python.org coming back as unreachable in Dillo (IPv6 routing error?)

2008-11-29 Thread Tim Chase
You shouldn't need to do anything. It should be no problem that you can't reach www.python.org through IPv6, since all your applications will immediately fall back to using IPv4 on their own. It may be that some application misbehaves, i.e. it tries to get an IPv6 connection, which it can't, and

Re: double import protection - how to ?

2008-11-29 Thread Peter Otten
Helmut Jarausch wrote: > I have a module which gets imported at several different places > not all of which are under my control. > > How can I achieve that  all/some statements within that module > get executed only at the very first import? What you describe is Python's default behaviour. A mo

  1   2   >