Re: What tools are used to write and generate Python Library documentation.

2005-09-26 Thread Robert Kern
Kenneth McDonald wrote: > I have a module I'd like to document using the same style... http://docs.python.org/doc/doc.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.or

Re: What tools are used to write and generate Python Library documentation.

2005-09-26 Thread beza1e1
Do you think of pydoc? Just make comments in your code this way: def add10(x): """this function adds ten to the given variable""" Then save this into add.py and now (in the same directory): pydoc add Voila, your documentation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic character substitution.

2005-09-26 Thread Steve Jorgensen
On Mon, 26 Sep 2005 21:09:51 -0400, "John Bausano" <[EMAIL PROTECTED]> wrote: >Hello all, ... Funny enough, some people have wanted to substitute a more dynamic character for me on occasion . -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic character substitution.

2005-09-26 Thread Tim Roberts
"John Bausano" <[EMAIL PROTECTED]> wrote: > >Hello all, > >I've been using Ansys which is a commercial FEA package which can be >controlled through its own scripting language they call APDL. Now I'm >trying to write some stand alone code in Python to supplement my current >efforts. > >In Ansys

Re: Metaclasses, decorators, and synchronization

2005-09-26 Thread Michele Simionato
Michael Ekstrand ha scritto: > One issue remains in this function: my method's signature is lost when > synchronized is applied (at least as somemeth=synchronized(somemeth); > I'm currently in a 2.3 environment that doesn't have the decorator > syntax, but my understanding is that makes no differe

Re: Best practices for dynamically loading plugins at startup

2005-09-26 Thread Jeff Schwab
Christoph Haas wrote: > On Sun, Sep 25, 2005 at 11:33:03PM -0400, Jeff Schwab wrote: > >>I recently came up against this exact problem. My preference is to have >>the plugin writer call a method to register the plugins, as this allows >>him the most control. Something along these lines: >> >>

Re: webbrowser failing

2005-09-26 Thread DogWalker
"Thomas Thomas" <[EMAIL PROTECTED]> said: >Hi All, > >import webbrowser >url='http://www.cnn.com' >webbrowser.open(url) > >giving the error > >Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32 >Type "help", "copyright", "credits" or "license" for more information.

Re: PEP 350: Codetags

2005-09-26 Thread Paul Rubin
Tony Meyer <[EMAIL PROTECTED]> writes: > Does this mean that you think that PEP 8 (Python Code Style Guide) > should be enforced by the compiler? So that (e.g) lines that are too > long just don't compile? I'd be ok with compiler warning messages from lines that are too long. I think it's appropr

Re: What tools are used to write and generate Python Library documentation.

2005-09-26 Thread James Stroud
ReStructureText is pretty cool. Try it out. http://docutils.sourceforge.net/rst.html On Monday 26 September 2005 20:24, Kenneth McDonald wrote: > I have a module I'd like to document using the same style... > > Thanks, > Ken -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951

What tools are used to write and generate Python Library documentation.

2005-09-26 Thread Kenneth McDonald
I have a module I'd like to document using the same style... Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

A 'find' utility that continues through zipped directory structure?

2005-09-26 Thread B Mahoney
Is there a Python 'find' -like utility that will continue the file search through any zippped directory structure on the find path? -- http://mail.python.org/mailman/listinfo/python-list

Re: number of python users

2005-09-26 Thread Bryan
Fredrik Lundh wrote: > Bryan wrote: > >>is there a rough estimate somewhere that shows currently how many python 1.5 >>vs >>2.2 vs 2.3 vs 2.4 users there are? have a majority moved to 2.4? or are they >>still using 2.3? etc... > > > Here are current PIL download statistics (last 10 days): > >

Re: PEP 350: Codetags

2005-09-26 Thread Tony Meyer
On 27/09/2005, at 12:21 PM, Paul Rubin wrote: > Neil Hodgson <[EMAIL PROTECTED]> writes: > >> The PEP system allows for the documentation of a convention as an >> "Informational PEP". Documenting conventions is useful. > > If the preferred method of doing something is > consistent enough that

Re: Struggling with this concept please help

2005-09-26 Thread John Hazen
* George <[EMAIL PROTECTED]> [2005-09-25 16:20]: > Hello everyone I know many have helped but I cannot get this to work > out correctly. > Please help I have never done python before and I can't seem to get the > hang of it. You posted code. Is what's in the docstring actual output? If so, what

