Re: Quick Newbie Question

2008-11-28 Thread alex23
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 a Linux V

Re: Windows Installer testing using python.

2008-11-28 Thread L. Lindstrom
kalyan wrote: Hi, How can we test Windows Installer using python. Is there any module available for testing? Please mail to [EMAIL PROTECTED] Thanks, Kalyan. For anyone interested, a Python Database API 2.0 module for Windows Installer is in SVN under the Pygame project: svn co svn://seul.

Quick Newbie Question

2008-11-28 Thread Josh
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 a Linux VMWare Image I recently setup. Does this sound do-able wit

Re: Pycon 2009

2008-11-28 Thread r
do you have any suggestions where? I am not as versed as you in Usenet. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 11:51 pm, Carl Banks > Absolute versus relative imports don't have anything to do with the > issue here.  PEP 328 concerns itself with imports relative to the > executing module in package space.  It has nothing to do with imports > relative to the current directory in filename space.

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 2:59 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Carl Banks <[EMAIL PROTECTED]> writes: > > On Nov 28, 3:15 am, Ben Finney <[EMAIL PROTECTED]> > > wrote: > > > This is resolved in the Python 2.x series by implementing PEP 328 > > > http://www.python.org/dev/peps/pep-0328/>, such that the

Re: Pycon 2009

2008-11-28 Thread alex23
On Nov 29, 2:22 pm, 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. You know what would be great? If the two of you found som

Re: File paths printed in stack trace are where Python was built???

2008-11-28 Thread Steven D'Aprano
On Fri, 28 Nov 2008 19:22:11 -0800, Roy Smith wrote: > We distribute Python internally by building it in one place, and then > distributing images of the entire install area to wherever it's needed. > I just noticed something strange; when I got an error which caused a > stack trace, the file pat

Everything is here.

2008-11-28 Thread ranjith
"if not now, then when If not you, then who" Anyone can succeed in their life. This is your friend Ranjith and a useful info please visit www.tiketin.blogspot.com. You can get everything here. A to Z available here on your pc. Visit www.tiketin.blogspot.com -- http://mail.python.org/mailman/listin

Re: Two attributes! Why?

2008-11-28 Thread Steven D'Aprano
On Fri, 28 Nov 2008 19:22:42 -0800, Emanuele D'Arrigo wrote: > Hi everybody, > > I'm having a naming/scoping/mangling issue. I have a class like this: > > class MyClass(object): > __init__(self): > self.__myAttribute = None > > def myMethod(self, aValue): > attribute

Re: File paths printed in stack trace are where Python was built???

2008-11-28 Thread Kevin Kelley
Actually, if you to get an error from a module built with zipimport it points to where that module was built as well. Kevin On Fri, Nov 28, 2008 at 9:22 PM, Roy Smith <[EMAIL PROTECTED]> wrote: > We distribute Python internally by building it in one place, and then > distributing images of the e

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

2008-11-28 Thread r
Look what you made the BDFL do!! Now he is sending Python to hell! :) -- http://mail.python.org/mailman/listinfo/python-list

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

2008-11-28 Thread r
Arron, i give you an A++ just for writing a longer post than me =D -- http://mail.python.org/mailman/listinfo/python-list

Re: Pycon 2009

2008-11-28 Thread r
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.lang.python/browse_thread/thread/0c403b827231b9a4?hl=en# Yo

Re: newbie question: if var1 == var2:

2008-11-28 Thread alex23
On Nov 29, 1:53 pm, [EMAIL PROTECTED] wrote: > I dont understand why the following code cannot find the > variable "tree". > > fname = open("test43.in") > var = 'tree' > > for item in fname: This will include the EOL character for each line. Try adding the following line here: item = item.s

Re: newbie question: if var1 == var2:

