Re: Threaded Design Question

2007-08-10 Thread greg
[EMAIL PROTECTED] wrote: > I ended up taking this route for the most part. The worker thread > first moves the file to be processed into a temp directory, No, the watcher thread should do this itself *before* putting it into the work queue. Then there's no chance of it picking up the same file tw

Re: Destruction of generator objects

2007-08-10 Thread Alex Martelli
Stefan Bellon <[EMAIL PROTECTED]> wrote: > On Thu, 09 Aug, Graham Dumpleton wrote: > > > result = application(environ, start_response) > > try: > > for data in result: > > if data:# don't send headers until body appears > > write(data) > > i

Re: Something in the function tutorial confused me.

2007-08-10 Thread Alex Martelli
Neil Cerutti <[EMAIL PROTECTED]> wrote: ... > The Python Language Reference seems a little confused about the > terminology. > > 3.4.7 Emulating numeric types > 6.3.1 Augmented assignment statements > > The former refers to "augmented arithmetic operations", which I > think is a nice termi

Re: Something in the function tutorial confused me.

2007-08-10 Thread Alex Martelli
greg <[EMAIL PROTECTED]> wrote: > Steve Holden wrote: > > > For some reason your reply got right up my nose, > > I'm sorry about that. Sometimes it's hard to judge the > level of experience with Python that a poster has. In Because of this, a Google search for " " python may sometimes help;

Re: Help with Dictionaries and Classes requested please.

2007-08-10 Thread Alex Martelli
Sion Arrowsmith <[EMAIL PROTECTED]> wrote: > special_dragonfly <[EMAIL PROTECTED]> wrote: > >if key in FieldsDictionary: > >FieldsDictionary[key].append(FieldClass(*line.split(","))) > >else: > >FieldsDictionary[key]=[FieldClass(*line.split(","))] > > These

Re: The Future of Python Threading

2007-08-10 Thread Paul Rubin
Seun Osewa <[EMAIL PROTECTED]> writes: > What is it about Python that makes a thread-safe CPython version much > slower?... > I'm thinking it might be the reference counting approach to memory > management... Yes. In the implementation that was benchmarked, if I understand correctly, every refco

Re: The Future of Python Threading

2007-08-10 Thread Seun Osewa
> I think I've heard Guido say the last attempt at removing the Global > Interpreter Lock (GIL) resulted in a Python that was much slower... What is it about Python that makes a thread-safe CPython version much slower? Why doesn'ttrue threading slow down other languages like Perl and Java? I'm t

Hex editor - Python beginner's code open to review

2007-08-10 Thread CC
Hi: http://web.newsguy.com/crcarl/python/hexl.py This is my first Python program other than tutorial code snippet experimentation. I chose a hex line editor. I may do a hex screen editor once this is done, if I feel like playing with the curses module. Or move straight to wxPython. This i

Re: The Future of Python Threading

2007-08-10 Thread Beorn
Btw, although overly simple (single CPU system!), this benchmark is pretty interesting: http://muharem.wordpress.com/2007/07/31/erlang-vs-stackless-python-a-first-benchmark/ About the GIL: I think I've heard Guido say the last attempt at removing the Global Interpreter Lock (GIL) resulted in

Weekly Python Patch/Bug Summary

2007-08-10 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 404 open ( +0) / 3855 closed ( +8) / 4259 total ( +8) Bugs: 1065 open ( +6) / 6790 closed ( +6) / 7855 total (+12) RFE : 263 open ( +0) / 295 closed ( +0) / 558 total ( +0) New / Reopened Patches __ MSVC++8 x

Re: wxPython - drawing without paint event

2007-08-10 Thread glenn . chappell
On Aug 10, 1:40 am, 7stud <[EMAIL PROTECTED]> wrote: > On Aug 9, 7:46 pm, Matt Bitten <[EMAIL PROTECTED]> wrote: > > > I've got a wxPython program that needs to do some drawing on a DC on a > > regular basis And there is no event, > > so my code doesn't get called. What do I do? > > Then the ev

Re: Extending logging module

2007-08-10 Thread Richard Levasseur
On Aug 9, 9:08 am, jay <[EMAIL PROTECTED]> wrote: > Hello, > > I've been using the python logging module a lot lately, and I've come > across an instance where I need some new levels. Specifically, python > does not include ALERT and NOTICE in the default set of logging > levels. I am wondering h