Dynamic character substitution.

2005-09-26 Thread John Bausano
Hello all, I've been using Ansys which is a commercial FEA package which can be controlled through its own scripting language they call APDL. Now I'm trying to write some stand alone code in Python to supplement my current efforts. In Ansys I can do something like this. *do,n,1,3

Sparse matrices

2005-09-26 Thread George Sakkis
Is there any sparse matrix package compatible with Numeric/Numarray ? Ideally, the implementation of a matrix (dense/sparse) should be transparent to the application. However the APIs of the only packages I'm aware of -- the Sparse module in Scipy and PySparse --are both pretty incomplete compar

How does company culture affect you?

2005-09-26 Thread bruce_taylor
Please forgive me if this is a little off topic, but I'm trying to reach a population of active programmers and this seems to be a popular gathering place. I am conducting research on how company cultures affect programmer productivity. If you would be willing to take 5 minutes to answer a few

Re: PEP 350: Codetags

2005-09-26 Thread Paul Rubin
Neil Hodgson <[EMAIL PROTECTED]> writes: > The PEP system allows for the documentation of a convention as an > "Informational PEP". Documenting conventions is useful. Where there are conventions, they should be documented. I'm in favor of fewer conventions. If the preferred method of doing s

Re: PEP 350: Codetags

2005-09-26 Thread George Sakkis
"Paul Rubin" wrote: > I'm opposed to pretty much every proposal of this sort. If you want > to propose adding a feature to the language, add it in a way that the > compiler can know about it and notice when it's not used correctly. > Mere conventions that are not checke

Re: PEP 350: Codetags

2005-09-26 Thread Neil Hodgson
Paul Rubin: > Mere conventions that are not checked by the compiler are just more > stuff for people to remember. That doesn't say they're always useless > but in general they should not be the subject of PEP's. The PEP system allows for the documentation of a convention as an "Informationa

Re: PEP 350: Codetags

