Re: 2.6, 3.0, and truly independent intepreters

2008-10-23 Thread greg
Andy wrote: 1) Independent interpreters (this is the easier one--and solved, in principle anyway, by PEP 3121, by Martin v. Löwis Something like that is necessary for independent interpreters, but not sufficient. There are also all the built-in constants and type objects to consider. Most of t

Re: Will Python 3 be "stackless"?

2008-10-23 Thread davy zhang
multiprocessing is good enough for now, On Fri, Oct 24, 2008 at 4:30 AM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Phillip B Oldham schrieb: >> >> On Thu, Oct 23, 2008 at 9:20 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: >>> >>> No, it will definitely not. >> >>> From your statement (and I'm te

Re: How to examine the inheritance of a class?

2008-10-23 Thread Steven D'Aprano
On Thu, 23 Oct 2008 20:53:03 -0700, John Ladasky wrote: > On Oct 23, 6:59 pm, "James Mills" <[EMAIL PROTECTED]> wrote: > >> Developer. NOT User. > > For the foreseeable future, this program is for my use only. So the > developer and the user are one and the same. > > And, thank you, __bases__

look-behind fixed width issue (package re)

2008-10-23 Thread Peng Yu
Hi, It seem that the current python requires fixed-width pattern for look- behind. I'm wondering if there is any newly development which make variable-width pattern available for look-behind. Thanks, Peng -- http://mail.python.org/mailman/listinfo/python-list

Re: Will Python 3 be "stackless"?

2008-10-23 Thread Terry Reedy
Phillip B Oldham wrote: Will Python 3 be ... The features of Python 3.0 are fixed; there are just a few remaining bugs to fix before the final release. Download the release candidate or look at the online manual at http://docs.python.org/dev/3.0/ -- http://mail.python.org/mailman/listinfo/

Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Roman Yakovenko
On Thu, Oct 23, 2008 at 7:08 PM, Matthieu Brucher <[EMAIL PROTECTED]> wrote: >> Works for me: >> >> https://sourceforge.net/project/showfiles.php?group_id=118209&package_id=146545&release_id=634581 > > Still does not ;) Only the pygccxml zip is available. It is possible, that the old gccxml instal

Re: How to get the actual address of a object

2008-10-23 Thread James Mills
On Fri, Oct 24, 2008 at 2:58 PM, <[EMAIL PROTECTED]> wrote: > maybe id(x) can get it ,but how to cast it back into a object You can't. Python is NOT C/C++/Java or whatever. If you have a variable, x, and you want to "copy" it to another variable, y. Use assignment. Most (if not all) objects in

Re: Python Script Bug

2008-10-23 Thread Terry Reedy
Chris Rebert wrote: global t 'global' declarations are only allowed (and only make sense) inside a function. Remove the above line. Global statements are *allowed* anywhere (by BDFL decision - does not hurt and he wants to keep code in and out of functions as identical as possible), but re

Re: How to get the actual address of a object

2008-10-23 Thread James Mills
On Fri, Oct 24, 2008 at 2:51 PM, <[EMAIL PROTECTED]> wrote: > Hi,I have a strange idea:is there any way to get memory address of a > object. id(obj) Example: >>> x = 10 >>> id(x) 134536908 But this probably (most likely) isn't it's address in memory but more it's unique identifier that separa

Re: How to get the actual address of a object

2008-10-23 Thread mujunshan
On 10月24日, 下午12时51分, [EMAIL PROTECTED] wrote: > Hi,I have a strange idea:is there any way to get memory address of a > object. > > For example: > > i = 10 > > addr = get_address(i) > address will be assigned a integer which is pointer of object > i,then

How to get the actual address of a object

2008-10-23 Thread mujunshan
Hi,I have a strange idea:is there any way to get memory address of a object. For example: i = 10 addr = get_address(i) address will be assigned a integer which is pointer of object i,then I want to recast addr into another integer: j

Re: What happened to python-dev's Google Group?

2008-10-23 Thread Mensanator
On Oct 23, 10:13�pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Oct 24, 12:58�pm, Robert Kern <[EMAIL PROTECTED]> wrote: > > > Giampaolo Rodola' wrote: > > >http://groups.google.com/group/python-dev2 > > > It seems it no longer exists. What happened? > > > I don't know, but something happened

Re: How to examine the inheritance of a class?

2008-10-23 Thread John Ladasky
On Oct 23, 6:59 pm, "James Mills" <[EMAIL PROTECTED]> wrote: > Developer. NOT User. For the foreseeable future, this program is for my use only. So the developer and the user are one and the same. And, thank you, __bases__ is what I was looking for. Though Chris Mills also pointed out that isi

Re: How to examine the inheritance of a class?

2008-10-23 Thread John Ladasky
On Oct 23, 6:56 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > In __bases__, e.g. Spam1.__bases__, which would be (,). > In practice, you probably just want to use if isinstance(some_obj, > Foo): which will be true for SpamN instances. Thank you, Chris. Class.__bases__ is exactly what I wante

Re: Question about interpreter

2008-10-23 Thread Usman Ajmal
Thanks James... On Fri, Oct 24, 2008 at 8:01 AM, James Mills <[EMAIL PROTECTED]>wrote: > On Fri, Oct 24, 2008 at 12:55 PM, Usman Ajmal <[EMAIL PROTECTED]> > wrote: > > An interpreter which Python also uses, translates and checks for errors > in > > code, one line at a time. > > > > Question: Does

Re: What happened to python-dev's Google Group?

2008-10-23 Thread Graham Dumpleton
On Oct 24, 12:58 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Giampaolo Rodola' wrote: > >http://groups.google.com/group/python-dev2 > > It seems it no longer exists. What happened? > > I don't know, but something happened to the numpy-discussion Google Group > gateway, too. Maybe there was a mass

new to python network programming is async_chat.push thread-safe? python3.0

2008-10-23 Thread davy zhang
I wrote this server to handle incoming messages in a process using multiprocessing named "handler", and sending message in a Thread named "sender", 'cause I think the async_chat object can not pass between processes. My project is a network gate server with many complex logic handler behind, so I

Re: Question about interpreter

2008-10-23 Thread James Mills
On Fri, Oct 24, 2008 at 12:55 PM, Usman Ajmal <[EMAIL PROTECTED]> wrote: > An interpreter which Python also uses, translates and checks for errors in > code, one line at a time. > > Question: Does interpreter also executes the translated code? http://en.wikipedia.org/wiki/Evaluate --JamesMills -

Question about interpreter

2008-10-23 Thread Usman Ajmal
Assalamalaikum An interpreter which Python also uses, translates and checks for errors in code, one line at a time. Question: Does interpreter also executes the translated code? -- http://mail.python.org/mailman/listinfo/python-list

Re: OS 10.5 build 64 bits

2008-10-23 Thread Robert Kern
Lawrence D'Oliveiro wrote: In message <[EMAIL PROTECTED]>, Robin Becker wrote: Is there some magic I can try to make the OS 10.5 build as 64 bits? Bear in mind OS X isn't really 64-bit, it's still only a 32-bit kernel. Well, you can compile and execute 64-bit user-space programs (including

Re: How to examine the inheritance of a class?

2008-10-23 Thread James Mills
On Fri, Oct 24, 2008 at 11:36 AM, John Ladasky <[EMAIL PROTECTED]> wrote: > etc. The list of subclasses is not fully defined. It is supposed to > be extensible by the user. Developer. NOT User. Consider: $ python Python 2.5.2 (r252:60911, Oct 13 2008, 15:09:03) [GCC 4.2.4 (CRUX)] on linux2 Typ

Re: What happened to python-dev's Google Group?

2008-10-23 Thread Robert Kern
Giampaolo Rodola' wrote: http://groups.google.com/group/python-dev2 It seems it no longer exists. What happened? I don't know, but something happened to the numpy-discussion Google Group gateway, too. Maybe there was a mass culling of such gateways that weren't being maintained, or something

Re: How to examine the inheritance of a class?

2008-10-23 Thread Chris Rebert
On Thu, Oct 23, 2008 at 6:36 PM, John Ladasky <[EMAIL PROTECTED]> wrote: > Hello again! > > Suppose that I have several subclasses which inherit from a base > class, thus: > > class Foo(object): > > class Spam1(Foo): > > class Spam2(Foo): > > class Spam3(Foo): > > etc. The list of subclasses is no

Re: How to examine the inheritance of a class?

2008-10-23 Thread John Ladasky
I forgot to add -- though I suspect it should not matter -- I'm using Python 2.5.1 on Ubuntu Linux 8.04. -- http://mail.python.org/mailman/listinfo/python-list

How to examine the inheritance of a class?

2008-10-23 Thread John Ladasky
Hello again! Suppose that I have several subclasses which inherit from a base class, thus: class Foo(object): class Spam1(Foo): class Spam2(Foo): class Spam3(Foo): etc. The list of subclasses is not fully defined. It is supposed to be extensible by the user. Many methods will differ betwee

Re: OS 10.5 build 64 bits

2008-10-23 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Robin Becker wrote: > Is there some magic I can try to make the OS 10.5 build as 64 bits? Bear in mind OS X isn't really 64-bit, it's still only a 32-bit kernel. -- http://mail.python.org/mailman/listinfo/python-list

Re: Style questions

2008-10-23 Thread James Mills
David, Here's a "good" example (NB: subjective): http://hg.softcircuit.com.au/index.wsgi/circuits/file/251bce4b92fd/circuits/core.py On Fri, Oct 24, 2008 at 10:04 AM, David Di Biase <[EMAIL PROTECTED]> wrote: > I have a few simple questions regarding python style standards. I have a > class cont

Re: Py2exe and Module Error...

2008-10-23 Thread Gabriel Genellina
En Thu, 23 Oct 2008 20:02:41 -0200, <[EMAIL PROTECTED]> escribió: On Oct 22, 8:33 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Wed, 22 Oct 2008 20:34:39 -0200, <[EMAIL PROTECTED]> escribió: > I am using py2exe and everything is working fine except one module, > ClientCookie, found he

Style questions

2008-10-23 Thread David Di Biase
I have a few simple questions regarding python style standards. I have a class contained in a module...I'm wondering if I should perform any imports that are relevant to the class within the constructor of the class or at the top of the module page. Also if I'm creating a docstring for the class I

Re: logging module

2008-10-23 Thread Gabriel Genellina
En Thu, 23 Oct 2008 14:52:47 -0200, Matimus <[EMAIL PROTECTED]> escribió: On Oct 23, 7:58 am, "Werner F. Bruhin" <[EMAIL PROTECTED]> wrote: 1. I would like to have a "log viewer" a wxPython based app to be able to look at a log generated by another script. Running in a separate process? That

Re: Possible read()/readline() bug?

2008-10-23 Thread Terry Reedy
Mike Kent wrote: To followup on this: Terry: Yes, I did in fact miss the 'buffer' parameter to open. Setting the buffer parameter to 0 did in fact fix the test code that I gave above, but oddly, did not fix my actual production code; it continues to get the data as first read, rather than what i

Re: Do a Gnuplot of a file in python

2008-10-23 Thread Gabriel Genellina
En Thu, 23 Oct 2008 13:58:20 -0200, Santix <[EMAIL PROTECTED]> escribió: I am doing a python program that save the data in a text file in columns and I want to do a gnuplot to plot the results. But I want the program in python to show the result with gnuplot. I have tried this: g.load(power

Re: More efficient array processing

2008-10-23 Thread John [H2O]
No secret at all... As you might have guessed, it is global model fields that I am working with: 360x180 (lon,lat) I have three 'z' levels. (360,180,3) Then I have different 'fields', usually on the order of ~50-80 (360,180,3,60) Lastly, I have output for a several timesteps, then those times

Module similar to Perl DBIx-PasswordIniFile ?

2008-10-23 Thread kromakey
Does python have a module with this sort of functionality: http://search.cpan.org/~ecastilla/DBIx-PasswordIniFile-1.1/PasswordIniFile.pm Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: OS 10.5 build 64 bits

2008-10-23 Thread Graham Dumpleton
On Oct 24, 5:28 am, Robin Becker <[EMAIL PROTECTED]> wrote: > M.-A. Lemburg wrote: > > igure script. > > > The config options --with-universal-archs is used for this. In theory > > you could build a 4-way binary for Intel,PPC/32-bit,64-bit. > > Default is 32-bit only. > > > > appar

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

2008-10-23 Thread Robert Brown
Stef Mientki <[EMAIL PROTECTED]> writes: > I (again) wonder what's the perfect way to store, OS-independent, filepaths ? > I can think of something like: > - use a relative path if drive is identical to the application (I'm still a > Windows guy) > - use some kind of OS-dependent translation table

Re: More efficient array processing

2008-10-23 Thread Ivan Reborin
On Fri, 24 Oct 2008 00:32:11 +0200, Ivan Reborin <[EMAIL PROTECTED]> wrote: >On Thu, 23 Oct 2008 11:44:04 -0700 (PDT), "John [H2O]" ><[EMAIL PROTECTED]> wrote: > >> >>Thanks for the clarification. >> >>What is strange though, is that I have several Fortran programs that create >>the exact same arr

Re: More efficient array processing

2008-10-23 Thread Ivan Reborin
On Thu, 23 Oct 2008 11:44:04 -0700 (PDT), "John [H2O]" <[EMAIL PROTECTED]> wrote: > >Thanks for the clarification. > >What is strange though, is that I have several Fortran programs that create >the exact same array srtucture... wouldn't they be restricted to the 2Gb >limit as well? Depends on lo

Re: python extensions: including project local headers

2008-10-23 Thread Robert Kern
J Kenneth King wrote: Philip Semanchuk <[EMAIL PROTECTED]> writes: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer-vision based project that requi

Re: Python26 compilation problem

2008-10-23 Thread M.-A. Lemburg
On 2008-10-23 18:32, Mathew wrote: > I am getting > Modules/config.c:39: error: expected declaration specifiers or '...' > before numeric constant > > because of > extern void initsocket(2)(void); > > in config.c > > What is this? How do I fix it? Without more information on platform, compiler,

Re: More efficient array processing

2008-10-23 Thread Marc 'BlackJack' Rintsch
On Thu, 23 Oct 2008 13:56:22 -0700, John [H2O] wrote: > I'm using zeros with type np.float, is there a way to define the data > type to be 4 byte floats? Yes: In [13]: numpy.zeros(5, numpy.float32) Out[13]: array([ 0., 0., 0., 0., 0.], dtype=float32) Ciao, Marc 'BlackJack' Rintsch -

Re: More efficient array processing

2008-10-23 Thread Robert Kern
John [H2O] wrote: I'm using zeros with type np.float, is there a way to define the data type to be 4 byte floats? np.float32. np.float is not part of the numpy API. It's just Python's builtin float type which corresponds to C doubles. -- Robert Kern "I have come to believe that the whole wo

Re: OS 10.5 build 64 bits

2008-10-23 Thread M.-A. Lemburg
On 2008-10-23 20:28, Robin Becker wrote: > M.-A. Lemburg wrote: > igure script. >> >> The config options --with-universal-archs is used for this. In theory >> you could build a 4-way binary for Intel,PPC/32-bit,64-bit. >> Default is 32-bit only. > > > apparently this issue is know

Re: Question about scope

2008-10-23 Thread Steven D'Aprano
On Thu, 23 Oct 2008 21:08:12 -0400, Pat wrote: > Stripping out the extra variables and definitions, this is all that > there is. > Whether or not this technique is *correct* programming is irrelevant. Oh rly? Well, sure, you can write bad code if you like, and make your actual job much harder.

Re: Question about scope

2008-10-23 Thread Steven D'Aprano
On Thu, 23 Oct 2008 11:38:35 -0400, Pat wrote: > I have a Globals class. Well, that's your first mistake. Using global variables in a class is no better than using bare global variables. They're still global, and that's a problem: http://weblogs.asp.net/wallen/archive/2003/05/08/6750.aspx >

Re: Py2exe and Module Error...

2008-10-23 Thread vincehofmeister
On Oct 22, 8:33 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 22 Oct 2008 20:34:39 -0200, <[EMAIL PROTECTED]> escribió: > > > I am using py2exe and everything is working fine except one module, > > ClientCookie, found here: > > >http://wwwsearch.sourceforge.net/ClientCookie/ > > > Ke

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Steven D'Aprano
On Thu, 23 Oct 2008 13:40:22 +, Marc 'BlackJack' Rintsch wrote: > This can be written more straigth forward as ``100**155`` or ``pow(100, > 155)``. No need for `eval()`\ing a string. But how else can the OP get an order of magnitude slow-down on an operation that is slow in the first place?

Re: Slow comparison between two lists

2008-10-23 Thread Steven D'Aprano
On Thu, 23 Oct 2008 05:03:26 -0700, Jani Tiainen wrote: > But in my case running that loop takes about 10 minutes. What I am doing > wrong? Others have already suggested you have a O(N**2) algorithm. Here's an excellent article that explains more about them: http://www.joelonsoftware.com/articl

Re: substitution __str__ method of an instance

2008-10-23 Thread Steven D'Aprano
On Thu, 23 Oct 2008 10:55:56 +0200, Christian Heimes wrote: > netimen wrote: >> How can I substitute __str__ method of an instance? > > It's not possible. For performance and other reasons most __*__ methods > are looked up on the type only. > > Christian However, you can dispatch back to the i

Re: Append a new value to dict

2008-10-23 Thread bearophileHUGS
slais-www: > Slower than > ... Okay, I seen there's a little confusion, I try to say it more clearly. Generally this is the faster version (faster than the version with get), especially if you use Psyco: version 1) if 'B' in counter: counter['B'] += 1 else: counter['B'] = 1

Re: 2.6, 3.0, and truly independent intepreters

2008-10-23 Thread Rhamphoryncus
On Oct 23, 11:30 am, Glenn Linderman <[EMAIL PROTECTED]> wrote: > On approximately 10/23/2008 12:24 AM, came the following characters from > the keyboard of Christian Heimes: > > > Andy wrote: > >> 2) Barriers to "free threading".  As Jesse describes, this is simply > >> just the GIL being in place

Re: python extensions: including project local headers

2008-10-23 Thread Philip Semanchuk
On Oct 23, 2008, at 3:18 PM, J Kenneth King wrote: Philip Semanchuk <[EMAIL PROTECTED]> writes: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer

Re: Question about scope

2008-10-23 Thread Pat
Bruno Desthuilliers wrote: Pat a écrit : I have a Globals class. Not sure it's such a great idea, but anyway... What's the use case for this class ? There are perhaps better (or at least more idiomatic) solutions... In it, I have a variable defined something like this: remote_device_enab

Re: ANN: gui_support, a convenience library for wxPython

2008-10-23 Thread Stef Mientki
Glenn Linderman wrote: On approximately 10/23/2008 12:59 PM, came the following characters from the keyboard of Stef Mientki: I'm no expert I thought a three-quoted string was called a "doc string", isn't that so ? No, the docstring is the first string after a function or class definition, t

Re: Python Script Bug

2008-10-23 Thread Bruno Desthuilliers
Chris Rebert a écrit : (snip) 'global' declarations are only allowed (and only make sense) inside a function. Well, they _are_ actually allowed outside a function. But they indeed only make sense within !-) (snip) -- http://mail.python.org/mailman/listinfo/python-list