Threading

2007-08-10 Thread Pablo Yabo
Hello, I'm trying to call Python routines from C/C++. These routines must intereact in a multi-thread environment. I mean that routine A will loop waiting for a condition of routine B. This condition are coded in C so I don't need routine A running in the same interpreter of routine B. I tried u

Re: Threaded Design Question

2007-08-10 Thread half . italian
On Aug 9, 9:45 pm, "Mark T" <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > Hi all! I'm implementing one of my first multithreaded apps, and have > > gotten to a point where I think I'm going off track from a standard > > idiom. Wondering if

Error calling module

2007-08-10 Thread fartknuckle
When I try to call gtk like so: import gtk I get the error: ImportError: No module named gtk I installed a new Python and a new pygtk. Is the gtk module not a part of pygtk??? I have PYTHONPATH=/usr/local/lib/python2.5/site-packages set. So what am I doing wrong? Thanks -- Take summa dis

Re: The Future of Python Threading

2007-08-10 Thread Justin T.
On Aug 10, 10:34 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >I'm not an expert, but I understand that much. What greenlets do is > >force the programmer to think about concurrent programming. It doesn't > >force them to think about real threads, which is good, because a > >computer shoul

Re: float to string with different precision

2007-08-10 Thread Roger Miller
On Aug 10, 8:37 am, Zentrader <[EMAIL PROTECTED]> wrote: > > If the above does not work > [/code]test_list = [ 5.32, 10.35634, 289.234 ] > for num in test_list : >str_num = "%11.5f" % (num) ## expand to at least 5 >print str_num, "-->", str_num.strip()[:5][/code] This has the disadva

Re: Python Dies on "make install"

2007-08-10 Thread fartknuckle
On Fri, 10 Aug 2007 23:39:39 +0200, Jarek Zgoda wrote: > fartknuckle : > >> When I try to build and install python from source It configures and >> makes fine but upon 'make install' I always get to this >> point: >> >> >> >> Listing /usr/local/lib/python2.5/xml/sax ... >> Compiling /usr/loca

[no subject]

2007-08-10 Thread Christian Justo
Hi, I'm simply trying to get mod_python working on my apache server but when I create a .py file the output returned from the browser is the code in the file and not just the output from the script. I have read the manual and tried mptest.py with an .htaccess file both in /var/www/html/ and st

Re: AttributeError: 'module' object has no attribute 'HTTPSHandler'

2007-08-10 Thread [EMAIL PROTECTED]
On 8/10/07, Matt McCredie <[EMAIL PROTECTED]> wrote: > > I built and installed python 2.5 from source and when I do this: > > opener = urllib2.build_opener(SmartRedirectHandler(), > > DefaultErrorHandler(), urllib2.HTTPSHandler()) > > I get this error. > > AttributeError: 'module' object has no att

Re: Module imports during object instantiation

2007-08-10 Thread James Stroud
Ritesh Raj Sarraf wrote: > Hi, > > I've been very confused about why this doesn't work. I mean I don't see any > reason why this has been made not to work. > > class Log: > > def __init__(self, verbose, lock = None): > > if verbose is True: > self.VERBOSE = True >

Re: The Future of Python Threading

2007-08-10 Thread Bjoern Schliessmann
Nick Craig-Wood wrote: [GIL] > That is certainly true. However the point being is that running > on 2 CPUs at once at 95% efficiency is much better than running on > only 1 at 99%... How do you define this percent efficiency? >>> The truth is that the future (and present reality) of almost >>>

Module imports during object instantiation

2007-08-10 Thread Ritesh Raj Sarraf
Hi, I've been very confused about why this doesn't work. I mean I don't see any reason why this has been made not to work. class Log: def __init__(self, verbose, lock = None): if verbose is True: self.VERBOSE = True else: self.VERBOSE = False if lock is

Re: The Future of Python Threading

2007-08-10 Thread Justin T.
On Aug 10, 2:02 pm, [EMAIL PROTECTED] (Luc Heinrich) wrote: > Justin T. <[EMAIL PROTECTED]> wrote: > > What these seemingly unrelated thoughts come down to is a perfect > > opportunity to become THE next generation language. > > Too late: > > :) > > -- > Luc Heinrich Uh oh

Re: Python Dies on "make install"