2005-09-26 Thread Terry Reedy
"Micah Elliott" <[EMAIL PROTECTED]> [CCed] wrote in message [news:[EMAIL PROTECTED] The nice thing about this is that I can use whatever part (or whatever version) I want regardless of whether it becomes a standard library style recommendation. I would prefer tags that are short and pronounca

Re: PEP 350: Codetags

2005-09-26 Thread Paul Rubin
I'm opposed to pretty much every proposal of this sort. If you want to propose adding a feature to the language, add it in a way that the compiler can know about it and notice when it's not used correctly. Mere conventions that are not checked by the compiler are just more stuff for people to reme

Re: PEP 350: Codetags

2005-09-26 Thread Tom Anderson
On Mon, 26 Sep 2005, Micah Elliott wrote: > Please read/comment/vote. This circulated as a pre-PEP proposal > submitted to c.l.py on August 10, but has changed quite a bit since > then. I'm reposting this since it is now "Open (under consideration)" > at

Re: attribute error

2005-09-26 Thread Mike Meyer
"M.N.A.Smadi" <[EMAIL PROTECTED]> writes: > HI; > > I am having the following error. I am using someone else's code and > all they are doing is pass an argv to a function then > > def execute_action(manager, argv): > method_name = argv.pop(0).lower() > > > and am getting this strange error.

Re: subprocess considered harmfull?

2005-09-26 Thread Roger Upole
"Uri Nix" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Roger Upole wrote: >> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> > Steven Bethard wrote: >> > >> >> > Using the following snippet: >> >> > p = >> >> > subprocess.Popen(nmake,stderr=subproc

Re: Vancouver Python and Zope: Next Meeting Oct 2nd

2005-09-26 Thread David Ascher
On 9/26/05, Casey Hawthorne <[EMAIL PROTECTED]> wrote: > Where is ActiveState? 580 Granville St, (corner of Dunsmuir). See http://maps.google.com/maps?q=580+Granville+St,+Vancouver+BC&spn=0.027339,0.057730&hl=en -- http://mail.python.org/mailman/listinfo/python-list

Re: attribute error

2005-09-26 Thread Steven D'Aprano
On Mon, 26 Sep 2005 18:28:56 -0400, M.N.A.Smadi wrote: > HI; > > I am having the following error. I am using someone else's code and > all they are doing is pass an argv to a function then > > def execute_action(manager, argv): > method_name = argv.pop(0).lower() > > > and am getting th

Re: ncurses programming

2005-09-26 Thread Colin Bell
Theres also Urwid , a user interface library built around curses which looks quite good. I started using it on a project a little while ago but got sidetracked. -- http://mail.python.org/mailman/listinfo/python-list

Re: Vancouver Python and Zope: Next Meeting Oct 2nd

2005-09-26 Thread Casey Hawthorne
Where is ActiveState? On Mon, 26 Sep 2005 11:58:33 -0700, you wrote: >The Vancouver Python and Zope user groups next meeting is on Oct 4th, at >the usual place, ActiveState at 7. > >Mishtu Banerjee will be giving a talked entitled "Desperately Seeking >Abstraction" > >"I built an SQL query gene

attribute error

2005-09-26 Thread M.N.A.Smadi
HI; I am having the following error. I am using someone else's code and all they are doing is pass an argv to a function then def execute_action(manager, argv): method_name = argv.pop(0).lower() and am getting this strange error. AttributeError: 'str' object has no attribute 'pop' am us

PEP 350: Codetags

2005-09-26 Thread Micah Elliott
Please read/comment/vote. This circulated as a pre-PEP proposal submitted to c.l.py on August 10, but has changed quite a bit since then. I'm reposting this since it is now "Open (under consideration)" at . Thanks! -- Micah Elliott PEP: 350 Title: C

Re: Memory stats

2005-09-26 Thread Martin v. Löwis
Tarek Ziadé wrote: > I am trying to find a general memory profiler that can measure the > memory usage in Python program > and gather some stats about object usages, and things like that. As Diez says, use gc: gc.getobjects() gives you all container objects. If you want a list of all objects (cont

Re: Metaclasses, decorators, and synchronization

2005-09-26 Thread Michael Ekstrand
On Sep 26, 2005, at 4:21 PM, Scott David Daniels wrote: > Unnecessarily holding a lock while acquiring another can be a nasty > source of deadlock or at least delay. Another source of problems is > holding a lock because an exception skipped past the release code. I had thought of part of that af

Re: Metaclasses, decorators, and synchronization

2005-09-26 Thread Scott David Daniels
Michael Ekstrand wrote: > Something like this (not yet tested): > > import threading > global_lock = threading.Lock() > def synchronized(meth): > def inner(self, *args, **kwargs): > try: > self._sync_lock.acquire() > except AttributeError: > global_lock.

Re: Best practices for dynamically loading plugins at startup

2005-09-26 Thread Christoph Haas
On Sun, Sep 25, 2005 at 11:33:03PM -0400, Jeff Schwab wrote: > I recently came up against this exact problem. My preference is to have > the plugin writer call a method to register the plugins, as this allows > him the most control. Something along these lines: > > class A_plugin(Plugin)

Re: Carrying variables over from function to function

2005-09-26 Thread Bruno Desthuilliers
Ivan Shevanski a écrit : > Alright heres my problem. . .Say I want to carry over a variable from > one function to another or even another run of the same function. Is > that possible? Heres a quick example of what I'm talking about. > > def abc(): >x = 1 >y = x + 1 >print y > > def

Dr. Dobb's Python-URL! - weekly Python news and links (Sep 26)

2005-09-26 Thread Diez B. Roggisch
QOTW: "This is Open Source. If you want an initiative, start one." -- Rheinold Birkenfeld "I've found jython incredibly helpful in learning java." -- pythonUser_07 The fourth annual "Free Software and Open Source Symposium" hosted by Canada's largest college includes a talk on "Python P

Re: Need to pass Object by value into a list

2005-09-26 Thread Bruno Desthuilliers
Aaron a écrit : > I have a data sructure setup and I populate it in a loop like so: > > y=0 > while X: >DS.name = "ASDF" >DS.ID = 1234 >list[y] = DS; >y = y + 1 > > print list Traceback (most recent call last): File "", line 1, in ? File "/usr/tmp/python-9150sSF", line 2,

RE: Plotting points to screen

2005-09-26 Thread Michael . Coll-Barth
Jason, YMMV = Your Mileage May Vary In other words, how well it works for you depends on a lot of things. You need to determine the suitability for a given task. :) Michael Don't like the legal notice at the end of my email? Too bad, you can stuff it where the sun don't shine. -O

Re: Plotting points to screen

2005-09-26 Thread Fredrik Lundh
Jay wrote: > One question, that's twice in as many days that someone has said "YMMV". > > What's it mean!? http://www.google.com/search?q=acronym+ymmv -- http://mail.python.org/mailman/listinfo/python-list

Re: Metaclasses, decorators, and synchronization

2005-09-26 Thread Michael Ekstrand
On Sep 26, 2005, at 2:16 PM, Tom Anderson wrote: > You could define a meta-lock, and use that to protect the > lock-installation action. Something like this (not yet tested): import threading global_lock = threading.Lock() def synchronized(meth): def inner(self, *args, **kwargs):

Re: Plotting points to screen

2005-09-26 Thread Jason
jay graves wrote: > I've used both pygame and PIL for this in the past. (i'm plotting a > non-standard 3d data format from a in-house app) > Pygame was nice because I put a key handler in to reload the file and > do a little zooming/panning and when I wanted to save a particular plot > I would jus

Re: Python Programming

2005-09-26 Thread Michael Ekstrand
On Sep 26, 2005, at 1:46 PM, David Edwards wrote: > I've got a short, simple Python script that is > supposed to read a midi file and produce a text file > of note and volume information, then render that info > in another program. > > Unfortunately, I can't get it to work, so I was > wondering if

Re: PyDev 0.9.8.2 released

2005-09-26 Thread Alacrite
Anyone know how to get IPython to display properly when using it as an external tool? It will display nothing and give no feedback until output of some kind then it will do it all at once. Love the plug-in though! thanks Fabio -- http://mail.python.org/mailman/listinfo/python-list

Re: Would this be Guido's pen? [OT]

2005-09-26 Thread Terry Reedy
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > http://www.empirepens.com/signum_python.html "Each cap in this series is hand covered with genuine python." Am I to understand that they actually mean real python skin, as opposed to a 'genuine' python skin des

Re: Plotting points to screen

2005-09-26 Thread jay graves
I've used both pygame and PIL for this in the past. (i'm plotting a non-standard 3d data format from a in-house app) Pygame was nice because I put a key handler in to reload the file and do a little zooming/panning and when I wanted to save a particular plot I would just use a screen capture progr