Re: More efficient array processing

2008-10-23 Thread John [H2O]
I'm using zeros with type np.float, is there a way to define the data type to be 4 byte floats? Marc 'BlackJack' Rintsch wrote: > > On Thu, 23 Oct 2008 11:44:04 -0700, John [H2O] wrote: > >> What is strange though, is that I have several Fortran programs that >> create the exact same array srt

Re: re.search over a list

2008-10-23 Thread Pat
Bruno Desthuilliers wrote: Pat a écrit : Bruno Desthuilliers wrote: Pat a écrit : While I can use a for loop looking for a match on a list, I was wondering if there was a one-liner way. In particular, one of my RE's looks like this '^somestring$' so I can't just do this: re.search( '^somest

Re: Will Python 3 be "stackless"?

2008-10-23 Thread Diez B. Roggisch
Phillip B Oldham schrieb: On Thu, Oct 23, 2008 at 9:20 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: No, it will definitely not. From your statement (and I'm terribly sorry if I've taken it out of context) it would seem that such features are frowned-upon. Is this correct? And if so, why? Yo

Re: crossplatform standalone python apps

2008-10-23 Thread Mike Driscoll
On Oct 17, 1:59 am, Gabriel Rossetti <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I like to create a cross-platform standalone python application, like > Mac OS *.app dirs. The idea is to distribute a zip file containing > everything (the python interpreter and all) so that a user just unzips >

Re: Will Python 3 be "stackless"?

2008-10-23 Thread Phillip B Oldham
On Thu, Oct 23, 2008 at 9:20 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: > No, it will definitely not. >From your statement (and I'm terribly sorry if I've taken it out of context) it would seem that such features are frowned-upon. Is this correct? And if so, why? -- Phillip B Oldham [EMAIL PROT

Re: Will Python 3 be "stackless"?

2008-10-23 Thread Chris Rebert
On Thu, Oct 23, 2008 at 1:14 PM, Phillip B Oldham <[EMAIL PROTECTED]> wrote: > Will Python 3 be "stackless"? Or, rather, will it have any features > similar to stackless' microthreads and channels? > -- > http://mail.python.org/mailman/listinfo/python-list > No, it will definitely not. But it does

Will Python 3 be "stackless"?

2008-10-23 Thread Phillip B Oldham
Will Python 3 be "stackless"? Or, rather, will it have any features similar to stackless' microthreads and channels? -- http://mail.python.org/mailman/listinfo/python-list

Re: why would 'import win32com' fail?

2008-10-23 Thread bill
On Oct 23, 3:21 pm, bill <[EMAIL PROTECTED]> wrote: > All, > > I am trying to access Excel from Python. Many of the examples started > with: > >       import win32com >       >       blah, blah > > I try that from my Python shell and it fails. What am I missing here? > > TIA, > > Bill Thanks

Proposal for thread-safe Tkinter

2008-10-23 Thread Allen Taylor
I was given the task of upgrading a Python/Tkinter GUI application to the latest versions of Python and Tk. After a while, I realized that the application had not been written in a thread-safe manner. Multiple threads would simply use the Tk object directly. The application apparently ran fine

Re: ANN: gui_support, a convenience library for wxPython

2008-10-23 Thread Mike Driscoll
On Oct 23, 2:14 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > On Oct 23, 2008, at 11:50 AM, Stef Mientki wrote: > > > gui_support is library for easy creation of GUI designs in wxPython. > >  ... > > Brief documentation can be found here > >http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_gui_

Re: why would 'import win32com' fail?

2008-10-23 Thread [EMAIL PROTECTED]
On Oct 23, 3:21 pm, bill <[EMAIL PROTECTED]> wrote: > All, > > I am trying to access Excel from Python. Many of the examples started > with: > >       import win32com >       >       blah, blah > > I try that from my Python shell and it fails. What am I missing here? You need to download and

Re: ANN: gui_support, a convenience library for wxPython

2008-10-23 Thread Stef Mientki
Joe Strout wrote: On Oct 23, 2008, at 11:50 AM, Stef Mientki wrote: gui_support is library for easy creation of GUI designs in wxPython. ... Brief documentation can be found here http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_gui_support.html That's neat -- thank you for making it a

Re: More efficient array processing

2008-10-23 Thread Marc 'BlackJack' Rintsch
On Thu, 23 Oct 2008 11:44:04 -0700, John [H2O] wrote: > What is strange though, is that I have several Fortran programs that > create the exact same array srtucture... wouldn't they be restricted to > the 2Gb limit as well? They should be. What about the data type of the elements? Any chance t

What happened to python-dev's Google Group?

2008-10-23 Thread Giampaolo Rodola'
http://groups.google.com/group/python-dev2 It seems it no longer exists. What happened? -- http://mail.python.org/mailman/listinfo/python-list

Re: why would 'import win32com' fail?

2008-10-23 Thread Mike Driscoll
On Oct 23, 2:21 pm, bill <[EMAIL PROTECTED]> wrote: > All, > > I am trying to access Excel from Python. Many of the examples started > with: > >       import win32com >       >       blah, blah > > I try that from my Python shell and it fails. What am I missing here? > > TIA, > > Bill Dunno.

Re: why would 'import win32com' fail?

2008-10-23 Thread Marc 'BlackJack' Rintsch
On Thu, 23 Oct 2008 12:21:29 -0700, bill wrote: > I am trying to access Excel from Python. Many of the examples started > with: > > import win32com > > blah, blah > > I try that from my Python shell and it fails. What am I missing here? The `win32com` module? It is not p

Re: why would 'import win32com' fail?

2008-10-23 Thread Chris Rebert
On Thu, Oct 23, 2008 at 12:21 PM, bill <[EMAIL PROTECTED]> wrote: > All, > > I am trying to access Excel from Python. Many of the examples started > with: > > import win32com > > blah, blah > > I try that from my Python shell and it fails. What am I missing here? It's not a sta

Re: Python Script Bug

2008-10-23 Thread Benjamin Kaplan
On Thu, Oct 23, 2008 at 2:54 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: > Hello everyone, > I would like to know what isn't good in my script. > #!/usr/bin/python > # -*- coding: iso-8859-15 -*- > from time import strftime > import datetime > t = input(datetime.date) > global t > print t.strf

Re: Perl/Python regular expressions vs. Boost.regex?

2008-10-23 Thread Rob Williscroft
wrote in news:[EMAIL PROTECTED] in comp.lang.python: > A colleague wrote a C++ library here at work which uses the > Boost.regex library. I quickly discovered an apparent problem with > how it searches. Unlike re.match the regex_match function in that > library effectively anchors the match at

Re: Python Script Bug

2008-10-23 Thread Chris Rebert
On Thu, Oct 23, 2008 at 11:54 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello everyone, > I would like to know what isn't good in my script. > #!/usr/bin/python > # -*- coding: iso-8859-15 -*- > from time import strftime > import datetime > t = input(datetime.date) input() does not do wha

why would 'import win32com' fail?

2008-10-23 Thread bill
All, I am trying to access Excel from Python. Many of the examples started with: import win32com blah, blah I try that from my Python shell and it fails. What am I missing here? TIA, Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: python extensions: including project local headers

2008-10-23 Thread J Kenneth King
Philip Semanchuk <[EMAIL PROTECTED]> writes: > On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: > >> >> Hey everyone, >> >> I'm working on a python extension wrapper around Rob Hess' >> implementation of a SIFT feature detector. I'm working on a >> computer-vision based project that requires in

paster 64bit windows compile

2008-10-23 Thread Jules Stevenson
Hello all, I've been tearing my hair out trying to get pylon installed most of the day, and it seems that both setup tools and paster.exe have some serious issues with 64bit on windows. Unfortunately I'm stuck with 2.6 64bit. I think I've got it nearly all up and running, the biggest problem is

Re: ANN: gui_support, a convenience library for wxPython

2008-10-23 Thread Joe Strout
On Oct 23, 2008, at 11:50 AM, Stef Mientki wrote: gui_support is library for easy creation of GUI designs in wxPython. ... Brief documentation can be found here http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_gui_support.html That's neat -- thank you for making it available. I've jus

Python Script Bug

2008-10-23 Thread [EMAIL PROTECTED]
Hello everyone, I would like to know what isn't good in my script. #!/usr/bin/python # -*- coding: iso-8859-15 -*- from time import strftime import datetime t = input(datetime.date) global t print t.strftime("Day %w of the week a %A . Day %d of the month (%B). ") print t.strftime("Day %j of the yea

Re: Append a new value to dict

2008-10-23 Thread slais-www
[EMAIL PROTECTED] wrote: Marc 'BlackJack' Rintsch: counter['B'] = counter.get('B', 0) + 1 If you benchmark it, you will find that using the get() method it's quite slower. Slower than if 'B' in counter: > counter['B'] += 1 > else: > counter['B'] = 1 ? It is not slower than default

Re: More efficient array processing

2008-10-23 Thread John [H2O]
Thanks for the clarification. What is strange though, is that I have several Fortran programs that create the exact same array srtucture... wouldn't they be restricted to the 2Gb limit as well? Thoughts on a more efficient work around? Marc 'BlackJack' Rintsch wrote: > > On Thu, 23 Oct 2008 1

Re: More efficient array processing

2008-10-23 Thread Marc 'BlackJack' Rintsch
On Thu, 23 Oct 2008 11:11:32 -0700, John [H2O] wrote: > I'm trying to do the following: > > datagrid = numpy.zeros(360,180,3,73,20) > > But I get an error saying that the dimensions are too large? Is there a > memory issue here? Let's see: You have: 360 * 180 * 3 * 73 * 20 * 8 bytes You want:

Re: OS 10.5 build 64 bits

2008-10-23 Thread Robin Becker
M.-A. Lemburg wrote: igure script. The config options --with-universal-archs is used for this. In theory you could build a 4-way binary for Intel,PPC/32-bit,64-bit. Default is 32-bit only. apparently this issue is known http://bugs.python.org/issue1619130 but I still don't k

More efficient array processing

2008-10-23 Thread John [H2O]
Hello, I'm trying to do the following: datagrid = numpy.zeros(360,180,3,73,20) But I get an error saying that the dimensions are too large? Is there a memory issue here? So, my workaround is this: numpoint = 73 datagrid = numpy.zeros(360,180,3,73,1) for np in range(numpoint): datagrid[:,:

Re: Possible read()/readline() bug?

2008-10-23 Thread Joshua Kugler
Mike Kent wrote: > To followup on this: > > Terry: Yes, I did in fact miss the 'buffer' parameter to open. > Setting the buffer parameter to 0 did in fact fix the test code that I > gave above, but oddly, did not fix my actual production code; it > continues to get the data as first read, rather

ANN: gui_support, a convenience library for wxPython

2008-10-23 Thread Stef Mientki
hello, gui_support is library for easy creation of GUI designs in wxPython. Although it's quit stable, it's part of a larger project and therefor has a lot of dependencies, but these can easily be removed. Warning: Although this library might be very attractive to newbies, the use of this libr

sneaker's house www.maidi2008.com

2008-10-23 Thread www.maidi2008.com
Reply to: [EMAIL PROTECTED] MSN:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

shinning sports shoes suitable clothes accessories www.maidi2008.com

2008-10-23 Thread www.maidi2008.com
Reply to: [EMAIL PROTECTED] MSN:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

sneaker wholesale from China www.maidi2008.com

2008-10-23 Thread www.maidi2008.com
Reply to: [EMAIL PROTECTED] MSN:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

www.maidi2008.com supply good business partner

2008-10-23 Thread www.maidi2008.com
Reply to: [EMAIL PROTECTED] MSN:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

python-list@python.org

2008-10-23 Thread www.maidi2008.com
Reply to: [EMAIL PROTECTED] MSN:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Matthieu Brucher
2008/10/23 M.-A. Lemburg <[EMAIL PROTECTED]>: > On 2008-10-23 09:20, Matthieu Brucher wrote: >> Hi, >> >> I'm trying to use your package, but the gccxml installer is not >> available from your website anymore. Is it possible for you to upload >> it again ? > > Works for me: > > https://sourceforge.

Python26 compilation problem

2008-10-23 Thread Mathew
I am getting Modules/config.c:39: error: expected declaration specifiers or '...' before numeric constant because of extern void initsocket(2)(void); in config.c What is this? How do I fix it? Mathew -- http://mail.python.org/mailman/listinfo/python-list

Re: logging module

2008-10-23 Thread Matimus
On Oct 23, 7:58 am, "Werner F. Bruhin" <[EMAIL PROTECTED]> wrote: > I am starting to use the logging module. > > Simple log to file and/or console work very nicely. > > Even managed to get TimedRotatingFileHandler to work. > > The problem I am trying to solve. > > 1. I would like to have a "log vie

Re: python extensions: including project local headers

2008-10-23 Thread Robert Kern
J Kenneth King wrote: Robert Kern <[EMAIL PROTECTED]> writes: Philip Semanchuk wrote: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer-vision base

Re: re.search over a list

2008-10-23 Thread Bruno Desthuilliers
Steve Holden a écrit : Pat wrote: Bruno Desthuilliers wrote: (snip) words = ['foo', 'bar', 'somestring', 'baaz'] re.search(r"^somestring$", "\n".join(words), re.MULTILINE) (snip) I suspect that any(re.match(pat, word) for word in words) might be a more efficient way to do this. Ind

Re: Perl/Python regular expressions vs. Boost.regex?

2008-10-23 Thread tomohiro kusumi
I was confused when I first used Boost regualr expressions, but I got used to it now. Aside from it, I think Boost regular expression makes you write too much code just to do a simple pattern matching. Tomohiro Kusumi 2008/10/23 <[EMAIL PROTECTED]> > A colleague wrote a C++ library here at work

Re: Question about scope

2008-10-23 Thread Bruno Desthuilliers
Pat a écrit : I have a Globals class. Not sure it's such a great idea, but anyway... What's the use case for this class ? There are perhaps better (or at least more idiomatic) solutions... In it, I have a variable defined something like this: remote_device_enabled = bool Could you show

Re: How to do_size_allocate properly in a gtk.Viewport subclass

2008-10-23 Thread Joel Hedlund
Joel Hedlund wrote: And another relevant question: am I overcomplicating this? Yes. :-) The proper way of doing this is to pack the widget in a container, and then add the container (with viewport) to a scrolledwindow. For example, for a centered widget choose a 1x1 gtk.Table and attach the

  1   2   >