Toronto PyCamp 2010

2010-07-16 Thread Chris Calloway
The University of Toronto Department of Physics brings PyCamp to Toronto on Monday, August 30 through Friday, September 3, 2010. Register today at http://trizpug.org/boot-camp/torpy10/ For beginners, this ultra-low-cost Python Boot Camp makes you productive so you can get your work done

Re: Possible to include \n chars in doctest code samples or output?

2010-07-16 Thread Steven D'Aprano
On Fri, 16 Jul 2010 01:26:40 -0400, python wrote: Thomas, Recall that doctest doesn't parse the code, it extracts the docstrings. And docstrings are just strings, and are parsed like strings. I understand what you're saying, but I'm struggling with how to represent the following strings

Re: Worship We Must

2010-07-16 Thread Mithrandir
On Tue, 13 Jul 2010 01:32:42 -0700, geremy condra wrote: I'm sure you're aware that the shuffle of so-called 'conflict truffles' is highly illegal, not to mention unethical. I'm shocked you would advocate it publicly. Geremy Condra Ignore them. It's just Google Groups spam. :( --

Assembler Book - Read or Download Individual Chapters - Volume 5 Chapter One: Thunks

2010-07-16 Thread nanothermite911fbibustards
Assembler Book - Read or Download Individual Chapters Table of Contents and Index Short Table of Contents (44KB) PDF File Full Table of Contents (408KB) PDF File Index (724KB) PDF File Volume One - Data Representation (40K) Chapter One: Foreward

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-16 Thread Heikki Toivonen
On 07/13/2010 02:18 PM, Adam Mercer wrote: I'm trying to build M2Crypto on Mac OS X 10.6.4 against python2.5 (python2.6 fails in the same way), with SWIG 2.0.0 and OpenSSL 1.0.0a and it is failing with the following: That version of M2Crypto does not work with OpenSSL 1.0.x because OpenSSL

Re: Rapidly navigating buffers using search

2010-07-16 Thread nanothermite911fbibustards
On Jul 11, 10:27 am, Xah Lee xah...@gmail.com wrote: you are a victum of the Microsoft hatred. A hatred spread by, Richard M Stallman, and much of the unix people (although we should remember that Richard Stallman hated unix, if not more thanMicrosoft, and thehatredof unix was a major reason

Microsoft Hatred, Richard Matthew Stallman, Bill Gates, Larry Ellison, ORACLE

2010-07-16 Thread nanothermite911fbibustards
On Jul 16, 12:15 am, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: On Jul 11, 10:27 am, Xah Lee xah...@gmail.com wrote: you are a victum of the Microsoft hatred. A hatred spread by, Richard M Stallman, and much of the unix people (although we should remember that

CONVICTED RAPIST of 13y old girl Semantha Geimer, ROMAN POLANSKY is RELEASED by a KANGAROO court in Switzerland, Re: Microsoft Hatred, Richard Matthew Stallman, Bill Gates, Larry Ellison, ORACLE

2010-07-16 Thread nanothermite911fbibustards
CONVICTED RAPIST, ROMAN POLANSKY is RELEASED by a KANGAROO court in Switzerland We all know that Germans are paying a big tribute to the polanskys and the swiss paid for the gold in the teeth. Israeli Professor: 'We Could Destroy All European Capitals' By Nadim Ladki 2-6-3 (IAP News) --

Re: File transfer on network

2010-07-16 Thread mukesh tiwari
On Jul 16, 4:08 am, MRAB pyt...@mrabarnett.plus.com wrote: mukesh tiwari wrote: Hello all Currently i am trying to develop a client and server in python. Client takes screenshot in every 20 seconds and send it to server. Server store the received file in folder. Here is code for Client

Re: Code generator and visitor pattern

2010-07-16 Thread Michele Simionato
On Jul 15, 7:58 pm, Karsten Wutzke kwut...@web.de wrote: Hello, this is obviously a Python OO question: Since Python isn't stringly typed, single-dispatch isn't available per se. So is the double-dispatch Visitor pattern, which is usually used in OO systems to implement code generators. So,

*** StudyCourse :: The Conversion of KHAZARS to Jews and thence TRANSFORMATION to ZIONIST ATHEISTS ***

2010-07-16 Thread small Pox
Self-Study Course : The Conversion of KHAZARS to Jews and thence TRANSFORMATION to ZIONIST ATHEISTS First, we will present the TRANSFORMATION, using HIGHLY AUTHENTIC source . Lying and Deception is the second nature of zionists , so we cant contaminate ourselves with an iota of it. We present

Re: *** StudyCourse :: The Conversion of KHAZARS to Jews and thence TRANSFORMATION to ZIONIST ATHEISTS ***

2010-07-16 Thread small Pox
The Kitab al Khazari, an Arabic phrase meaning Book of the Khazars, is one of most famous works of the medieval Spanish Jewish philosopher and poet Rabbi Yehuda Halevi, completed around 1140.[1] Divided into five essays (ma'amarim, Articles), it takes the form of a dialogue between the pagan

Re: *** StudyCourse :: The Conversion of KHAZARS to Jews and thence TRANSFORMATION to ZIONIST ATHEISTS ***

2010-07-16 Thread small Pox
The Kitab al Khazari, an Arabic phrase meaning Book of the Khazars, is one of most famous works of the medieval Spanish Jewish philosopher and poet Rabbi Yehuda Halevi, completed around 1140.[1] Divided into five essays (ma'amarim, Articles), it takes the form of a dialogue between the pagan

Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-16 Thread Uday S Reddy
On 7/13/2010 7:43 PM, Xah Lee wrote: I use comp.lang.lisp, comp.emacs since about 1999. Have been using them pretty much on a weekly basis in the past 10 years. Starting about 2007, the traffic has been increasingly filled with spam, and the posters are always just the 20 or 30 known faces. I

Re: Fascinating interview by Richard Stallman at KTH on emacs history and internals

2010-07-16 Thread Mark Tarver
On 15 July, 23:21, bolega gnuist...@gmail.com wrote: http://www.gnu.org/philosophy/stallman-kth.html RMS lecture at KTH (Sweden), 30 October 1986 (Kungliga Tekniska Högskolan (Royal Institute of Technology)) Stockholm, Sweden Arranged by the student society “Datorföreningen Stacken” 30

Re: Code generator and visitor pattern

2010-07-16 Thread Stefan Behnel
Carl Banks, 16.07.2010 07:50: On Jul 15, 8:33 pm, Stefan Behnel wrote: The code I referenced is from the Cython compiler, and we use it to do stuff with the AST. The visitor pattern is actually a pretty common way to bind code in a single place that does a certain thing to different parts of a

Re: Code generator and visitor pattern

2010-07-16 Thread Jean-Michel Pichavant
Karsten Wutzke wrote: Yes, typo, I meant strictly. Damn, I mean strongly. At least not for identifying which methods to call depending on the type/s. Karsten Stringly is the perfect combination of strictly and strongly. Nice one :) JM --

Re: Best Pythonic Approach to Annotation/Metadata?

2010-07-16 Thread Chris Rebert
On Thu, Jul 15, 2010 at 12:37 PM, Sparky samnspa...@gmail.com wrote: Hello Python community! I am building a JSON-RPC web application that uses quite a few models. I would like to return JSON encoded object information and I need a system to indicate which properties should be returned when

Re: Best Pythonic Approach to Annotation/Metadata?

2010-07-16 Thread Christian Heimes
def to_JSON(self): returnDict = {} for member in filter(someMethod, inspect.getmembers(self)): returnDict[member[0]] = member[1] return json.dumps(returnDict) By the way you don't need filter here. The getmembers() function has a filter functions. It's called

Re: Possible to include \n chars in doctest code samples or output?

2010-07-16 Thread Albert Hopkins
On Fri, 2010-07-16 at 01:26 -0400, pyt...@bdurham.com wrote: I understand what you're saying, but I'm struggling with how to represent the following strings in doctest code and doctest results. No matter what combination of backslashes or raw strings I use, I am unable to find a way to code

Re: adodb.NewADOConnection('postgres') returns None

2010-07-16 Thread micayael
On 14 jul, 14:51, Mladen Gogala n...@email.here.invalid wrote: On Wed, 14 Jul 2010 05:14:08 -0700, micayael wrote: Thanks Thomas. :-( then adodb today dosn't work with postgres (at least on ubuntu) right? No, ADOdb doesn't work with the newer versions of Postgres. ADOdb doesn't work with

Re: Q for Emacs users: code-folding (hideshow)

2010-07-16 Thread thebjorn
On Jul 15, 10:34 pm, Peter peter.milli...@gmail.com wrote: On Jul 16, 2:45 am, kj no.em...@please.post wrote: This is a question _for Emacs users_ (the rest of you, go away :)  ). How do you do Python code-folding in Emacs? Thanks! ~K [...] Anybody else now of any better ideas or

Re: Cannot send email

2010-07-16 Thread thebjorn
On Jul 15, 7:07 pm, D'Arcy J.M. Cain da...@druid.net wrote: On Thu, 15 Jul 2010 09:50:57 -0700 (PDT) G F gscotflem...@yahoo.com wrote: Does anyone have any ideas where the trouble is and what can be done about it? The little bit about: reply: retcode (557); Msg: This mail server does not

improvement for copy.deepcopy : no memo for immutable types

2010-07-16 Thread Inquisitive Scientist
I am having problems with running copy.deepcopy on very large data structures containing lots of numeric data: 1. copy.deepcopy can be very slow 2. copy.deepcopy can cause memory errors even when I have plenty of memory I think the problem is that the current implementation keeps a memo for

Re: improvement for copy.deepcopy : no memo for immutable types

2010-07-16 Thread Stefan Behnel
Inquisitive Scientist, 16.07.2010 14:45: I am having problems with running copy.deepcopy on very large data structures containing lots of numeric data: 1. copy.deepcopy can be very slow 2. copy.deepcopy can cause memory errors even when I have plenty of memory I think the problem is that

Re: Fascinating interview by Richard Stallman at KTH on emacs history and internals

2010-07-16 Thread Nick Keighley
On 16 July, 09:24, Mark Tarver dr.mtar...@ukonline.co.uk wrote: On 15 July, 23:21, bolega gnuist...@gmail.com wrote: http://www.gnu.org/philosophy/stallman-kth.html RMS lecture at KTH (Sweden), 30 October 1986 did you really have to post all of this... snip read more »... ...oh sorry

Re: any issues with long running python apps?

2010-07-16 Thread Les Schaffer
thanks to all for the replies. the Windows memory fragmentation was one of the i didn't know that items. we will use 64-bit Windows OS if the job happens. agree with all the other suggestions: multiple threads for data and GUI, etc. Also, might push for Linux even though the company is

MySQL One More Again

2010-07-16 Thread Victor Subervi
Hi; I have the following code: cursor.execute('select MyTable from optionsDetails where Store=%s', (store,)) options_tables = [item[0] for item in cursor] for table in options_tables: cursor.execute('select * from %' % table) You can already see what my question is. One of

Re: any issues with long running python apps?

2010-07-16 Thread Stefan Behnel
Les Schaffer, 16.07.2010 15:07: agree with all the other suggestions: multiple threads for data and GUI, The way I read it, the suggestion was to use separate processes, not multiple threads. That's a pretty important difference. Stefan --

Re: Q for Emacs users: code-folding (hideshow)

2010-07-16 Thread ernest
On 15 Jul, 18:45, kj no.em...@please.post wrote: This is a question _for Emacs users_ (the rest of you, go away :)  ). How do you do Python code-folding in Emacs? Thanks! ~K I tried the outline-mode and it seemed to work. It can collapse different blocks of code, such as functions,

Re: Q for Emacs users: code-folding (hideshow)

2010-07-16 Thread Andreas Waldenburger
On Fri, 16 Jul 2010 06:29:46 -0700 (PDT) ernest nfdi...@gmail.com wrote: On 15 Jul, 18:45, kj no.em...@please.post wrote: This is a question _for Emacs users_ (the rest of you, go away :)  ). How do you do Python code-folding in Emacs? Thanks! ~K I tried the outline-mode and

Re: Splitting numeric litterals

2010-07-16 Thread MRAB
Lawrence D'Oliveiro wrote: In message mailman.749.1279159335.1673.python-l...@python.org, MRAB wrote: Normally it's only string literals that could be so long that you might want to split them over several lines. It is somewhat unusual to have a _numeric_ literal that's very very long! Seems

Re: ctypes' c_longdouble: underflow error (bug?)

2010-07-16 Thread kj
In mailman.778.1279213534.1673.python-l...@python.org Thomas Jollans tho...@jollans.com writes: On 07/15/2010 06:41 PM, kj wrote: In mailman.733.1279124991.1673.python-l...@python.org Thomas Jollans tho...@jollans.com writes:

Re: improvement for copy.deepcopy : no memo for immutable types

2010-07-16 Thread Steven D'Aprano
On Fri, 16 Jul 2010 05:45:50 -0700, Inquisitive Scientist wrote: I am having problems with running copy.deepcopy on very large data structures containing lots of numeric data: [...] This seems perfectly safe, should speed things up, keep the memo dict smaller, and be easy to add. Can someone

Re: any issues with long running python apps?

2010-07-16 Thread Les Schaffer
Stefan Behnel wrote: Les Schaffer, 16.07.2010 15:07: agree with all the other suggestions: multiple threads for data and GUI, The way I read it, the suggestion was to use separate processes, not multiple threads. That's a pretty important difference. check. processes, not threads. Les --

Re: Splitting numeric litterals

2010-07-16 Thread Steven D'Aprano
On Fri, 16 Jul 2010 14:49:21 +0100, MRAB wrote: Lawrence D'Oliveiro wrote: In message mailman.749.1279159335.1673.python-l...@python.org, MRAB wrote: Normally it's only string literals that could be so long that you might want to split them over several lines. It is somewhat unusual to

Re: File transfer on network

2010-07-16 Thread MRAB
mukesh tiwari wrote: On Jul 16, 4:08 am, MRAB pyt...@mrabarnett.plus.com wrote: mukesh tiwari wrote: Hello all Currently i am trying to develop a client and server in python. Client takes screenshot in every 20 seconds and send it to server. Server store the received file in folder. Here is

Nested loop not working

2010-07-16 Thread Johann Spies
I am overlooking something stupid. I have two files: one with keywords and another with data (one record per line). I want to determine for each keyword which lines in the second file contains that keyword. The following code is not working. It loops through the second file but only uses the

Re: MySQL One More Again

2010-07-16 Thread MRAB
Victor Subervi wrote: Hi; I have the following code: cursor.execute('select MyTable from optionsDetails where Store=%s', (store,)) options_tables = [item[0] for item in cursor] for table in options_tables: cursor.execute('select * from %' % table) Should be: 'select *

Re: Splitting numeric litterals

2010-07-16 Thread MRAB
Steven D'Aprano wrote: On Fri, 16 Jul 2010 14:49:21 +0100, MRAB wrote: Lawrence D'Oliveiro wrote: In message mailman.749.1279159335.1673.python-l...@python.org, MRAB wrote: Normally it's only string literals that could be so long that you might want to split them over several lines. It is

Re: MySQL One More Again

2010-07-16 Thread Victor Subervi
On Fri, Jul 16, 2010 at 10:09 AM, MRAB pyt...@mrabarnett.plus.com wrote: Victor Subervi wrote: Hi; I have the following code: cursor.execute('select MyTable from optionsDetails where Store=%s', (store,)) options_tables = [item[0] for item in cursor] for table in options_tables:

Re: Nested loop not working

2010-07-16 Thread Ian Kelly
On Fri, Jul 16, 2010 at 8:34 AM, Johann Spies johann.sp...@gmail.com wrote: I am overlooking something stupid. I have two files: one with keywords and another with data (one record per line). I want to determine for each keyword which lines in the second file contains that keyword. The

Re: Nested loop not working

2010-07-16 Thread MRAB
Johann Spies wrote: I am overlooking something stupid. I have two files: one with keywords and another with data (one record per line). I want to determine for each keyword which lines in the second file contains that keyword. The following code is not working. It loops through the second

Re: ctypes' c_longdouble: underflow error (bug?)

2010-07-16 Thread Mark Dickinson
On Jul 16, 2:53 pm, kj no.em...@please.post wrote: This is extremely confusing.  From my naive reading of the documentation, I would have expected that the following two blocks would produce identical results (expl is one of the standard C math library exponential functions, with signature

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Paul
Thomas Jollans, 15.07.2010 18:41: On 07/15/2010 01:00 PM, Paul wrote: I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles * present

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-16 Thread Adam Mercer
On Fri, Jul 16, 2010 at 02:09, Heikki Toivonen hjtoi-better-remove-before-re...@comcast.net wrote: That version of M2Crypto does not work with OpenSSL 1.0.x because OpenSSL changed APIs. M2Crypto trunk works, as will the next M2Crypto release. So at this time, you should check out M2Crypto

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Daniel Fetchinson
I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles * present participles * and converts numbers to words Which languages does it support? If

Re: Nested loop not working

2010-07-16 Thread Dave Angel
Johann Spies wrote: I am overlooking something stupid. I have two files: one with keywords and another with data (one record per line). I want to determine for each keyword which lines in the second file contains that keyword. The following code is not working. It loops through the second

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Daniel Fetchinson
I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles * present participles * and converts numbers to words Which languages does it support? If

Re: Q for Emacs users: code-folding (hideshow)

2010-07-16 Thread David Robinow
On Fri, Jul 16, 2010 at 9:29 AM, ernest nfdi...@gmail.com wrote: On 15 Jul, 18:45, kj no.em...@please.post wrote: This is a question _for Emacs users_ (the rest of you, go away :)  ). How do you do Python code-folding in Emacs? Thanks! ~K I tried the outline-mode and it seemed to work.

create dynamic instance

2010-07-16 Thread Ray
class Test: def __init__(self): self.value=0 def change(self, val): self.value=val if __name__=='__main__': for x in range(10): x=Test() the question is how do i call x.value outside of that for loop? something like print x.value ? thanks for any help. --

Python 3 and setuptools

2010-07-16 Thread fuglyducky
I am trying to install a library that requires setuptools. Unfortunately, setuptools isn't available for Python 3 yet. Is this correct? Any idea when it may be available OR if there is a different tool/method of getting setuptools installed for Python 3? Thanks!!! --

Re: MySQL One More Again

2010-07-16 Thread John Nagle
On 7/16/2010 7:39 AM, MRAB wrote: Victor Subervi wrote: Hi; I have the following code: cursor.execute('select MyTable from optionsDetails where Store=%s', (store,)) options_tables = [item[0] for item in cursor] for table in options_tables: cursor.execute('select * from %' % table) As has

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread MRAB
Paul wrote: Thomas Jollans, 15.07.2010 18:41: On 07/15/2010 01:00 PM, Paul wrote: I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles *

Re: create dynamic instance

2010-07-16 Thread MRAB
Ray wrote: class Test: def __init__(self): self.value=0 def change(self, val): self.value=val if __name__=='__main__': for x in range(10): x=Test() the question is how do i call x.value outside of that for loop? something like print x.value ? thanks for any help.

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Stefan Behnel
Daniel Fetchinson, 16.07.2010 17:29: I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles * present participles * and converts numbers to words

Re: improvement for copy.deepcopy : no memo for immutable types

2010-07-16 Thread Mark Lawrence
On 16/07/2010 14:59, Steven D'Aprano wrote: [snip] However doing the minimum isn't likely to be very useful. Python is maintained by volunteers, and there are more bugs than person-hours available to fix them. Consequently, unless a bug is serious, high- profile, or affects a developer

Re: create dynamic instance

2010-07-16 Thread Ray
On Jul 16, 12:17 pm, MRAB pyt...@mrabarnett.plus.com wrote: Ray wrote: class Test:   def __init__(self):     self.value=0   def change(self, val):     self.value=val if __name__=='__main__':   for x in range(10):     x=Test()     the question is how do i call x.value outside

Re: create dynamic instance

2010-07-16 Thread Andre Alexander Bell
On 07/16/2010 06:01 PM, Ray wrote: if __name__=='__main__': for x in range(10): x=Test() the question is how do i call x.value outside of that for loop? something like print x.value ? You would have to keep references to your Test objects (untested code): if __name__

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Antoine Pitrou
On Fri, 16 Jul 2010 17:29:44 +0200 Daniel Fetchinson fetchin...@googlemail.com wrote: I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles

Re: Possible to include \n chars in doctest code samples or output?

2010-07-16 Thread Thomas Jollans
On 07/16/2010 07:26 AM, pyt...@bdurham.com wrote: Thomas, Recall that doctest doesn't parse the code, it extracts the docstrings. And docstrings are just strings, and are parsed like strings. I understand what you're saying, but I'm struggling with how to represent the following strings

Re: Python 3 and setuptools

2010-07-16 Thread Thomas Jollans
On 07/16/2010 06:10 PM, fuglyducky wrote: I am trying to install a library that requires setuptools. Unfortunately, setuptools isn't available for Python 3 yet. Is this correct? Any idea when it may be available OR if there is a different tool/method of getting setuptools installed for Python

rstrip()

2010-07-16 Thread Jason Friedman
$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. x.vsd-dir.rstrip(-dir) 'x.vs' I expected 'x.vsd' as a return value. -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Andreas Waldenburger
On Fri, 16 Jul 2010 17:26:05 +0200 Daniel Fetchinson fetchin...@googlemail.com wrote: I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles

Is '[' a function or an operator or an language feature?

2010-07-16 Thread Peng Yu
I mean to get the man page for '[' like in the following code. x=[1,2,3] But help('[') doesn't seem to give the above usage. ### Mutable Sequence Types ** List objects support additional operations that allow in-place modification of the object. Other mutable

Re: Python Imaging Library available for Python 3.1 ? Fractals

2010-07-16 Thread John Hammink
On Jun 6, 12:40 am, pdlemperno spam@earthlink.net wrote: On the site    http://code.activestate.com/recipes/langs/python/ there are several scripts for fractals.  See page five. These begin                         from PIL import Image This fails in my python 3.1.2 Google reveals PIL is

Re: rstrip()

2010-07-16 Thread Shashwat Anand
On Fri, Jul 16, 2010 at 10:28 PM, Jason Friedman ja...@powerpull.netwrote: $ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. x.vsd-dir.rstrip(-dir) 'x.vs' I expected 'x.vsd' as a return value.

Re: rstrip()

2010-07-16 Thread Thomas Jollans
On 07/16/2010 06:58 PM, Jason Friedman wrote: $ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. x.vsd-dir.rstrip(-dir) 'x.vs' I expected 'x.vsd' as a return value. x-vsd-dir.rstrip(-dir) 'x-vs'

py2app with weave fails

2010-07-16 Thread Soren
Hi, I'm trying to create a standalone app using py2app, but it seems no matter what I do I get this error: Traceback (most recent call last): File /Users/soren/Documents/workspace/bioxtasraw/dist/RAW.app/ Contents/Resources/__boot__.py, line 158, in module _run('RAW.py') File

Re: rstrip()

2010-07-16 Thread Ken Watford
On Fri, Jul 16, 2010 at 12:58 PM, Jason Friedman ja...@powerpull.net wrote: $ python Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. x.vsd-dir.rstrip(-dir) 'x.vs' I expected 'x.vsd' as a return value. --

Re: Code generator and visitor pattern

2010-07-16 Thread Thomas Jollans
On 07/16/2010 11:00 AM, Jean-Michel Pichavant wrote: Karsten Wutzke wrote: Yes, typo, I meant strictly. Damn, I mean strongly. At least not for identifying which methods to call depending on the type/s. Karsten Stringly is the perfect combination of strictly and strongly. Nice

Re: rstrip()

2010-07-16 Thread MRAB
Jason Friedman wrote: $ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. x.vsd-dir.rstrip(-dir) 'x.vs' I expected 'x.vsd' as a return value. .strip, .lstrip and .rstrip treat their argument like a

Re: Splitting numeric litterals

2010-07-16 Thread bart.c
Steven D'Aprano st...@remove-this-cybersource.com.au wrote in message news:4c4069de$0$11101$c3e8...@news.astraweb.com... On Fri, 16 Jul 2010 14:49:21 +0100, MRAB wrote: Not only that, but it only takes 73 digits to write out the total number of particles in the entire universe:

Re: Is '[' a function or an operator or an language feature?

2010-07-16 Thread Robert Kern
On 7/16/10 12:01 PM, Peng Yu wrote: I then checked help('LISTLITERALS'), which gives some description that is available from the language reference. So '[' in x=[1,2,3] is considered as a language feature rather than a function or an operator? Yes. It is part of the list literal syntax of the

Re: Why doesn't python's list append() method return the list itself?

2010-07-16 Thread John Nagle
On 7/13/2010 4:22 AM, Gregory Ewing wrote: John Nagle wrote: Arguably, if a function just does a return, it should be an error to try to use its return value. It's been suggested at least once before that the default return value for a function should be some special value that raises an

Re: rstrip()

2010-07-16 Thread Novocastrian_Nomad
On Jul 16, 10:58 am, Jason Friedman ja...@powerpull.net wrote: $ python Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. x.vsd-dir.rstrip(-dir) 'x.vs' I expected 'x.vsd' as a return value. One way to

Re: Splitting numeric litterals

2010-07-16 Thread Robert Kern
On 7/16/10 12:30 PM, bart.c wrote: Steven D'Aprano st...@remove-this-cybersource.com.au wrote in message news:4c4069de$0$11101$c3e8...@news.astraweb.com... On Fri, 16 Jul 2010 14:49:21 +0100, MRAB wrote: Not only that, but it only takes 73 digits to write out the total number of particles

( . ) ( . ) ( . ) ( . ) ( . ) Nude desi videos and pictures ( . ) ( . ) ( . ) ( . ) ( . ) ( . )

2010-07-16 Thread ssssssssssssss
Click here for nude desi videos http://ukpinkgirls.co.cc/ http://uk-worldwebhosting.co.cc/ -- http://mail.python.org/mailman/listinfo/python-list

How to list all the python help topics that are capitalized?

2010-07-16 Thread Peng Yu
Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help topics. Would you please let me know if there is a command to do so? help('SUBSCRIPTS') Related help topics: SEQUENCEMETHODS1

pattern matching with multiple lists

2010-07-16 Thread Chad Kellerman
Greetings, I have some code that I wrote and know there is a better way to write it.  I wonder if anyone could point me in the right direction on making this 'cleaner'. I have two lists:   liveHostList = [ app11, app12, web11, web12, host11 ]    

Re: Identify the Color of an Image

2010-07-16 Thread Thomas Jollans
On 07/15/2010 09:13 AM, Monyl wrote: Please be clearer about what you want. 1. Animagedoes not have acolor, although each pixel in animage does have acolor. 2. Text in a web page does not (necessarily) have a font, although the display engine will use a font of its choice to render text.

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread MRAB
Peng Yu wrote: Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help topics. Would you please let me know if there is a command to do so? help('SUBSCRIPTS') Related help topics:

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread Peng Yu
On Fri, Jul 16, 2010 at 3:10 PM, MRAB pyt...@mrabarnett.plus.com wrote: Peng Yu wrote: Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help topics. Would you please let me know if

Re: Identify the Color of an Image

2010-07-16 Thread Rami Chowdhury
On Wednesday 14 July 2010 23:56:27 Monyl wrote: I will be using a automation tool called Sikuli and select the text or an Image. It sounds to me like this is a question not about Python, but about Sikuli. I suggest you ask the question at https://answers.launchpad.net/sikuli or on their

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread Thomas Jollans
On 07/16/2010 10:21 PM, Peng Yu wrote: On Fri, Jul 16, 2010 at 3:10 PM, MRAB pyt...@mrabarnett.plus.com wrote: Peng Yu wrote: Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help

Re: pattern matching with multiple lists

2010-07-16 Thread MRAB
Chad Kellerman wrote: Greetings, I have some code that I wrote and know there is a better way to write it. I wonder if anyone could point me in the right direction on making this 'cleaner'. I have two lists: liveHostList = [ app11, app12, web11, web12, host11 ]

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread MRAB
Peng Yu wrote: On Fri, Jul 16, 2010 at 3:10 PM, MRAB pyt...@mrabarnett.plus.com wrote: Peng Yu wrote: Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help topics. Would you please

Re: Nested loop not working

2010-07-16 Thread Alf P. Steinbach /Usenet
* Johann Spies, on 16.07.2010 16:34: I am overlooking something stupid. I have two files: one with keywords and another with data (one record per line). I want to determine for each keyword which lines in the second file contains that keyword. The following code is not working. It loops

Re: pattern matching with multiple lists

2010-07-16 Thread Tim Chase
On 07/16/2010 02:20 PM, Chad Kellerman wrote: Greetings, I have some code that I wrote and know there is a better way to write it. I wonder if anyone could point me in the right direction on making this 'cleaner'. I have two lists: liveHostList = [ app11, app12, web11, web12,

Re: Is '[' a function or an operator or an language feature?

2010-07-16 Thread Terry Reedy
On 7/16/2010 1:01 PM, Peng Yu wrote: I mean to get the man page for '[' like in the following code. x=[1,2,3] You might find my Python symbol glossary useful. https://code.google.com/p/xploro/downloads/detail?name=PySymbols.html -- http://mail.python.org/mailman/listinfo/python-list

os.times values under Windows

2010-07-16 Thread python
Python 2.6 under Windows: are the two non-zero values returned by this function of any practical use? The documentation [1] is vague and points to the Windows Platform API which I'm not sure maps 1:1 to the help description. In looking at the values returned on my system (Windows 7, 64-bit), I

Re: About problems that I have with learning wxPython in Macintosh

2010-07-16 Thread David Bolen
ata.jaf a.j.romani...@gmail.com writes: import wx class MainWindow(wx.Frame) : def __init__(self, parent, title) : wx.Frame.__init__(self, parent, title=title, size=(200, 100)) self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE) self.CreateStatusBar() filemenu =

Re: Splitting numeric litterals

2010-07-16 Thread Terry Reedy
On 7/16/10 12:30 PM, bart.c wrote: they have to be exact. So if you wanted to hardcode 1000! for some reason, you'd need some 2568 digits which is a little awkward on one line. No, only 20 digits math.factorial(1000) 402387260077093773543702433923003985719374 ... Most big ints people

Subsets of Python implemented in Python

2010-07-16 Thread candide
I don't understand why some parts of the Python language (or the Python standard library too) are implemented in C while some other parts are implemented in the Python language itself. For instance, lists and dictionnaries are implemented in C but sets are not. Wouldn't be better to implement

Re: Subsets of Python implemented in Python

2010-07-16 Thread Richard Thomas
On Jul 17, 12:34 am, candide cand...@free.invalid wrote: I don't understand why some parts of the Python language (or the Python standard library too) are implemented in C while some other parts are implemented in the Python language itself. For instance, lists and dictionnaries are

timing

2010-07-16 Thread Jia Hu
Hello: If I want to calculate the runtime of a section of a program. How can I do it? Thank you, Jia -- http://mail.python.org/mailman/listinfo/python-list

Re: Splitting numeric litterals

2010-07-16 Thread Steven D'Aprano
On Fri, 16 Jul 2010 18:30:38 +0100, bart.c wrote: It always makes me laugh when I receive an invoice from some company, and the account number or invoice number is (e.g.) 100023456789. Who do they think they're fooling? I used to do that. Giving someone an invoice number, or product

Re: Splitting numeric litterals

2010-07-16 Thread Steven D'Aprano
On Fri, 16 Jul 2010 15:41:45 +0100, MRAB wrote: It always makes me laugh when I receive an invoice from some company, and the account number or invoice number is (e.g.) 100023456789. Who do they think they're fooling? It's possible that they're splitting it into fields. Anything is

Re: Subsets of Python implemented in Python

2010-07-16 Thread Steven D'Aprano
On Sat, 17 Jul 2010 01:34:48 +0200, candide wrote: I don't understand why some parts of the Python language (or the Python standard library too) are implemented in C while some other parts are implemented in the Python language itself. For instance, lists and dictionnaries are implemented in

Re: Is '[' a function or an operator or an language feature?

2010-07-16 Thread Peng Yu
On Fri, Jul 16, 2010 at 5:42 PM, Terry Reedy tjre...@udel.edu wrote: On 7/16/2010 1:01 PM, Peng Yu wrote: I mean to get the man page for '[' like in the following code. x=[1,2,3] You might find my Python symbol glossary useful.

  1   2   3   >