Debugging callbacks?

2005-09-26 Thread brucedickey
Title: Debugging callbacks? Hi All, I have a Python app that receives CORBA callbacks in Linux. I post a msg to the GUI and am having refresh issues with some GTK controls in wxPython. The Python-specific question is -- I have tried to set a breakpoint inside the event handler in the GUI,

Re: ncurses programming

2005-09-26 Thread Torsten Bronger
Hallöchen! Grant Edwards <[EMAIL PROTECTED]> writes: > On 2005-09-26, Mike Meyer <[EMAIL PROTECTED]> wrote: > [...] Py Docs: http://docs.python.org/lib/module-curses.html >>> >>> This document suggests that Python+ncurses won't work on windows. >>> What's the reason for this? >> >> Could i

Re: Getting tired with py2exe

2005-09-26 Thread Thomas Heller
> Thomas Heller wrote: >> Bugs <[EMAIL PROTECTED]> writes: >> >>>Any luck on finding anyone to take over py2exe development Thomas? >>>It's a GREAT project and would be a shame to see it fall into >>>obsolescence. >> No, nobody stepped up (yet). >> Thomas Bugs <[EMAIL PROTECTED]> writes: > What d

Re: Metaclasses, decorators, and synchronization

2005-09-26 Thread Tom Anderson
On Mon, 26 Sep 2005, Jp Calderone wrote: > On Sun, 25 Sep 2005 23:30:21 -0400, Victor Ng <[EMAIL PROTECTED]> wrote: >> You could do it with a metaclass, but I think that's probably overkill. >> >> It's not really efficient as it's doing test/set of an RLock all the >> time, but hey - you didn't a

Re: Accessing class variable at class creation time

2005-09-26 Thread Dave Hansen
On 23 Sep 2005 14:01:21 -0700, "Carlos" <[EMAIL PROTECTED]> wrote: >Hi! > >class A: > X = 2 > def F(): >print A.X > F() > >The above fails because the name A is not >yet at global scope when the reference A.X Maybe I'm missing something. Python 2.4.1#65 under Win32 Idle 1.1.1 gives me the