2007-08-10 Thread Jarek Zgoda
fartknuckle napisał(a): > When I try to build and install python from source It configures and > makes fine but upon 'make install' I always get to this > point: > > > > Listing /usr/local/lib/python2.5/xml/sax ... > Compiling /usr/local/lib/python2.5/xml/sax/__init__.py ... > Compiling /usr/l

Re: The Future of Python Threading

2007-08-10 Thread Luc Heinrich
Justin T. <[EMAIL PROTECTED]> wrote: > What these seemingly unrelated thoughts come down to is a perfect > opportunity to become THE next generation language. Too late: :) -- Luc Heinrich -- http://mail.python.org/mailman/listinfo/python-list

Python Dies on "make install"

2007-08-10 Thread fartknuckle
When I try to build and install python from source It configures and makes fine but upon 'make install' I always get to this point: Listing /usr/local/lib/python2.5/xml/sax ... Compiling /usr/local/lib/python2.5/xml/sax/__init__.py ... Compiling /usr/local/lib/python2.5/xml/sax/_exceptions.py

Fwd: AttributeError: 'module' object has no attribute 'HTTPSHandler'

2007-08-10 Thread Matt McCredie
> I built and installed python 2.5 from source and when I do this: > > opener = urllib2.build_opener(SmartRedirectHandler(), > DefaultErrorHandler(), urllib2.HTTPSHandler()) > > I get this error. > AttributeError: 'module' object has no attribute 'HTTPSHandler' > > What should I do? You need `_ss

Re: wxPython before MainLoop

2007-08-10 Thread Chris Mellon
On 8/9/07, Heikki Toivonen <[EMAIL PROTECTED]> wrote: > [david] wrote: > > I'd like to refresh the display before I start the main loop. > > We have this kind of situation in Chandler, where we display and update > the splash screen before we enter MainLoop. > > 1. Create app object >http://lxr

Re: Ipc mechanisms and designs.

2007-08-10 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, king kikapu <[EMAIL PROTECTED]> wrote: > Hi, > > inspired of the topic "The Future of Python Threading", i started to > realize that the only way to utilize the power of multiple cores using > Python, is spawn processes and "communicate" with them. > > If we have

Re: beginner whitespace question

2007-08-10 Thread eggie5
On Aug 9, 10:37 pm, James Stroud <[EMAIL PROTECTED]> wrote: > Dan Bishop wrote: > >> Tabs are for tables, hence the name. "Use spaces for space and use tabs > >> for tables" can be a little mnemonic to help you remember the rules. We > >> can make a little song together if you can think of some thi

Re: Deleting objects on the fly

2007-08-10 Thread Terry Reedy
"Campbell Barton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Michele Simionato wrote: | > Probably not, 'del x' just decrements the reference count, Or as http://docs.python.org/ref/del.html puts it, " Deletion of a name removes the binding of that name from the local or glob

Re: Stackless Integration

2007-08-10 Thread Terry Reedy
"Justin T." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | > And as far as I know or | > could find in the PEP index, C. Tismer has never submitted a PEP asking | > that it be made so. Doing so would mean a loss of control, so there is a | > downside as well as the obvious upside

Re: float to string with different precision

2007-08-10 Thread Zentrader
On Aug 10, 1:12 am, Peter Otten <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I have to print float numbers to a file. Each float should be 5 > > characters in width (4 numbers and the decimal point). > > My problem is that I do not now how to specify float to have different > > number

Re: Puzzled by "is"

2007-08-10 Thread Trent Mick
Dick Moores wrote: > At 06:13 PM 8/9/2007, Ben Finney wrote: >> It's important to also realise that the language is *deliberately* >> non-committal on whether any given value will have this behaviour; >> that is, it's entirely left to the language implementation which >> optimisation trade-offs to

Re: Puzzled by "is"

2007-08-10 Thread Marc 'BlackJack' Rintsch
On Fri, 10 Aug 2007 10:57:22 -0700, Dick Moores wrote: > At 06:13 PM 8/9/2007, Ben Finney wrote: >>Others have already said that it's an implementation optimisation, >>which seems to partly answer your question. >> >>It's important to also realise that the language is *deliberately* >>non-committa

pat-match.lisp or extend-match.lisp in Python?

2007-08-10 Thread ekzept
anyone have either pat-match.lisp or extend-match.lisp redone in Python? or how about knowing where there might be such a thing? sources: http://norvig.com/paip/patmatch.lisp http://www.cs.northwestern.edu/academics/courses/325/programs/extend-match.lisp -- http://mail.python.org/mailm

Re: py2exe with python 2.5

2007-08-10 Thread vedrandekovic
On 10 kol, 14:38, Ant <[EMAIL PROTECTED]> wrote: > On Aug 10, 11:47 am, [EMAIL PROTECTED] wrote: > > > On 10 kol, 11:02, Ant <[EMAIL PROTECTED]> wrote: > ... > > yes,Python 2.5 is on the path, but how can I remove panda3d from that > > path? > > Hit Win - Break to bring up the System Properties dia

Re: Puzzled by "is"

2007-08-10 Thread Dick Moores
At 06:13 PM 8/9/2007, Ben Finney wrote: >Content-Transfer-Encoding: base64Grzegorz >Słodkowicz <[EMAIL PROTECTED] [EMAIL PROTECTED] >theorisation but I'd rather expect the interpreter > > simply not to create a second tuple while there already is an > > identical one. > >Others have already sai

Re: is there anybody using __del__ correctly??

2007-08-10 Thread Michele Simionato
On Aug 10, 7:09 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > There were also a few recipes posted during this discussion that wrap > weakrefs up a bit nicer so it's easier to use them in place of __del__: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/519635http://aspn.activestate.c

Re: The Future of Python Threading

2007-08-10 Thread Jean-Paul Calderone
On Fri, 10 Aug 2007 16:37:19 -, "Justin T." <[EMAIL PROTECTED]> wrote: >On Aug 10, 3:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Fri, 10 Aug 2007 10:01:51 -, "Justin T." <[EMAIL PROTECTED]> wrote: >> >Hello, >> >> >While I don't pretend to be an authority on the subject, a f

Re: is there anybody using __del__ correctly??

2007-08-10 Thread Steven Bethard
Raymond Hettinger wrote: > [Michele Simionato] >> Here and there I hear rumors about deprecating __del__ and >> nothing >> happens, are there any news about that? Expecially concerning Py3k? > > I was writing a Py3K PEP advocating the elimination of __del__ > because: > > * 'with closing()' and

AttributeError: 'module' object has no attribute 'HTTPSHandler'

2007-08-10 Thread [EMAIL PROTECTED]
Hi I built and installed python 2.5 from source and when I do this: opener = urllib2.build_opener(SmartRedirectHandler(), DefaultErrorHandler(), urllib2.HTTPSHandler()) I get this error. AttributeError: 'module' object has no attribute 'HTTPSHandler' What should I do? -- http://mail.python.org/

Re: The Future of Python Threading

2007-08-10 Thread Justin T.
On Aug 10, 3:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Justin T. wrote: > > Hello, > > > While I don't pretend to be an authority on the subject, a few days of > > research has lead me to believe that a discussion needs to be started > > (or continued) on the state and direction of multi-thr

Re: (Re)announcing APL 2007

2007-08-10 Thread rjp
On Aug 6, 9:20 am, Paul Mansour <[EMAIL PROTECTED]> wrote: > APL2007 Roll Call: Is anyone going to this? > > I'm thinking about going, but I don't want to the only one to show up, > as in San Diego. Here here. Sorry to mention the elephant in the room, but this discussion begs the obvious questi

Re: The Future of Python Threading

2007-08-10 Thread Justin T.
On Aug 10, 3:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Fri, 10 Aug 2007 10:01:51 -, "Justin T." <[EMAIL PROTECTED]> wrote: > >Hello, > > >While I don't pretend to be an authority on the subject, a few days of > >research has lead me to believe that a discussion needs to be star

Re: is there anybody using __del__ correctly??

2007-08-10 Thread Raymond Hettinger
[Michele Simionato] > Here and there I hear rumors about deprecating __del__ and > nothing > happens, are there any news about that? Expecially concerning Py3k? I was writing a Py3K PEP advocating the elimination of __del__ because: * 'with closing()' and try/finally are the preferred ways of ca

Re: The Future of Python Threading

2007-08-10 Thread Aahz
In article <[EMAIL PROTECTED]>, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > >This would of course make C extensions more complicated... It's even worse than that. One of the goals for Python is to make it easy to call into random libraries, and there are still plenty around that aren't thread-s

Re: The Future of Python Threading

2007-08-10 Thread brad
brad wrote: > This is all anecdotal... threads in Python work great for me. I like > Ruby's green threads too, I forgot to mention that Ruby is moving to a GIL over green threads in v2.0 -- http://mail.python.org/mailman/listinfo/python-list

Re: The Future of Python Threading

2007-08-10 Thread Chris Mellon
On 8/10/07, Ben Sizer <[EMAIL PROTECTED]> wrote: > On 10 Aug, 15:38, Ben Finney <[EMAIL PROTECTED]> > wrote: > > "Justin T." <[EMAIL PROTECTED]> writes: > > > The truth is that the future (and present reality) of almost every > > > form of computing is multi-core, and there currently is no effectiv

Re: The Future of Python Threading

2007-08-10 Thread brad
Justin T. wrote: > Hello, > > While I don't pretend to be an authority on the subject, a few days of > research has lead me to believe that a discussion needs to be started > (or continued) on the state and direction of multi-threading python. This is all anecdotal... threads in Python work great

building a rather simple server in python

2007-08-10 Thread boazin
Hi all, I was trying to build a rather simple server (with a twist) using asyncore and got myself complicated. Well, here's the deal: My server will handle multiple connections, some require reply, and some not (they will disconnect by themselves) all the clients want to to deliver binary data to

building a rather simple server in python

2007-08-10 Thread boazin
Hi all, I was trying to build a rather simple server (with a twist) using asyncore and got myself complicated. Well, here's the deal: My server will handle multiple connections, some require reply, and some not (they will disconnect by themselves) all the clients want to to deliver binary data to

Leo 4.4.4 beta 1 released

2007-08-10 Thread Edward K Ream
Leo 4.4.4 beta is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.4: - A thre

Re: Ipc mechanisms and designs.

2007-08-10 Thread Alex Martelli
king kikapu <[EMAIL PROTECTED]> wrote: > Hi, > > inspired of the topic "The Future of Python Threading", i started to > realize that the only way to utilize the power of multiple cores using > Python, is spawn processes and "communicate" with them. > > If we have the scenario: > > 1. Windows (m

cookielib

2007-08-10 Thread Boris Ozegovic
Hi I have HTTP client which accepts cookies. If client allready has cookie, but that cookie has expired, server sends him new cookie, and in response object Set-Cookie: header everything is fine, but if I reload request, client sends expired cookie, and not the new one. In cookiejar there is onl

Re: Issues of state

2007-08-10 Thread Jay Loden
Steve Holden wrote: > greg wrote: >> Jay Loden wrote: >>> Like most things involving dynamic client side-javascript code and AJAX >>> technology, it's a lot harder than you'd like it to be to solve the >>> problem, but >>> in cases where the Back button is really an issue, it's worth the effort. >

Re: The Future of Python Threading

2007-08-10 Thread Ben Sizer
On 10 Aug, 15:38, Ben Finney <[EMAIL PROTECTED]> wrote: > "Justin T." <[EMAIL PROTECTED]> writes: > > The truth is that the future (and present reality) of almost every > > form of computing is multi-core, and there currently is no effective > > way of dealing with concurrency. > > Your post seems

Ipc mechanisms and designs.

2007-08-10 Thread king kikapu
Hi, inspired of the topic "The Future of Python Threading", i started to realize that the only way to utilize the power of multiple cores using Python, is spawn processes and "communicate" with them. If we have the scenario: 1. Windows (mainly) development 2. Processes are running in the same ma

Re: The Future of Python Threading

2007-08-10 Thread Nick Craig-Wood
Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Justin T. wrote: > > > The detrimental effects of the GIL have been discussed several > > times and nobody has ever done anything about it. > > Also it has been discussed that dropping the GIL concept requires > very fine locking mechanisms ins

Re: High performance binary data

2007-08-10 Thread sturlamolden
On Aug 10, 2:26 am, Steve <[EMAIL PROTECTED]> wrote: > I want to ready binary data from a udp socket effeciently as possible > in python. I know of the struct package but do people have any tips > when dealing with binary data in python? Is there a library or api > that is faster when dealing wit

Re: The Future of Python Threading

2007-08-10 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: >Justin T. wrote: > >> The detrimental effects of the GIL have been discussed several >> times and nobody has ever done anything about it. > >Also it has been discussed that dropping the GIL concept requires >very fine

Re: The Future of Python Threading

2007-08-10 Thread king kikapu
> All of which is avoided by designing the program to operate as > discrete processes communicating via well-defined IPC mechanisms. Hi Ben, i would like to learn more about this, have you got any links to give me so i can have a look ? -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython before MainLoop

2007-08-10 Thread Steve Holden
[david] wrote: > [...] I don't think wxPython is really ready for Windows. > I don't think you are really ready to for GUIs ;-) Fortunately, it doesn't matter what *I* think. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holden

Re: The Future of Python Threading

2007-08-10 Thread Ben Finney
"Justin T." <[EMAIL PROTECTED]> writes: > The truth is that the future (and present reality) of almost every > form of computing is multi-core, and there currently is no effective > way of dealing with concurrency. Your post seems to take threading as the *only* way to write code for multi-core s

Re: High performance binary data

2007-08-10 Thread Nick Craig-Wood
Steve <[EMAIL PROTECTED]> wrote: > I want to ready binary data from a udp socket effeciently as possible > in python. I know of the struct package but do people have any tips > when dealing with binary data in python? Is there a library or api > that is faster when dealing with binary data. I

Re: wxPython before MainLoop

2007-08-10 Thread Bjoern Schliessmann
[david] wrote: > I'm disappointed that I didn't get a wxPython solution. > > If the only way to get wxPython to correctly handle > this simple task is to code around it, LOL -- did you try coding this app with native windows means, like MFC? You will have *exactly* the same problem, and *exactl

Re: Smoother Lines in Turtle Graphics

2007-08-10 Thread kyosohma
On Aug 9, 6:56 pm, tomy <[EMAIL PROTECTED]> wrote: > Hi All > I am a newbie to turtle graphics in python, so sorry if you find this > question too easy. > How can I get smoother lines in turtle graphics? > I am using python on windows. > > Thanks in advance You may be better off using PIL or pygam

Re: The Future of Python Threading

2007-08-10 Thread Aahz
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > >I doubt that a thread on c.l.py is going to change much. It's the >python-dev and py3k lists where you'll need to take up the cudgels, >because I can almost guarantee nobody is going to take the GIL out of >2.6 or 2.7.

Re: The Future of Python Threading

2007-08-10 Thread kyosohma
On Aug 10, 5:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Justin T. wrote: > > Hello, > > > The nice thing is that this requires a fairly doable amount of work. > > First, stackless should be integrated into the core. Then there should > > be an effort to remove the reliance on the GIL for pyth

Re: Does PyModule_GetDict return information about class method variables?

2007-08-10 Thread Marc 'BlackJack' Rintsch
On Fri, 10 Aug 2007 05:54:03 -0700, MD wrote: > On Aug 10, 12:43 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> class A(object): >> def foo(self): >> bar = 42 >> >> The local name `bar` only exists if `foo()` is called on an instance of `A`. > >Thanks for your reply. I

Re: wxPython before MainLoop

2007-08-10 Thread kyosohma
On Aug 9, 8:51 pm, "[david]" <[EMAIL PROTECTED]> wrote: > I'm disappointed that I didn't get a wxPython solution. > > If the only way to get wxPython to correctly handle > this simple task is to code around it, I don't think > wxPython is really ready for Windows. > > Is there a better place to ask

Re: Python MAPI

2007-08-10 Thread kyosohma
On Aug 10, 5:05 am, vasudevram <[EMAIL PROTECTED]> wrote: > On Jul 23, 6:07 pm, [EMAIL PROTECTED] wrote: > > >Well, I ran Process Monitor with some filters enabled to only watch > > Thunderbird and MS Word. Unfortunately, that didn't give me any of the > registry edits, so I disabled my filters and

Re: Does PyModule_GetDict return information about class method variables?

2007-08-10 Thread MD
Hi Marc, Thanks for your reply. I am calling my extension function from the class method itself. So at that point the variable does exist. I am puzzled why PyModule_GetDict is not able to access the variable even though it does exist at that point. Thanks, -Manas On Aug 10, 12:43 am, Marc 'Bla

Re: wxPython before MainLoop

2007-08-10 Thread Chris Mellon
On 8/9/07, [david] <[EMAIL PROTECTED]> wrote: > I'm disappointed that I didn't get a wxPython solution. > > If the only way to get wxPython to correctly handle > this simple task is to code around it, I don't think > wxPython is really ready for Windows. > This sort of blathering is really just in

Re: Question about properties.

2007-08-10 Thread Gerardo Herzig
king kikapu wrote: >On Aug 10, 1:33 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > >>On Fri, 10 Aug 2007 03:21:29 -0700, king kikapu wrote: >> >> >>>Hi, >>> >>> >>>i read in a book the following code snippet that is dealing with >>>properties: >>> >>> >>>class Protec

Re: py2exe with python 2.5

2007-08-10 Thread Ant
On Aug 10, 11:47 am, [EMAIL PROTECTED] wrote: > On 10 kol, 11:02, Ant <[EMAIL PROTECTED]> wrote: ... > yes,Python 2.5 is on the path, but how can I remove panda3d from that > path? Hit Win - Break to bring up the System Properties dialog (you can also get here through the Control Panel). Go to th

Re: Question about properties.

2007-08-10 Thread Dustan
On Aug 10, 5:31 am, [EMAIL PROTECTED] wrote: > On Aug 10, 12:21 pm, king kikapu <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > i read in a book the following code snippet that is dealing with > > properties: > > > class ProtectAndHideX(object): > > def __init__(self, x): > > assert isin

Re: Stackless Integration

2007-08-10 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : > Steve Holden a écrit : (snip) >> Twisted is a complex set of packages > > Sure. Now I may be dumb, but I thought it was about stackless, not about > Twisted... Sorry, didn't saw your other post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about properties.

2007-08-10 Thread Antti Rasinen
> Hi, > > i read in a book the following code snippet that is dealing with > properties: > > class ProtectAndHideX(object): > def __init__(self, x): > assert isinstance(x, int), '"x" must be an integer!"' > self.__x = ~x > > def get_x(self): > return ~self.__x > >

Re: Threaded Design Question

2007-08-10 Thread Graeme Glass
Using IPC is just adding needles complexity to your program. Instead of constantly scanning the directory for files and then adding them to a Queue, and then having to worry if that specific file may have already been popped off the queue and is currently running by one of the workers, just poll th

Re: Smoother Lines in Turtle Graphics

2007-08-10 Thread Steve Holden
Jeremy Sanders wrote: > Ant wrote: > >> Python: Batteries and Turtles included! > > I didn't know that! It looks like turtle is based on Tk, which doesn't have > antialiasing yet (see http://wiki.tcl.tk/10101 ), so it can't really be > made nice and smooth (unless you could somehow use tkzinc/tkp

Re: Question about properties.

2007-08-10 Thread Steve Holden
king kikapu wrote: > On Aug 10, 1:33 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Fri, 10 Aug 2007 03:21:29 -0700, king kikapu wrote: >>> Hi, >>> i read in a book the following code snippet that is dealing with >>> properties: >>> class ProtectAndHideX(object): >>> def __init__

Re: The Future of Python Threading

2007-08-10 Thread Bjoern Schliessmann
Justin T. wrote: > The detrimental effects of the GIL have been discussed several > times and nobody has ever done anything about it. Also it has been discussed that dropping the GIL concept requires very fine locking mechanisms inside the interpreter to keep data serialised. The overhead managi

Re: subprocess.Popen(cmd) question

2007-08-10 Thread WolfgangZ
WolfgangZ schrieb: > Hello, > > I'm starting some subprocesses inside a loop. The processes run > independent and dont need any communication between each other. Due to > memory issues I need to limit the number of running processes to around > 10. How can I insert a break into my loop to wait

Re: The Future of Python Threading

2007-08-10 Thread Paul Boddie
On 10 Aug, 12:01, "Justin T." <[EMAIL PROTECTED]> wrote: > > While I don't pretend to be an authority on the subject, a few days of > research has lead me to believe that a discussion needs to be started > (or continued) on the state and direction of multi-threading python. > > Python is not multi-

Re: subprocess.Popen(cmd) question

2007-08-10 Thread Peter Otten
WolfgangZ wrote: > I'm starting some subprocesses inside a loop. The processes run > independent and dont need any communication between each other. Due to > memory issues I need to limit the number of running processes to around > 10. How can I insert a break into my loop to wait until some proce

Re: Smoother Lines in Turtle Graphics

2007-08-10 Thread Jeremy Sanders
Ant wrote: > Python: Batteries and Turtles included! I didn't know that! It looks like turtle is based on Tk, which doesn't have antialiasing yet (see http://wiki.tcl.tk/10101 ), so it can't really be made nice and smooth (unless you could somehow use tkzinc/tkpath to draw with). I suppose turtl

Re: programmatically define a new variable on the fly

2007-08-10 Thread Bart Ogryczak
On 10 ago, 00:11, Lee Sander <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to define a new variable which is not predefined by me. > For example, > I want to create an array called "X%s" where "%s" is to be determined > based on the data I am processing. So, for example, if I the file > I'm rea

Re: Smoother Lines in Turtle Graphics

2007-08-10 Thread Ant
On Aug 10, 11:41 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > tomy wrote: > > Hi All ... > What turtle graphics? I'm not aware that there is some > standard-turtle-graphics available, so it might be a problem of your > turtle-graphics-package. > > Diez import turtle Its part of the standar

Re: The Future of Python Threading

2007-08-10 Thread Steve Holden
Justin T. wrote: > Hello, > > While I don't pretend to be an authority on the subject, a few days of > research has lead me to believe that a discussion needs to be started > (or continued) on the state and direction of multi-threading python. [...] > What these seemingly unrelated thoughts come d

Re: The Future of Python Threading

2007-08-10 Thread Jean-Paul Calderone
On Fri, 10 Aug 2007 10:01:51 -, "Justin T." <[EMAIL PROTECTED]> wrote: >Hello, > >While I don't pretend to be an authority on the subject, a few days of >research has lead me to believe that a discussion needs to be started >(or continued) on the state and direction of multi-threading python. >

Re: Question about properties.

2007-08-10 Thread king kikapu
Maybe is just a writers' "play" and nothing else. -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe with python 2.5

2007-08-10 Thread vedrandekovic
On 10 kol, 11:02, Ant <[EMAIL PROTECTED]> wrote: > On Aug 10, 8:39 am, [EMAIL PROTECTED] wrote: > > > > > Hello, > > > Now,I was install python 2.5 and remove python 2.4 completely.After I > > write: > > $ python mysetup.py py2exe > > ... > > import py2exe_ util > > ImportError: Module use

Re: Question about properties.

2007-08-10 Thread king kikapu
On Aug 10, 1:33 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 10 Aug 2007 03:21:29 -0700, king kikapu wrote: > > Hi, > > > i read in a book the following code snippet that is dealing with > > properties: > > > class ProtectAndHideX(object): > > def __init__(self, x): > >

Re: Smoother Lines in Turtle Graphics

2007-08-10 Thread Diez B. Roggisch
tomy wrote: > Hi All > I am a newbie to turtle graphics in python, so sorry if you find this > question too easy. > How can I get smoother lines in turtle graphics? > I am using python on windows. What turtle graphics? I'm not aware that there is some standard-turtle-graphics available, so it mig

Re: Issues of state

2007-08-10 Thread Steve Holden
greg wrote: > Jay Loden wrote: >> Like most things involving dynamic client side-javascript code and AJAX >> technology, it's a lot harder than you'd like it to be to solve the problem, >> but >> in cases where the Back button is really an issue, it's worth the effort. > > So if you're willing to

Re: Question about properties.

2007-08-10 Thread Marc 'BlackJack' Rintsch
On Fri, 10 Aug 2007 03:21:29 -0700, king kikapu wrote: > Hi, > > i read in a book the following code snippet that is dealing with > properties: > > class ProtectAndHideX(object): > def __init__(self, x): > assert isinstance(x, int), '"x" must be an integer!"' > self.__x = ~x

Re: Question about properties.

2007-08-10 Thread dijkstra . arjen
On Aug 10, 12:21 pm, king kikapu <[EMAIL PROTECTED]> wrote: > Hi, > > i read in a book the following code snippet that is dealing with > properties: > > class ProtectAndHideX(object): > def __init__(self, x): > assert isinstance(x, int), '"x" must be an integer!"' > self.__x = ~

Question about properties.

2007-08-10 Thread king kikapu
Hi, i read in a book the following code snippet that is dealing with properties: class ProtectAndHideX(object): def __init__(self, x): assert isinstance(x, int), '"x" must be an integer!"' self.__x = ~x def get_x(self): return ~self.__x x = property(get_x)

  1   2   >