2008-11-28 Thread Mel
[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("test43.in") > va

newbie question: if var1 == var2:

2008-11-28 Thread joemacbusiness
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("test43.in") var = 'tree' for item in fname: print "item

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

2008-11-28 Thread Ross Ridge
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > Given three or four mis-spellings just in the "from:" header data... Which were obviously intentional. >This doesn't even pass as an attempt at humor... I found it midly amusing, which is more than can be said for any other post in this threa

Re: Exhaustive Unit Testing

2008-11-28 Thread Emanuele D'Arrigo
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 for that behaviour - *then* you write the code > until the tests pass. Than

Two attributes! Why?

2008-11-28 Thread Emanuele D'Arrigo
Hi everybody, I'm having a naming/scoping/mangling issue. I have a class like this: class MyClass(object): __init__(self): self.__myAttribute = None def myMethod(self, aValue): attributeName = "__myAttribute" setattr(self, attributeName, aValue) It all looks

File paths printed in stack trace are where Python was built???

2008-11-28 Thread Roy Smith
We distribute Python internally by building it in one place, and then distributing images of the entire install area to wherever it's needed. I just noticed something strange; when I got an error which caused a stack trace, the file paths in the printed stack trace refer to the directory where Pyt

Re: Exhaustive Unit Testing

2008-11-28 Thread Emanuele D'Arrigo
Thank you to everybody who has replied about the original problem. I eventually refactored the whole (monster) method over various smaller and simpler ones and I'm now testing each individually. Things have gotten much more tractable. =) Thank you for nudging me in the right direction! =) Manu --

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

2008-11-28 Thread r
Let me clear up a few things. Sometimes when you read a post you can mis-interpret the posters feelings(i have been guilty of this myself, I took Chris's post the wrong way when he was clearly not being rude) 1.) Do i personally like Ruby? No 2.) Do i want to remove Ruby from the world? No 3.) Do

Re: Pycon 2009

2008-11-28 Thread alex23
On Nov 29, 7:39 am, Sad and Confused <[EMAIL PROTECTED]> wrote: > http://lifeflowcharts.appspot.com/?num_visible_rows=20&scroll_offsets... Nice flamebait. Once again, because for some reason it seems like for a subset of people they find this concept really difficult to grasp: your interests and

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

2008-11-28 Thread Tommy Grav
From the long header: X-Read-This:This message is not from GvR the creator of Python. My guess i My guess is that r is behind this himself. Tommy On Nov 28, 2008, at 7:56 PM, Dennis Lee Bieber wrote: On 29 Nov 2008 00:26:06 GMT, Giudo von Rossom <[EMAIL PROTECTED]> declaimed the f

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

2008-11-28 Thread Chris Rebert
On Thu, Nov 27, 2008 at 4:09 PM, r <[EMAIL PROTECTED]> wrote: > On Nov 27, 5:42 pm, r <[EMAIL PROTECTED]> wrote: >> On Nov 27, 5:38 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: >> > On Thu, Nov 27, 2008 at 3:33 PM, r <[EMAIL PROTECTED]> wrote: >> > > On Nov 27, 5:27 pm, "Chris Rebert" <[EMAIL PROT

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

2008-11-28 Thread Chris Rebert
On Fri, Nov 28, 2008 at 9:52 AM, r <[EMAIL PROTECTED]> wrote: >> and we're not throwing ourselves at your pet project because most of us >> don't give a monkey's toss about Sketchup. > Why should we put our time and >> energy into a piece of software that we don't care about? > > AGAIN, I'm NOT a

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

2008-11-28 Thread r
Terry, are you saying you want to join the push for Python? i would love to have you aboard! -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting in to metaprogramming

2008-11-28 Thread Aaron Brady
On Nov 27, 8:21 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: snip > body = 'L.append(None)\n' > make_file('dumb.py', 'Create a big list the dumb way.', >     'L = []\n', body*numitems) > make_file('smart.py', 'Create a big list the smart way.', >     '', 'L = [None]*%d\n' % num

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

2008-11-28 Thread Tim Chase
Though only semi-Python related, it impacts me because I (until recently) use Dillo at home for browsing docs.python.org. I'm trying to figure out if something network-related changed. Within the last week or two (time-frame is fuzzy), it seems that something changed and I now get "Network unr

Re: Getting in to metaprogramming

2008-11-28 Thread Aaron Brady
On Nov 27, 9:28 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: >  "Aaron Brady" <[EMAIL PROTECTED]> wrote: ... > >As you can see, the 'visit' method is mechanical for classes A and B. > >One might want to autogenerate those in some languages, but Python has > >introspection: > > >class BaseAB:

Re: Using thread in an asyncronous application

2008-11-28 Thread Aaron Brady
On Nov 27, 9:03 am, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > Hi, > I'm the maintainer of an asynchronous FTP server implementation based > on asyncore. > Some days ago I thought it would be interesting to add a class > offering the possibility to run the asyncore loop into a thread so > tha

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

2008-11-28 Thread Aaron Brady
On Nov 27, 9:45 pm, r <[EMAIL PROTECTED]> wrote: > On Nov 27, 9:31 pm, alex23 <[EMAIL PROTECTED]> wrote: > > On Nov 28, 12:49 pm, r <[EMAIL PROTECTED]> wrote: > > > Well... 3 for Ruby 1 for python. Not looking good so far. Any more > > > votes? > > > I don't see -any- of the responses in this threa

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

2008-11-28 Thread MRAB
Dennis Lee Bieber wrote: On 29 Nov 2008 00:26:06 GMT, Giudo von Rossom <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: Given three or four mis-spellings just in the "from:" header data... This doesn't even pass as an attempt at humor... > It's not comparable to the Parr

Re: Exhaustive Unit Testing

2008-11-28 Thread Fuzzyman
On Nov 27, 4:32 pm, "Emanuele D'Arrigo" <[EMAIL PROTECTED]> wrote: > On Nov 27, 5:00 am, Steven D'Aprano > > <[EMAIL PROTECTED]> wrote: > > Refactor until your code is simple enough to unit-test effectively, then > > unit-test effectively. > > Ok, I've taken this wise suggestion on board and of cou

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

2008-11-28 Thread Giudo von Rossom
On Fri, 28 Nov 2008 15:22:58 -0800, r wrote: > You know I said before that I hoped Guido never see's this thread...but > i wonder if maybe he should see it...To see how far the "great > advocates" have fallen. I am disappointed to say the least. I would not > want to be in his shoes and see this!

Re: Unicode regex and Hindi language

2008-11-28 Thread MRAB
John Machin wrote: On Nov 29, 2:47 am, Shiao <[EMAIL PROTECTED]> wrote: The regex below identifies words in all languages I tested, but not in Hindi: pat = re.compile('^(\w+)$', re.U) ... m = pat.search(l.decode('utf-8')) [example snipped] From this is assumed that the Hindi text contain

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

2008-11-28 Thread r
Terry, In my haste I may have miss-read your post...Are you saying that there are people who WOULD support Python in SketchUp? Are you one of them? Can you tell me who else may be interested? How can i contact these people? -- http://mail.python.org/mailman/listinfo/python-list

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

2008-11-28 Thread r
Terry, I in my haste I may have miss-read your post...Are you saying that there are people who WOULD support Python in SketchUp? Are you one of them? Can you tell me who else may be interested? How can i contact these people? -- http://mail.python.org/mailman/listinfo/python-list

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

2008-11-28 Thread Benjamin Kaplan
On Fri, Nov 28, 2008 at 6:22 PM, r <[EMAIL PROTECTED]> wrote: > You know i wonder how many people saw that the link to the OP had > 30,40 replies and they said...WOW it looks like the community is > getting behind a project to host Python, I had better check this out! > Then when they opened the l

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

2008-11-28 Thread r
You know i wonder how many people saw that the link to the OP had 30,40 replies and they said...WOW it looks like the community is getting behind a project to host Python, I had better check this out! Then when they opened the link and saw all the negative responses from well known posters...either

Re: Unicode regex and Hindi language

2008-11-28 Thread John Machin
On Nov 29, 2:47 am, Shiao <[EMAIL PROTECTED]> wrote: > The regex below identifies words in all languages I tested, but not in > Hindi: > pat = re.compile('^(\w+)$', re.U) > ... >m = pat.search(l.decode('utf-8')) [example snipped] > > From this is assumed that the Hindi text contains punctuatio

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

2008-11-28 Thread r
You know i wonder how many people saw that the link to the OP had 30,40 replies and they said...WOW it looks like the community is getting behind a project to host Python, I had better check this out! Then when they opened the link and saw all the negative responses from well known posters...either

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

2008-11-28 Thread r
OK people, where back to 2 for Python and i will not even mention the one's against. I thought Terry was 50% onboard but he has just made his choice known. I would have liked to have you on board Terry, and will forgive if you change your mind. -- http://mail.python.org/mailman/listinfo/python-li

Re: Tools for using virtual environments and PEP 370

2008-11-28 Thread Дамјан Георгиевски
> Python 2.6 implemented PEP 370: Per-user site-packages Directory Ok, you can completelly replace virtualenv with a) setting PYTHONUSERBASE= b) Editing ~/.pydistutils.cfg to be like: [install] user=True After this, installing new packages go to $PYTHONUSERBASE/lib/python2.6/si

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

2008-11-28 Thread Terry Reedy
r wrote: On Nov 28, 4:32 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: Are you trolling? Are you some sort of agent provocateur trying to put people *against* the idea of Python > scripting for Sketchup? If not, you're sure doing an excellent imitation of one. I

Pycon 2009

2008-11-28 Thread Sad and Confused
http://lifeflowcharts.appspot.com/?num_visible_rows=20&scroll_offsets=%5B0%2C+0%2C+0%2C+0%2C+0%2C+0%2C+0%2C+0%2C+0%2C+5%5D&translate_x_ff=74&translate_x_ie=-69&num_visible_cols=8&translate_y_ie=374&child_order=reverse_time&translate_y_ff=-364&scale_xy_ff=1.0002&db_key=ag5saWZlZmxvd2NoYX

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

2008-11-28 Thread George Sakkis
On Nov 28, 4:16 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Now, up up and away into my killfilter, Ditto; apparently it's either a troll or an 8-year old. George -- http://mail.python.org/mailman/listinfo/python-list

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

2008-11-28 Thread r
Oh Python, where art thy faithful followers, thy house is crumbling, thy last breath spent, thy season draweth nigh...Ye have fought bravely for all that is good. But ye are encompassed on all sides by evil. Those who proclaim to love you are only the very same who seek your end! Weep oh lovers of

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

2008-11-28 Thread Diez B. Roggisch
r schrieb: The fact _you_ don't like Ruby doesn't make it a bad language. If what you want is a Python API to SketchUp, bashing Ruby certainly won't help - quite on the contrary. And it won't help promoting Python neither. Thanks Bruno, I never said Ruby is a bad Language! -food for though

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

2008-11-28 Thread Diez B. Roggisch
r schrieb: The fact _you_ don't like Ruby doesn't make it a bad language. If what you want is a Python API to SketchUp, bashing Ruby certainly won't help - quite on the contrary. And it won't help promoting Python neither. Thanks Bruno, I never said Ruby is a bad Language! -food for though

Re: Unicode regex and Hindi language

2008-11-28 Thread Terry Reedy
MRAB wrote: Should the Mc and Mn codepoints match \w in the re module even though u'हिन्दी'.isalpha() returns False (in Python 2.x, haven't tried Python 3.x)? Same. And to me, that is wrong. The condensation of vowel characters (which Hindi, etc, also have for words that begin with vowels)

Re: Installing NumPy and SciPy in Python 2.6

2008-11-28 Thread David Cournapeau
On Sat, Nov 29, 2008 at 4:31 AM, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Vicent Giner wrote: >> >> I've installed Python 2.6 in my Windows XP. Actually, I've installed >> ActiveState's ActivePython 2.6. >> >> I would like to use NumPy and SciPy. >> >> Are those packages compatible with ver

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

2008-11-28 Thread r
On Nov 28, 2:43 pm, r <[EMAIL PROTECTED]> wrote: > On Nov 28, 2:24 pm, [EMAIL PROTECTED] wrote: > > > > > On Nov 28, 6:15 am, Bruno Desthuilliers > > [EMAIL PROTECTED]> wrote: > > > r a écrit : > > > > On Nov 28, 12:52 am, [EMAIL PROTECTED] wrote: > > > >> On Nov 27, 10:28 pm, r <[EMAIL PROTECTED]

Re: Creating classes and objects more than once?

2008-11-28 Thread Ben Finney
Carl Banks <[EMAIL PROTECTED]> writes: > On Nov 28, 3:15 am, Ben Finney <[EMAIL PROTECTED]> > wrote: > > This is resolved in the Python 2.x series by implementing PEP 328 > > http://www.python.org/dev/peps/pep-0328/>, such that the > > search path for ‘import’ does *not* contain the current direct

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

2008-11-28 Thread r
On Nov 28, 2:24 pm, [EMAIL PROTECTED] wrote: > On Nov 28, 6:15 am, Bruno Desthuilliers > > > [EMAIL PROTECTED]> wrote: > > r a écrit : > > > On Nov 28, 12:52 am, [EMAIL PROTECTED] wrote: > > >> On Nov 27, 10:28 pm, r <[EMAIL PROTECTED]> wrote: > > > >>> To think...that I would preach freedom to th

Re: Confused about class relationships

2008-11-28 Thread Tim Roberts
John O'Hagan <[EMAIL PROTECTED]> wrote: > >Apologies if this is a D.Q., I'm still learning to use classes, and this >little problem has proved too specific to find in the tutorials. > >I have two classes with a relationship that I find confusing. > >One is called Engine, and it has a method (bar_

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

2008-11-28 Thread rurpy
On Nov 28, 6:15 am, Bruno Desthuilliers wrote: > r a écrit : > > On Nov 28, 12:52 am, [EMAIL PROTECTED] wrote: > >> On Nov 27, 10:28 pm, r <[EMAIL PROTECTED]> wrote: > > >>> To think...that I would preach freedom to the slaves and be lynched > >>> for it...IS MADNESS! > >>> Not one vote for Python

Re: unicode and hashlib

2008-11-28 Thread Paul Boddie
On 28 Nov, 21:03, Terry Reedy <[EMAIL PROTECTED]> wrote: > > It is the (default) ascii encoder that does not like non-ascii chars. > I suspect that is you encode to bytes first with an encoder that does > work (latin-???), md5 will be happy. I know that the "Python roadmap" answer to such question

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

2008-11-28 Thread r
On Nov 28, 4:32 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > Are you trolling? Are you some sort of agent provocateur trying to put people > *against* the idea of Python > scripting for Sketchup? If not, > you're sure doing an excellent imitation of one. I am the

Re: unicode and hashlib

2008-11-28 Thread Terry Reedy
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 non-ascii chars. I suspect that is you encode to bytes first with an enc

Re: Unicode regex and Hindi language

2008-11-28 Thread MRAB
Terry Reedy wrote: Jerry Hill wrote: On Fri, Nov 28, 2008 at 10:47 AM, Shiao <[EMAIL PROTECTED]> wrote: The regex below identifies words in all languages I tested, but not in Hindi: # -*- coding: utf-8 -*- import re pat = re.compile('^(\w+)$', re.U) langs = ('English', '中文', 'हिन्दी') I thi

Re: Installing NumPy and SciPy in Python 2.6

2008-11-28 Thread Scott David Daniels
Vicent Giner wrote: I've installed Python 2.6 in my Windows XP. Actually, I've installed ActiveState's ActivePython 2.6. I would like to use NumPy and SciPy. Are those packages compatible with version 2.6 of Python? I believe there is more work to do on Scipy and Numpy before they will run on

Re: Unicode regex and Hindi language

2008-11-28 Thread Terry Reedy
Jerry Hill wrote: On Fri, Nov 28, 2008 at 10:47 AM, Shiao <[EMAIL PROTECTED]> wrote: The regex below identifies words in all languages I tested, but not in Hindi: # -*- coding: utf-8 -*- import re pat = re.compile('^(\w+)$', re.U) langs = ('English', '中文', 'हिन्दी') I think the problem is th

Re: unicode and hashlib

2008-11-28 Thread MRAB
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 on Py3K talking about the problems of hashing non-bytes (i.e. buffers) http://www.m

Re: Installing NumPy and SciPy in Python 2.6

2008-11-28 Thread Blind Anagram
"Vicent Giner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Sorry if my question was already asked and answered, but I can't manage with this... I've installed Python 2.6 in my Windows XP. Actually, I've installed ActiveState's ActivePython 2.6. I would like to use NumPy and SciP

Re: unicode and hashlib

2008-11-28 Thread Scott David Daniels
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 on Py3K talking about the problems of hashing non-bytes (i.e. buffers) ... Unicode

Re: Installing NumPy and SciPy in Python 2.6

2008-11-28 Thread Benjamin Kaplan
On Fri, Nov 28, 2008 at 1:20 PM, Vicent Giner <[EMAIL PROTECTED]> wrote: > Sorry if my question was already asked and answered, but I can't > manage with this... > > I've installed Python 2.6 in my Windows XP. Actually, I've installed > ActiveState's ActivePython 2.6. > > I would like to use NumPy

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

2008-11-28 Thread r
Thanks again alex23, but did you not already post the exact same thing, can you not engage in intellectual conversation, or have you spent your last penny? -- http://mail.python.org/mailman/listinfo/python-list

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

2008-11-28 Thread r
On Nov 28, 11:52 am, r <[EMAIL PROTECTED]> wrote: > > and we're not throwing ourselves at your pet project because most of us > > don't give a monkey's toss about Sketchup. > Why should we put our time and > > energy into a piece of software that we don't care about? > > AGAIN, I'm NOT asking you

filter func chaining

2008-11-28 Thread Drew Schaeffer
I am trying to chain filter functions together so I created these 2 functions. def AndChain(*filters): return (lambda asset: reduce((lambda r, f: apply(f, asset) and r), filters)) def OrChain(*filters): return (lambda asset: reduce((lambda r, f: apply(f, asset) or r), filters)) Where fil

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

2008-11-28 Thread r
> The fact _you_ don't like Ruby doesn't make it a bad language. If what > you want is a Python API to SketchUp, bashing Ruby certainly won't help > - quite on the contrary. And it won't help promoting Python neither. Thanks Bruno, I never said Ruby is a bad Language! do you what IMHO means?? For

Installing NumPy and SciPy in Python 2.6

2008-11-28 Thread Vicent Giner
Sorry if my question was already asked and answered, but I can't manage with this... I've installed Python 2.6 in my Windows XP. Actually, I've installed ActiveState's ActivePython 2.6. I would like to use NumPy and SciPy. Are those packages compatible with version 2.6 of Python? Are they alrea

Python Library to display detail hardware information

2008-11-28 Thread Hanny Wibisono
Is there any python library that display very detailed hardware information and it must run in linux environtment ? Example (skip xml tag) Phoenix Technologies NAPA0001.86C.0049.D.0612081421 12/08/06 Intel(R) Core(TM) Duo CPU T2350 @ 1.86GHz Intel(R) Core(TM) Duo CPU T2350 @ 1.86

Re: time function problem

2008-11-28 Thread MRAB
willie wrote: My code: from time import time def leibniz(terms): acc = 0.0 num = 4.0 # numerator value remains constant in the series den = 1 count = 0 start_time = 0.0 for aterm in range(terms): nextterm = num/den * (-1)**aterm # (-1) allows fractions to alter

Re: Exhaustive Unit Testing

2008-11-28 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Terry Reedy: A 'function' only needs to be nested if it is intended to be different (different default or closure) for each execution of its def.< Or maybe because you want to denote a logical nesting, or maybe because you want to keep the outer namespace cleaner,

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

2008-11-28 Thread r
> and we're not throwing ourselves at your pet project because most of us don't > give a monkey's toss about Sketchup. > Why should we put our time and energy > into a piece of software that we don't care about? AGAIN, I'm NOT asking you to support SKETCHUP I am asking for support for PYTHON! Di

Re: setting path for python interpretor

2008-11-28 Thread Philip Semanchuk
On Nov 28, 2008, at 6:41 AM, Beema Shafreen wrote: Hi all, Can any body suggest me how to the set path for making python2.4 as the main interpretor instead of python 2.5. Hi Beema, This question is about your operating system, not about Python. On my system (OS X), having installed Pytho

Re: Unicode regex and Hindi language

2008-11-28 Thread Jerry Hill
On Fri, Nov 28, 2008 at 10:47 AM, Shiao <[EMAIL PROTECTED]> wrote: > The regex below identifies words in all languages I tested, but not in > Hindi: > > # -*- coding: utf-8 -*- > > import re > pat = re.compile('^(\w+)$', re.U) > langs = ('English', '中文', 'हिन्दी') I think the problem is that the H

Re: Unicode regex and Hindi language

2008-11-28 Thread Peter Otten
Shiao wrote: > The regex below identifies words in all languages I tested, but not in > Hindi: > > # -*- coding: utf-8 -*- > > import re > pat = re.compile('^(\w+)$', re.U) > langs = ('English', '中文', 'हिन्दी') > > for l in langs: > m = pat.search(l.decode('utf-8')) > print l, m and m.g

Re: Great exercise for python expert !

2008-11-28 Thread manatlan
On 28 nov, 16:53, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > I just want to make a jquery wrapper, and let people use it to write > > jquery call on the server side in a python way ... > > > o is a object, imagine a widget : like a textarea or input box > > "js" is a special attribut of "o",

Re: Great exercise for python expert !

2008-11-28 Thread manatlan
On 28 nov, 17:12, Peter Otten <[EMAIL PROTECTED]> wrote: > manatlan wrote: > > To explain better, here is another code > > class JQueryCaller(object): > >     def __init__(self,callback): > >         self.__callback=callback > >         self._s=[] > > >     def __getattr__(self,name): > >         d

web services ssl client

2008-11-28 Thread Luca Tebaldi
Hi, should I build a client for web services that require authentication based on a ca (pem and crt), I'm trying to use soappy but not work... someone have any idea or can tell me where to find a tutorial? tnx a lot! Luca -- skype:luca.tebaldi bookmark: http://del.icio.us/lucatebaldi foto: http

Re: Great exercise for python expert !

2008-11-28 Thread Peter Otten
manatlan wrote: > To explain better, here is another code > class JQueryCaller(object): >     def __init__(self,callback): >         self.__callback=callback >         self._s=[] > >     def __getattr__(self,name): >         def _caller(*args): >             sargs=["'%s'"%i for i in args] >    

unicode and hashlib

2008-11-28 Thread Jeff H
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 on Py3K talking about the problems of hashing non-bytes (i.e. buffers) http://www.mail-archive.com/

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 3:24 am, Viktor Kerkez <[EMAIL PROTECTED]> wrote: > On Nov 28, 9:35 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > > However, I'm not so sure the effect of os.chdir() on the import path > > is a good idea. > > I'm not actually using os.chidir(), I just used it here to create a > clearer e

Re: Great exercise for python expert !

2008-11-28 Thread Diez B. Roggisch
Steven D'Aprano wrote: > On Fri, 28 Nov 2008 02:36:28 -0800, manatlan wrote: > >> I'd like to make a "jquery python wrapper" > [...] >> here is my code : > [...] > > What is the purpose of this code? As near as I can see, it would make an > excellent entry to the Obfuscated Python Competition, e

Re: Great exercise for python expert !

2008-11-28 Thread Diez B. Roggisch
> > I just want to make a jquery wrapper, and let people use it to write > jquery call on the server side in a python way ... > > o is a object, imagine a widget : like a textarea or input box > "js" is a special attribut of "o", which will let you write javascript > for this object. > > o=MyObj

Unicode regex and Hindi language

2008-11-28 Thread Shiao
The regex below identifies words in all languages I tested, but not in Hindi: # -*- coding: utf-8 -*- import re pat = re.compile('^(\w+)$', re.U) langs = ('English', '中文', 'हिन्दी') for l in langs: m = pat.search(l.decode('utf-8')) print l, m and m.group(1) Output: English English 中文 中

Help with regular expression patterns

2008-11-28 Thread Michel Perez
Hi: i'm so newbie in python that i don't get the right idea about regular expressions. This is what i want to do: Extract using python some information and them replace this expresion for others, i use as a base the wikitext and this is what i do: paragraphs = """ = Test '''wikitest'''= [[Image

Re: Great exercise for python expert !

2008-11-28 Thread manatlan
On 28 nov, 15:49, George Sakkis <[EMAIL PROTECTED]> wrote: > On Nov 28, 9:19 am, manatlan <[EMAIL PROTECTED]> wrote: > > > > > On 28 nov, 14:58, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > On Nov 28, 5:36 am, manatlan <[EMAIL PROTECTED]> wrote: > > > > > I'd like to make a "jquery python wrapp

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 3:15 am, Ben Finney <[EMAIL PROTECTED]> wrote: > Carl Banks <[EMAIL PROTECTED]> writes: > > I like to think that "import abc" always does the same thing > > regardless of any seemingly unrelated state changes of my program, > > especially since, as the OP pointed out, import is used as a

Re: Great exercise for python expert !

2008-11-28 Thread Steven D'Aprano
On Fri, 28 Nov 2008 02:36:28 -0800, manatlan wrote: > I'd like to make a "jquery python wrapper" [...] > here is my code : [...] What is the purpose of this code? As near as I can see, it would make an excellent entry to the Obfuscated Python Competition, except it isn't clear that it does any

Re: Great exercise for python expert !

2008-11-28 Thread George Sakkis
On Nov 28, 9:19 am, manatlan <[EMAIL PROTECTED]> wrote: > On 28 nov, 14:58, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Nov 28, 5:36 am, manatlan <[EMAIL PROTECTED]> wrote: > > > > I'd like to make a "jquery python wrapper" ... > > > > here is my code : > > >

Re: Great exercise for python expert !

2008-11-28 Thread manatlan
On 28 nov, 15:19, manatlan <[EMAIL PROTECTED]> wrote: > On 28 nov, 14:58, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Nov 28, 5:36 am, manatlan <[EMAIL PROTECTED]> wrote: > > > > I'd like to make a "jquery python wrapper" ... > > > > here is my code : > > > ===

Re: Great exercise for python expert !

2008-11-28 Thread manatlan
On 28 nov, 14:58, George Sakkis <[EMAIL PROTECTED]> wrote: > On Nov 28, 5:36 am, manatlan <[EMAIL PROTECTED]> wrote: > > > > > I'd like to make a "jquery python wrapper" ... > > > here is my code : > > === > > #!/usr/bin/env python > >

Re: Great exercise for python expert !

2008-11-28 Thread George Sakkis
On Nov 28, 5:36 am, manatlan <[EMAIL PROTECTED]> wrote: > I'd like to make a "jquery python wrapper" ... > > here is my code : > === > #!/usr/bin/env python > # -*- coding: utf-8 -*- > > class JQueryCaller(object): >     def __init__(s

Re: Exhaustive Unit Testing

2008-11-28 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Nigel Rantor <[EMAIL PROTECTED]> wrote: > Roy Smith wrote: > > > > There's a well known theory in studies of the human brain which says people > > are capable of processing about 7 +/- 2 pieces of information at once. > > It's not about processing multiple tak

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

2008-11-28 Thread Bruno Desthuilliers
r a écrit : On Nov 28, 12:52 am, [EMAIL PROTECTED] wrote: On Nov 27, 10:28 pm, r <[EMAIL PROTECTED]> wrote: To think...that I would preach freedom to the slaves and be lynched for it...IS MADNESS! Not one vote for Python, not a care. I think everyone here should look deep within their self and

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

2008-11-28 Thread Bruno Desthuilliers
r a écrit : (snip) Unfortunatly though SketchUp currently uses Ruby(sorry to use profanity) (snip) language for scripting on both the free and pro versions. IMHO...and you will probably agree... programming with Ruby is neither fun or efficient. Don't get me wrong i am not knocking Ruby.

  1   2   >