Re: Accesing Global variables in python

2005-09-26 Thread Terry Reedy
> I have a service written in python (on Apache 2.0) which This is an exact duplicate of the same posting under the subject 'Accesing Global variables in multiple Requests (Apache 2.0)' Let's put any substantive responses under that one. -- http://mail.python.org/mailman/listinfo/python-list

Re: Plotting points to screen

2005-09-26 Thread Fredrik Lundh
Jason wrote: > Like I said, it's nothing complicated, no flashing wotsits or 3d > quad-linear vertexes with bi-linear real-time shading, just simple > 'points' a few lines or circles and nothing more. all UI toolkits can do that. just pick one, and read up on the graphics API. for Tkinter, you

Re: ncurses programming

2005-09-26 Thread Grant Edwards
On 2005-09-26, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-09-26, Mike Meyer <[EMAIL PROTECTED]> wrote: > [...] Py Docs: http://docs.python.org/lib/module-curses.html >>> >>> This document suggests that Python+ncurses won't work on windows. >>> What's the reason for this? >> >> Could

Re: Proposal: add sys to __builtins__

2005-09-26 Thread Tom Anderson
On Sun, 25 Sep 2005, James Stroud wrote: > I'm into *real* purity. I would rather begin every script: > > from python import list, str, dict, sys, os > > Oh wait. I only use dict in less than 50% of my scripts: > > from python import list, str, sys, os > > That's better. What? How exactly is th

Re: Best practices for dynamically loading plugins at startup

2005-09-26 Thread Jack Diederich
On Sun, Sep 25, 2005 at 11:24:04PM +0200, Christoph Haas wrote: > Dear coders... > > I'm working on an application that is supposed to support "plugins". > The idea is to use the plugins as packages like this: > > Plugins/ > __init__.py > Plugin1.py > Plugin2.py > Plugin3.py > > When the

Re: ncurses programming

2005-09-26 Thread Grant Edwards
On 2005-09-26, Mike Meyer <[EMAIL PROTECTED]> wrote: [...] >>> Py Docs: http://docs.python.org/lib/module-curses.html >> >> This document suggests that Python+ncurses won't work on windows. >> What's the reason for this? > > Could it be that ncurses doesn't work on Windows? At least, it > didn't

Plotting points to screen

2005-09-26 Thread Jason
If I'm wanting to plot points to the screen (nothing fancy at all for the moment), would you recommend PyGame, PyOpenGL or PIL? Like I said, it's nothing complicated, no flashing wotsits or 3d quad-linear vertexes with bi-linear real-time shading, just simple 'points' a few lines or circles and

Re: Telephony project

2005-09-26 Thread Paul Rubin
"Roger" <[EMAIL PROTECTED]> writes: > 1. Fetch phone number from my ASCII data. > 2. Dial (always a local number) phone (through USRobotics 56K? ). > 3. Ask @3 questions to called phone number. Y/N Y/N Y/N > 4. Save answers to ASCII file. > 5. Say 'Thanks', hang up. > Repeat till eo

Python Programming

2005-09-26 Thread David Edwards
I've got a short, simple Python script that is supposed to read a midi file and produce a text file of note and volume information, then render that info in another program. Unfortunately, I can't get it to work, so I was wondering if anyone is skilled enough to rewrite the script to read and rend

Re: ncurses programming

2005-09-26 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > > "ncf" <[EMAIL PROTECTED]> writes: > >> [...] >> >> Py Docs: http://docs.python.org/lib/module-curses.html > > This document suggests that Python+ncurses won't work on windows. > What's the reason for this? Could it be that ncurses doe

Re: The ^ operator

2005-09-26 Thread Steve Holden
Tuvas wrote: > What exactly does the ^ operator do? I've seen, for example, that > 3^4=7, 3^5=8. but 3^3=0. Is it just adding them together if they are > not equal, and if they are equal, outputs 0, or what? Thanks! > ^ is the "bit XOR" operation. It treats its left and right operands as binary

Re: The ^ operator

2005-09-26 Thread Tuvas
Thanks alot! That sure makes lots of sense! -- http://mail.python.org/mailman/listinfo/python-list

Re: The ^ operator

2005-09-26 Thread Peter Hansen
Tuvas wrote: > What exactly does the ^ operator do? I've seen, for example, that > 3^4=7, 3^5=8. but 3^3=0. Is it just adding them together if they are > not equal, and if they are equal, outputs 0, or what? Thanks! It performs an "exclusive-OR" (XOR) operation on the binary data corresponding to

Telephony project

2005-09-26 Thread Roger
I'm new to Python and need to do a (low level, I think) telephony project ( POTS, all local calling) in WinXp. 1. Fetch phone number from my ASCII data. 2. Dial (always a local number) phone (through USRobotics 56K? ). 3. Ask @3 questions to called phone number. Y/N Y/N Y/N 4. Save ans

Re: Getting tired with py2exe

2005-09-26 Thread Bugs
What do you think of the idea of putting both py2exe AND py2app under the same umbrella? I don't know what the status of py2app is or who maintains it but I was thinking that it would be ideal if the 2 utilities could share code, ideas, protocols, etc. Seems like this synergy and consistency

The ^ operator

2005-09-26 Thread Tuvas
What exactly does the ^ operator do? I've seen, for example, that 3^4=7, 3^5=8. but 3^3=0. Is it just adding them together if they are not equal, and if they are equal, outputs 0, or what? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine type of a socket

2005-09-26 Thread Peter Hansen
Reinhold Birkenfeld wrote: > Peter Hansen wrote: >>Tor Erik Sønvisen wrote: >>>How can I determine the type of a socket (TCP or UDP) object? >>Let's see... what looks good here? >> >> >>> u._sock >> >> >>> t._sock >> >> >>Maybe that type field? > > Heh. The type field isn't publicly accessible (y

build problems on AIX

2005-09-26 Thread ersher
I'm having trouble building Python 2.4.1 on AIX 5. I've built/installed tcl/tk under ~/local, added ~/local/lib to my $LD_LIBRARY_PATH, and set $LDFLAGS and $CPPFLAGS appropriately. I'm still getting the following errors: ./Modules/ld_so_aix cc_r -bI:Modules/python.exp \ -L/home/me/local/l

Re: ncurses programming

2005-09-26 Thread Grant Edwards
On 2005-09-26, Sinan Nalkaya <[EMAIL PROTECTED]> wrote: > hi, i want to use ncurses library in python i`ve found proper > library for that, PyNcurses. then i searched for some > documentation about ncurses programming, i only found that web > site ; http://www.tldp.org/HOWTO/NCURSES-Programming-HO

Re: ncurses programming

2005-09-26 Thread Torsten Bronger
Hallöchen! "ncf" <[EMAIL PROTECTED]> writes: > [...] > > Py Docs: http://docs.python.org/lib/module-curses.html This document suggests that Python+ncurses won't work on windows. What's the reason for this? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetusICQ 264-296-6

Re: CRC16

2005-09-26 Thread Tuvas
I should probably have mentioned that my code is just 6 bytes long, we send an 8 byte data packet with 2 bytes CRC. There's a CRC poly of 0x1021. Still having a bit of problems, but it's coming, thanks for the help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Need to pass Object by value into a list

2005-09-26 Thread Fredrik Lundh
Aaron wrote: > I have a data sructure setup and I populate it in a loop like so: > > y=0 > while X: >DS.name = "ASDF" >DS.ID = 1234 > >list[y] = DS; >y = y + 1 > > print list > > This does not work because DS is passed in by reference causing all > entries into the list to change t

Need to pass Object by value into a list

2005-09-26 Thread Aaron
I have a data sructure setup and I populate it in a loop like so: y=0 while X: DS.name = "ASDF" DS.ID = 1234 list[y] = DS; y = y + 1 print list This does not work because DS is passed in by reference causing all entries into the list to change to the most current value. I cannot fi

PyDev 0.9.8.2 released

2005-09-26 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python Development Enviroment for Eclipse) version 0.9.8.2 has been released. Check the homepage (http://pydev.sourceforge.net/) for more details. Details for Release: 0.9.8.2 Major highlights: * Content assistants reviewed (and better

Re: ncurses programming

2005-09-26 Thread ncf
I don't know too much about (n)curses, but I feel that it's worth pointing out that Python has a (built-in?) module named `curses` that supports ncurses as of Python version 1.6. I don't think it'd be necessary to learn how to use ncurses in C first, though. The Python docs for the curses module i

Re: ncurses programming

2005-09-26 Thread ncf
I don't know too much about (n)curses, but I feel that it's worth pointing out that Python has a (built-in?) module named `curses` that supports ncurses as of Python version 1.6. I don't think it'd be necessary to learn how to use ncurses in C first, though. The Python docs for the curses module i

Re: Getting tired with py2exe

2005-09-26 Thread Thomas Heller
Bugs <[EMAIL PROTECTED]> writes: > Any luck on finding anyone to take over py2exe development Thomas? > It's a GREAT project and would be a shame to see it fall into > obsolescence. No, nobody stepped up (yet). Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine type of a socket

2005-09-26 Thread Reinhold Birkenfeld
Peter Hansen wrote: > Tor Erik Sønvisen wrote: >> How can I determine the type of a socket (TCP or UDP) object? > > In what context? Do you have some code that gets passed a socket object > but it could have been created with either SOCK_STREAM or SOCK_DGRAM? > And you want a way of determining

Re: [RFC] Parametric Polymorphism

2005-09-26 Thread Bengt Richter
On Sun, 25 Sep 2005 09:30:30 +0100, Catalin Marinas <[EMAIL PROTECTED]> wrote: >Hi, > >Sorry if this was previously discussed but it's something I miss in >Python. I get around this using isinstance() but it would be cleaner >to have separate functions with the same name but different argument >ty

Re: Shed Skin Python-to-C++ Compiler 0.0.3 Release: some fixes, 3 MB Windows package

2005-09-26 Thread cmkl
I'va got a trojan message by my virus scanner trying to download the 0.03 exe-file. Something to worry about? Carl Mark Dufour schrieb: > Hi all, > > Thanks to the people trying out Shed Skin 0.0.2 and letting me know > about several problems they encountered. I have released an updated > versio

Re: Simple Dialogs

2005-09-26 Thread Grant Edwards
On 2005-09-26, Steve Holden <[EMAIL PROTECTED]> wrote: from tkMessageBox import showerror showerror('Problem','Program Crashed before Starting') >>> >>>Here's a faster method, though not cross-platform: >>> >>>import ctypes >>>ctypes.windll.user32.MessageBoxA(0, "Hello World", "Title", 0x0

Re: Simple Dialogs

2005-09-26 Thread Steve Holden
Grant Edwards wrote: > On 2005-09-26, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >>James Stroud wrote: >> >>>from tkMessageBox import showerror >>>showerror('Problem','Program Crashed before Starting') >> >>Here's a faster method, though not cross-platform: >> >>import ctypes >>ctypes.windll.u

Re: Question about smtplib, and mail servers in general.

2005-09-26 Thread Christos Georgiou
On Wed, 21 Sep 2005 07:50:26 +0100, rumours say that Steve Holden <[EMAIL PROTECTED]> might have written: >I agree that there's an element of the moral imperative in my assertion >that the mails "should" go through which is largely ignored by the real >world nowadays. Some ISPs force you to use

Re: Determine type of a socket

2005-09-26 Thread Peter Hansen
Tor Erik Sønvisen wrote: > How can I determine the type of a socket (TCP or UDP) object? In what context? Do you have some code that gets passed a socket object but it could have been created with either SOCK_STREAM or SOCK_DGRAM? And you want a way of determining by looking just at the object

Re: Question about smtplib, and mail servers in general.

2005-09-26 Thread Christos Georgiou
On Tue, 20 Sep 2005 16:48:41 +0200, rumours say that Piet van Oostrum <[EMAIL PROTECTED]> might have written: >And most smtp servers that I know also pass mail from any from-address to >any to-address if the IP number of he client machine belongs to a trusted >range (usually the range that belongs

Re: how to implement propertyPage using wxPyhton?

2005-09-26 Thread Steve Holden
James Hu wrote: > Hi, gurus, > > > > I would like to implement something like propertyPage (VC++ term) > > Ie. There are a few tabs in the top, clicking any tab will display a > different panel. > > I searched on the Internet, couldn’t get any clue. > I think you're looking for the wx.Note

Re: [RFC] Parametric Polymorphism

2005-09-26 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Catalin Marinas <[EMAIL PROTECTED]> wrote: ... > Of course, duck-typing is simple to use but the parametric > polymorphism is useful when the types are unrelated. Let's say you > want to implement a colour-print function which should support basic > types like ints

Re: How to decompile an exe file compiled by py2exe?

2005-09-26 Thread Chris Lambacher
On Sat, Sep 24, 2005 at 09:29:30PM +0800, Leo Jay wrote: > Thanks for all of your replies. > > but my problem is not how to decompile .pyo or .pyc files. Eventually that is what the problem will become. hjparser.exe is a python interpreter that runs a python module that it extracts from itself.

Re: Simple Dialogs

2005-09-26 Thread Thorsten Kampe
* [EMAIL PROTECTED] (2005-09-23 23:39 +0100) > James Stroud wrote: >> from tkMessageBox import showerror >> showerror('Problem','Program Crashed before Starting') > > Thanks. That works great when interpreted (though a blank window seems > to open as well). Unfortunately it still takes 40 second

Determine type of a socket

2005-09-26 Thread Tor Erik S�nvisen
Hi How can I determine the type of a socket (TCP or UDP) object? regards tores -- http://mail.python.org/mailman/listinfo/python-list

how to implement propertyPage using wxPyhton?

2005-09-26 Thread James Hu
Hi, gurus,   I would like to implement something like propertyPage (VC++ term) Ie. There are a few tabs in the  top, clicking any tab will display a different panel. I searched on the Internet, couldn’t get any clue.   Thanks in advance.   James -- http://mail.python.org/mail

Re: number of python users

2005-09-26 Thread Grant Edwards
On 2005-09-26, Bryan <[EMAIL PROTECTED]> wrote: > is there a rough estimate somewhere that shows currently how many python 1.5 > vs > 2.2 vs 2.3 vs 2.4 users there are? have a majority moved to 2.4? or are they > still using 2.3? etc... My guess is most are still using 2.3. The last time I lo

Re: number of python users

2005-09-26 Thread Scott David Daniels
Bryan wrote: > is there a rough estimate somewhere that shows currently how many python > 1.5 vs 2.2 vs 2.3 vs 2.4 users there are? have a majority moved to 2.4? > or are they still using 2.3? etc... > > thanks, > bryan I'd bet the majority is still using 2.3: * 2.3 has been around a very l

Re: number of python users

2005-09-26 Thread Fredrik Lundh
Bryan wrote: > is there a rough estimate somewhere that shows currently how many python 1.5 > vs > 2.2 vs 2.3 vs 2.4 users there are? have a majority moved to 2.4? or are they > still using 2.3? etc... Here are current PIL download statistics (last 10 days): 75.6% /downloads/PIL-1.1.5.win32

Re: Simple Dialogs

2005-09-26 Thread Grant Edwards
On 2005-09-26, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > James Stroud wrote: >> from tkMessageBox import showerror >> showerror('Problem','Program Crashed before Starting') > > Here's a faster method, though not cross-platform: > > import ctypes > ctypes.windll.user32.MessageBoxA(0, "Hello Wor

Accesing Global variables in multiple Requests (Apache 2.0)

2005-09-26 Thread Pankaj Gupta
Hi All,      I have a service written in python (on Apache 2.0) which Initializes the global variables (or objects) when request comes for it. I want to use the same objects (or varaibles) in the subsequent requests. How could this one be done in Apache 2.0? can it be done by doing some configura

Accesing Global variables in python

2005-09-26 Thread Pankaj
Hi All,      I have a service written in python (on Apache 2.0) which Initializes the global variables (or objects) when request comes for it. I want to use the same objects (or varaibles) in the subsequent requests. How could this one be done in Apache 2.0? can it be done by doing some co

extending and embedding python without distutils

2005-09-26 Thread Benjamin Rutt
I have a rather large C++ project which has his own build system (scons) and I would prefer to stay inside scons in order to build some python extensions/embeddings (that is, I prefer to avoid using distutils directly to build my extensions). Can someone confirm that I'm doing the right thing to p

ncurses programming

2005-09-26 Thread Sinan Nalkaya
hi, i want to use ncurses library in python i`ve found proper library for that, PyNcurses. then i searched for some documentation about ncurses programming, i only found that web site ; http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/ this howto is nice but seems to me, this is for experience

  1   2   >