A Call to Arms for Python Advocacy

2006-12-07 Thread Jeff Rush
As the Python Advocacy Coordinator, I've put up some wiki pages on the Python website for which I'm soliciting ideas, writing and graphics. Some of the material exists scattered about and just needs locating and organizing. http://wiki.python.org/moin/Advocacy First there is a need for

Re: Mirror imaging binary numbers

2006-12-07 Thread Hendrik van Rooyen
Craig [EMAIL PROTECTED] wrote: Hi there, I'm trying to switch binary numbers around so that the MSB becomes the LSB etc. Is there an easy way of doing this as I can't seem to find anything. If you could help that would be great. Thanks and good luck. Are these Python ints, or are they

Re: dict.has_key(x) versus 'x in dict'

2006-12-07 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: Peter Bjoern Schliessmann wrote: Wouldn't be if k in d.keys() be the exact replacement? Peter No, 'k in d' is equivalent to 'd.has_key(k)', only with less Peter (constant) overhead for the function call. 'k in d.keys()' on the Peter other hand

Re: The del statement

2006-12-07 Thread Fredrik Lundh
Marco Aschwanden wrote: opinionI am not convinced though that del should also remove elements from a container/sequence./opinion in today's Python, you can use del on all targets that you can assign to. I'm not sure how breaking this consistency would somehow improve things... /F --

Re: Windows installer for Scientific Python for Python 2.4?

2006-12-07 Thread konrad . hinsen
On 06.12.2006, at 23:36, Grant Edwards wrote: Can anybody point me to a windows installer for scientific python that will work with Python 2.4? The Scientific python download page only has an installer for Python 2.3. If you find one, please send me a copy so that I can put it on the

Re: Need Help Parsing From File

2006-12-07 Thread Gabriel Genellina
At Thursday 7/12/2006 02:51, John Machin wrote: Gabriel Genellina wrote: ftxt=open(filename,rt) Never seen that done before. It's not in the docs. A remnant of my MSDOS+C background... FWIW: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win 32 Type help,

Use of factory pattern in Python?

2006-12-07 Thread Nathan Harmston
Hi, Im trying to find the best way to do a certain task and my so far I have found that using something similar to factory pattern might be the best bet. I m parsing a file to be stored as a graph (using NetworkX). Each row in the file corresponds to a node in the graph. However rows have

Re: Use of factory pattern in Python?

2006-12-07 Thread Fredrik Lundh
Nathan Harmston wrote: so I was thinking of having a factory class to return the individual objects for each row..ie class Factory(): # if passed a gene return a gene object # if passed an intron return an intron object # if passed an exom return an exon object

Window, Windows, Linux, client and server...

2006-12-07 Thread nelson -
hi all! i'm trying to implement an appllication with this two requirements. I have a server and some clients. I want to be able to launch an application (openoffice impress, for example) and display what i'm doing on the server on the client. Conversely, I want to be able to have a picture of

Re: Use of factory pattern in Python?

2006-12-07 Thread Gabriel Genellina
At Thursday 7/12/2006 05:28, Nathan Harmston wrote: chr1 SGD gene 5 8 id=1 name=3 dbref=6 chr1 SGD intron 5 6 id=5 notes=spam chr1 SGD exon 7 8 id=5 so I was thinking of having a factory class to return the individual objects for each row..ie class Factory(): # if passed a gene

Re: Use of factory pattern in Python?

2006-12-07 Thread Jan Dries
Gabriel Genellina wrote: At Thursday 7/12/2006 05:28, Nathan Harmston wrote: so I was thinking of having a factory class to return the individual objects for each row..ie class Factory(): # if passed a gene return a gene object # if passed an intron return an intron

Re: Re: PyRun_SimpleString no sys.argv[0]

2006-12-07 Thread Gabriel Genellina
Please keep posting on this list, surely other people can help more than I. At Thursday 7/12/2006 06:16, Ingo Wolf wrote: At Wednesday 6/12/2006 12:23, iwl wrote: I'm just starting with Python - would like to embed it in my windows-programm as an script-processor. For tests I use easygui

Re: Window, Windows, Linux, client and server...

2006-12-07 Thread Gabriel Genellina
At Thursday 7/12/2006 05:28, nelson - wrote: i'm trying to implement an appllication with this two requirements. I have a server and some clients. I want to be able to launch an application (openoffice impress, for example) and display what i'm doing on the server on the client. Conversely, I

Re: Use of factory pattern in Python?

2006-12-07 Thread Nick Craig-Wood
Gabriel Genellina [EMAIL PROTECTED] wrote: The basic idea is the same, but instead of a long series of if...elif...else you can use a central registry (a dictionary will do) and dispatch on the name. Classes act as their own factories. registry = {} class Base(object): kind

Re: PythonTidy

2006-12-07 Thread Thomas Heller
Chuck Rhode schrieb: Thomas Heller wrote this on Tue, Dec 05, 2006 at 07:06:30PM +0100. My reply is below. There is still one major issue. pythonTidy uses open(input-file, rb) to open the Python module to tidy up. That does not work on Windows, at least if the file has (as it should)

Embedded python adding variables linking to C++-Variables / callbacks

2006-12-07 Thread iwl
Hello, I would like to add Variables to my embedded python which represents variables from my C++-Programm. I found C-Api-funcs for adding my C-Funcs to python but none to add variables. I would like some C-Function is called when the added Python-varible is set (LValue) and some other when it is

Re: len() and PEP 3000

2006-12-07 Thread Giovanni Bajo
Thomas Guettler wrote: I have read the FAQ to the len function: http://www.python.org/doc/faq/general/#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list Outdated. You want to read the new FAQ, here:

Re: how to get all the variables of a string formating?

2006-12-07 Thread Steven D'Aprano
On Wed, 06 Dec 2006 10:58:56 -0800, [EMAIL PROTECTED] wrote: Is there an easy (i.e.: no regex) way to do get the names of all parameters? ...regexp is the easy way :D I'd like to see this regex. And make sure it works correctly with this format string: %(key)s %%(this is not a key)d

Re: Subprocess with a Python Session?

2006-12-07 Thread Giovanni Bajo
Fredrik Lundh wrote: No matter what I do I cant get the following code to do what I expect. I hadn't used subprocess t o read and write to pipes of a still-running app, and I just can't seem to get it right. What gives? import subprocess p = subprocess.Popen(python, stdout=subprocess.PIPE,

Re: how to get all the variables of a string formating?

2006-12-07 Thread Tim Chase
I'd like to see this regex. And make sure it works correctly with this format string: %(key)s %%(this is not a key)d %%%(but this is)f %%%(%(and so is this)%()%%)u and don't forget the empty case %()c but not %%()E and remember to handle %(new lines)X correctly and

How to create a global hotkey?

2006-12-07 Thread k04jg02
I want to make a Python app that runs in the background, and when a user hits a key combination, for a function to run. This sounds simple enough, but all of the keypress detecting libraries I can find count on you creating a window and then detecting keypresses while that window has focus. I want

Best way to split up lines - RE: About the 79 character line recommendation

2006-12-07 Thread Michael Yanowitz
Hello: I too don't like large lines. However in the following case, and multi-level indentations, I find it unavoidable. Here is one huge statement I haven't been able to split onto multiple lines. What would be the best way to split the following line (Python doesn't like me to split it up

Re: Embedded python adding variables linking to C++-Variables / callbacks

2006-12-07 Thread gagsl-py
iwl ha escrito: I would like to add Variables to my embedded python which represents variables from my C++-Programm. I found C-Api-funcs for adding my C-Funcs to python but none to add variables. I would like some C-Function is called when the added Python-varible is set (LValue) and some

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread Fredrik Lundh
Michael Yanowitz wrote: What would be the best way to split the following line (Python doesn't like me to split it up between the comma-separated parameters): top, ip1, ip2, ip3, ip4, messageCounter, ackRequired, dataType, utc1, utc2, utc3, utc4, utc5, utc6, utc7, utc8, utc9, utc10,

Re: How to create a global hotkey?

2006-12-07 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: I want to make a Python app that runs in the background, and when a user hits a key combination, for a function to run. This sounds simple enough, but all of the keypress detecting libraries I can find count on you creating a window and then detecting keypresses while

Common Python Idioms

2006-12-07 Thread Stephen Eilert
Hendrik van Rooyen escreveu: [EMAIL PROTECTED] wrote: Peter Bjoern Schliessmann wrote: Wouldn't be if k in d.keys() be the exact replacement? Peter No, 'k in d' is equivalent to 'd.has_key(k)', only with less Peter (constant) overhead for the function call. 'k in

Re: Subprocess with a Python Session?

2006-12-07 Thread Paul Boddie
Shane Hathaway wrote: Make sure the pipes are unbuffered. Launch the process with python -u and flush() the streams after writing. (That's the issue I've encountered when doing this before.) The -u option is critical, yes. I wrote some code recently which communicated with a subprocess

Re: Common Python Idioms

2006-12-07 Thread Georg Brandl
Stephen Eilert wrote: Hendrik van Rooyen escreveu: [EMAIL PROTECTED] wrote: Peter Bjoern Schliessmann wrote: Wouldn't be if k in d.keys() be the exact replacement? Peter No, 'k in d' is equivalent to 'd.has_key(k)', only with less Peter (constant) overhead for the

Re: Common Python Idioms

2006-12-07 Thread Steven D'Aprano
On Thu, 07 Dec 2006 04:08:18 -0800, Stephen Eilert wrote: Given that Python says that There Should Be Only One Way to Do It, Python says no such thing. Perhaps you should run import this at the prompt, and read _carefully_ and take note of the difference between the Zen of Python and what you

Re: per instance descriptors

2006-12-07 Thread simon
George Sakkis wrote: Simon Bunker wrote: Hi I have code similar to this: class Input(object): def __init__(self, val): self.value = val def __get__(self, obj, objtype): return self.value def __set__(self, obj, val): # do some

Initializing with the correct type

2006-12-07 Thread aine_canby
Hi all, I'm new to Python and I'm just wordering if my approch is correct. Here's an example. I'm making sure that the length and types are correct. This is in case I use such a class and accidently pass it the wrong object. class Funkt: 'Funkt Class' def __init__(self, L):

Re: Common Python Idioms

2006-12-07 Thread Duncan Booth
Stephen Eilert [EMAIL PROTECTED] wrote: I've always used has_key(), thinking it was the only way to do it. Given that Python says that There Should Be Only One Way to Do It, I didn't bother searching for alternatives. The full quote is actually: There should be one-- and preferably

Re: Video stream server

2006-12-07 Thread Lad
Fredrik Lundh wrote: Lad wrote: I love Python so I would like to implement video support in Python. maybe this might be helpful? http://blog.go4teams.com/archives/video-blogging-using-django-and-flashtm-video-flv/56 /F Yes, it is very good link. Thank you --

Re: problem with closures

2006-12-07 Thread Gerard Brunick
I can't solve your problem, but I can at least explain why I think its hard. foo doesn't have any closed over variables. Some of its locals have to live in cells, so that pre and post can see them in their closures. foo.func_code.co_cellvars ('x', 'y') Now the only way that I know of to

Re: Why not just show the out-of-range index?

2006-12-07 Thread Russ
- because error messages are not debugging tools (better use unit Then what are they? Machine-generated poetry? -- http://mail.python.org/mailman/listinfo/python-list

Re: Common Python Idioms

2006-12-07 Thread Daniel Dittmar
Duncan Booth wrote: In this case, dict objects used to not support the 'in' operator, but at some point it was added. I believe it wasn't there originally because Guido wasn't sure whether people would expect it should match keys or keys and values. And he was right: import sys 'sys' in

Re: Common Python Idioms

2006-12-07 Thread Stephen Eilert
Duncan Booth escreveu: Is there a list somewhere listing those not-so-obvious-idioms? I've seen some in this thread (like the replacement for .startswith). The release notes for each new version. Unfortunately the rest of the documentation sometimes lags behind the release notes.

Re: Common Python Idioms

2006-12-07 Thread Fredrik Lundh
Stephen Eilert wrote: I do think that, if it is faster, Python should translate x.has_key(y) to y in x. http://svn.python.org/view/sandbox/trunk/2to3/fix_has_key.py?view=markup /F -- http://mail.python.org/mailman/listinfo/python-list

Re: dict.has_key(x) versus 'x in dict'

2006-12-07 Thread skip
I will admit that way back when (maybe 8 yrs ago) I actually did this in a piece of frequently executed code that's been stable for a looong time. I have no idea why I might have written it that way. Brain fart I suppose. I only noticed my mistake a couple months ago

Re: Common Python Idioms

2006-12-07 Thread Danny Colligan
Is there a list somewhere listing those not-so-obvious-idioms? I don't know about lists of not-so-obvious idioms, but here's some gotchas (there may be some overlap with what you're asking about): http://zephyrfalcon.org/labs/python_pitfalls.html http://www.ferg.org/projects/python_gotchas.html

Re: per instance descriptors

2006-12-07 Thread George Sakkis
[EMAIL PROTECTED] wrote: George Sakkis wrote: Simon Bunker wrote: Hi I have code similar to this: class Input(object): def __init__(self, val): self.value = val def __get__(self, obj, objtype): return self.value def

Re: Initializing with the correct type

2006-12-07 Thread szabi
[EMAIL PROTECTED] írta: Hi all, I'm new to Python and I'm just wordering if my approch is correct. Here's an example. I'm making sure that the length and types are correct. This is in case I use such a class and accidently pass it the wrong object. class Funkt: 'Funkt Class'

Re: Embedded python adding variables linking to C++-Variables / callbacks

2006-12-07 Thread iwl
[EMAIL PROTECTED] schrieb: Write some C functions -callable from Python- which will be used to get and set the variable value. From inside Python, declare a property with getter and setter which will call your C functions. This works fine for object attributes. If you want to trap

Re: Initializing with the correct type

2006-12-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I'm new to Python and I'm just wordering if my approch is correct. Here's an example. I'm making sure that the length and types are correct. This is in case I use such a class and accidently pass it the wrong object. if you go with the language instead of against it,

funcs without () like print

2006-12-07 Thread iwl
Hello can I make funktions callable without () like print at time the interpreter seems to printout the adres when I type the function without () -- http://mail.python.org/mailman/listinfo/python-list

Re: funcs without () like print

2006-12-07 Thread Fredrik Lundh
iwl [EMAIL PROTECTED] wrote: Hello can I make funktions callable without () no, not really. like print at time the interpreter seems to printout the adres when I type the function without () the interpreter does repr() on the object (which calls the __repr__ method), and prints the result.

Re: Why not just show the out-of-range index?

2006-12-07 Thread Tim Chase
- because error messages are not debugging tools (better use unit Then what are they? Machine-generated poetry? me.__cmp__(gruntbuggly['freddled'].micturations, bee[LURGID].gabbleblotchits[PLURDLED]) == 0 Traceback (most recent call last): File stdin, line 1, in ? VogonPoetryException:

Re: How to create a global hotkey?

2006-12-07 Thread Gerold Penz
I want my function to execute when the user presses the hotkey anywhere. Hi! - XLib unter Linux: http://python-xlib.sourceforge.net/ - wxPython unter Windows: http://wxpython.org/docs/api/wx.Window-class.html#RegisterHotKey regards, Gerold :-) --

Re: Why not just show the out-of-range index?

2006-12-07 Thread Istvan Albert
Russ wrote: The message tells you where the error occurred, but it doesn't tell you what the range and the offending index are. So here is a scenario, what should happen if by accident one uses a 50Mb string as an index? Should it be displayed? i. --

A Call to Arms for Python Advocacy

2006-12-07 Thread Jeff Rush
As the Python Advocacy Coordinator, I've put up some wiki pages on the Python website for which I'm soliciting ideas, writing and graphics. Some of the material exists scattered about and just needs locating and organizing. http://wiki.python.org/moin/Advocacy First there is a need for

comtypes

2006-12-07 Thread Thomas Heller
comtypes seems to gain some attention (comtypes is a pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.) I'll try to release a new version over the next days. However, I'm wondering what would be the correct list to discuss this package... - the

Re: Subprocess with a Python Session?

2006-12-07 Thread El Pitonero
Paul Boddie wrote: Shane Hathaway wrote: Make sure the pipes are unbuffered. Launch the process with python -u and flush() the streams after writing. (That's the issue I've encountered when doing this before.) The -u option is critical, yes. I wrote some code recently which

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Roth
Fredrik Lundh wrote: Michael Yanowitz wrote: What would be the best way to split the following line (Python doesn't like me to split it up between the comma-separated parameters): top, ip1, ip2, ip3, ip4, messageCounter, ackRequired, dataType, utc1, utc2, utc3, utc4, utc5, utc6,

Re: Why not just show the out-of-range index?

2006-12-07 Thread Neil Cerutti
On 2006-12-07, Tim Chase [EMAIL PROTECTED] wrote: - because error messages are not debugging tools (better use unit Then what are they? Machine-generated poetry? me.__cmp__(gruntbuggly['freddled'].micturations, bee[LURGID].gabbleblotchits[PLURDLED]) == 0 Traceback (most recent call

PyCon 07

2006-12-07 Thread david brochu jr
Anyone able to register yet for PyCon07? I can't find any link online..I want to get in early to lock in on the cheaper registration rate..any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: A Call to Arms for Python Advocacy

2006-12-07 Thread Roy Smith
In article [EMAIL PROTECTED], Jeff Rush [EMAIL PROTECTED] wrote: As the Python Advocacy Coordinator, I've put up some wiki pages on the Python website for which I'm soliciting ideas, writing and graphics. Some of the material exists scattered about and just needs locating and organizing.

Jerry Brewster's new email address

2006-12-07 Thread Spiercyanna
hey this is arnie franks you got any tractors for sale -- http://mail.python.org/mailman/listinfo/python-list

Re: Initializing with the correct type

2006-12-07 Thread Istvan Albert
[EMAIL PROTECTED] wrote: Hi all, I'm new to Python and I'm just wordering if my approch is correct. Here's an example. I'm making sure that the length and types are correct. Don't worry much about the type of parameters, it turns out passing wrong data into a constructor is a problem that is

Re: A Call to Arms for Python Advocacy

2006-12-07 Thread Istvan Albert
Roy Smith wrote: I think it also appears to need faster hardware. It's running glacially slow. runs fine here i. -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows installer for Scientific Python for Python 2.4?

2006-12-07 Thread Grant Edwards
On 2006-12-07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 06.12.2006, at 23:36, Grant Edwards wrote: Can anybody point me to a windows installer for scientific python that will work with Python 2.4? The Scientific python download page only has an installer for Python 2.3. If you find

Re: A Call to Arms for Python Advocacy

2006-12-07 Thread Roy Smith
In article [EMAIL PROTECTED], Istvan Albert [EMAIL PROTECTED] wrote: Roy Smith wrote: I think it also appears to need faster hardware. It's running glacially slow. runs fine here i. Maybe it was a transient thing -- it's running fine here too now. --

Re: A Call to Arms for Python Advocacy

2006-12-07 Thread Tarek Ziadé
On 12/7/06, Jeff Rush [EMAIL PROTECTED] wrote: [snip] These works are to be formed into advocacy kits for various audiences. So far we have the following ideas for kits: - College Student's Python Advocacy Kit - IT Department Python Advocacy Kit - University Educator's Python

Re: funcs without () like print

2006-12-07 Thread Georg Brandl
iwl wrote: Hello can I make funktions callable without () like print at time the interpreter seems to printout the adres when I type the function without () print is not a function, it's a statement, and as such equivalent to raise or assert. Georg --

Re: Subprocess with a Python Session?

2006-12-07 Thread Fredrik Lundh
Giovanni Bajo wrote: assert p.stdout.readline() == '10\n' Yeah, but WHY was the API designed like this? Why can't I read and write freely from a pipe connected to a process as many times as I want? the subprocess module is designed to deal with Unix-style subprocesses in general, not

Re: Window, Windows, Linux, client and server...

2006-12-07 Thread Cameron Laird
In article [EMAIL PROTECTED], Gabriel Genellina [EMAIL PROTECTED] wrote: At Thursday 7/12/2006 05:28, nelson - wrote: i'm trying to implement an appllication with this two requirements. I have a server and some clients. I want to be able to launch an application (openoffice impress, for

Re: funcs without () like print

2006-12-07 Thread Andre Meyer
print is supposed to become a function in Py3k, though. On 12/7/06, Georg Brandl [EMAIL PROTECTED] wrote: iwl wrote: Hello can I make funktions callable without () like print at time the interpreter seems to printout the adres when I type the function without () print is not a function,

Re: Inheritance doesn't work

2006-12-07 Thread John Salerno
Fredrik Lundh wrote: J. Clifford Dyer wrote: Sure, but I think the question was more about how code that references MandelbrotImage could yield a stack that references MandelImage. well, it's been obvious for quite some time that we've now reached a point in Python's quest for world

how to delete matplotlib data between ploting

2006-12-07 Thread [EMAIL PROTECTED]
I want to make few plots from CSV files. I have the code below - it works - the first plot is ok, the second one has the first and the current data set and so on - I can't delete the plot data between plots. ## # -*- coding: utf-8 -*- from pylab import *

Re: List of Events in wxPython

2006-12-07 Thread John Salerno
Jacksondf wrote: What is that procedure for determining which events can be binded for a particular widget? The docs don't seem to help. For example, how can I know which events wx.SpinButton will send. Thanks. Exactly which docs are you looking at? The wxPython docs have a link that

Re: funcs without () like print

2006-12-07 Thread Paddy
iwl wrote: Hello can I make funktions callable without () like print at time the interpreter seems to printout the adres when I type the function without () Hi iwl, its one of the python fundamentals when dealing with functions. function_name without the () refers to the function object,

Re: How to create a global hotkey?

2006-12-07 Thread [EMAIL PROTECTED]
XLib would really only see the keys pressed when under X, do you want it to catch the keys directly from the keyboard? Gerold Penz wrote: I want my function to execute when the user presses the hotkey anywhere. Hi! - XLib unter Linux: http://python-xlib.sourceforge.net/ - wxPython unter

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Machin
Fredrik Lundh wrote: Michael Yanowitz wrote: What would be the best way to split the following line (Python doesn't like me to split it up between the comma-separated parameters): top, ip1, ip2, ip3, ip4, messageCounter, ackRequired, dataType, utc1, utc2, utc3, utc4, utc5, utc6,

Re: How to create a global hotkey?

2006-12-07 Thread Jordan
If you're using python 2.4, you can use the pyHook library (I don't think it has been ported to 2.5 yet... I should email him about that), which can hook both the mouse and keyboard, so your program can be running in the background and still catch what keys (or mouse clicks) are pressed. The

Re: how to delete matplotlib data between ploting

2006-12-07 Thread Murali
pylab.clf() or some such thing clears the current canvas. [EMAIL PROTECTED] wrote: I want to make few plots from CSV files. I have the code below - it works - the first plot is ok, the second one has the first and the current data set and so on - I can't delete the plot data between plots.

Re: how to delete matplotlib data between ploting

2006-12-07 Thread [EMAIL PROTECTED]
clf() works :) thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Help Parsing From File

2006-12-07 Thread John Machin
Gabriel Genellina wrote: At Thursday 7/12/2006 02:51, John Machin wrote: Gabriel Genellina wrote: ftxt=open(filename,rt) Never seen that done before. It's not in the docs. A remnant of my MSDOS+C background... FWIW: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32

feed-forward neural network for python

2006-12-07 Thread mwojc
Hi! I released feed-forward neural network for python (ffnet) project at sourceforge. Implementation is extremelly fast (code written mostly in fortran with thin python interface, scipy optimizers involved) and very easy to use. I'm announcing it here because you, folks, are potential

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread Roy Smith
In article [EMAIL PROTECTED], Fredrik Lundh [EMAIL PROTECTED] wrote: Michael Yanowitz wrote: What would be the best way to split the following line (Python doesn't like me to split it up between the comma-separated parameters): top, ip1, ip2, ip3, ip4, messageCounter, ackRequired,

Re: Best way to split up lines - RE: About the 79 character line recommendation

2006-12-07 Thread Roel Schroeven
Michael Yanowitz schreef: Hello: I too don't like large lines. However in the following case, and multi-level indentations, I find it unavoidable. Here is one huge statement I haven't been able to split onto multiple lines. What would be the best way to split the following line

Re: Common Python Idioms

2006-12-07 Thread John Machin
Daniel Dittmar wrote: Duncan Booth wrote: In this case, dict objects used to not support the 'in' operator, but at some point it was added. I believe it wasn't there originally because Guido wasn't sure whether people would expect it should match keys or keys and values. And he was

makeactivexclass stopped giving me events when i upgraded to wxpython 2.7 =(

2006-12-07 Thread matt sib
Hi all. I just upgraded to wxpython 2.7 Its way cool. However, in one of my apps, i have embedded a flash activex control. I have had it working great in wxpython 2.6. After i upgraded to 2.7, i stopped receiving events from flash! But whats even weirder is that when i embed the flash activex in

Re: feed-forward neural network for python

2006-12-07 Thread Beliavsky
mwojc wrote: Hi! I released feed-forward neural network for python (ffnet) project at sourceforge. Implementation is extremelly fast (code written mostly in fortran with thin python interface, scipy optimizers involved) and very easy to use. I'm announcing it here because you, folks, are

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Machin
Roy Smith wrote: It would be nice if struct.unpack() had a way to specify unpacking repeated items as a list, ie: data = struct.unpack (! H 4(B) H 2B 12(B) 6(B) H I, strMessage) (top, ip, messageCounter, ackRequired, dataType, utc, st,

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread Roy Smith
In article [EMAIL PROTECTED], John Machin [EMAIL PROTECTED] wrote: Roy Smith wrote: It would be nice if struct.unpack() had a way to specify unpacking repeated items as a list, ie: data = struct.unpack (! H 4(B) H 2B 12(B) 6(B) H I, strMessage) (top, ip,

Can't 'register' to Cheese Shop from command line..only web + egg dependency question

2006-12-07 Thread [EMAIL PROTECTED]
I seem to be able to register and upload from web site but not command line. Command line register attempts keep giving Server response (401): Authorization Required Any ideas? What must I do to make installation of my egg also install dependencies? I did an install and noticed other eggs

write an update manager in python/wxPython

2006-12-07 Thread m . errami
Hello all I have a small application for which I would like to write an update manager. I assume that the basics of it is to compare versions of the user's current application and a new one store in a new file on a particular URL. Now is there any standard way to do that. I am sure I can figure

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-07 Thread John Machin
Roy Smith wrote: In article [EMAIL PROTECTED], John Machin [EMAIL PROTECTED] wrote: Roy Smith wrote: It would be nice if struct.unpack() had a way to specify unpacking repeated items as a list, ie: data = struct.unpack (! H 4(B) H 2B 12(B) 6(B) H I, strMessage)

Re: Why not just show the out-of-range index?

2006-12-07 Thread OKB (not okblacke)
John Machin wrote: It should be extremely easy (rather than not impossible) for anybody with half a clue snip Sheesh. And despite your use of RHN (Reverse Hungarian Notation) you don't know that someList is a list? I appreciate your taking the time to post this thoughtful and civil

Re: Can't 'register' to Cheese Shop from command line..only web + egg dependency question

2006-12-07 Thread Adam Jones
[EMAIL PROTECTED] wrote: I seem to be able to register and upload from web site but not command line. Command line register attempts keep giving Server response (401): Authorization Required Any ideas? You probably need to set up a .pypirc file in your home directory. Info here:

Multithreaded python script calls the COMMAND LINE

2006-12-07 Thread johnny
I have python script does ftp download in a multi threaded way. Each thread downloads a file, close the file, calls the comman line to convert the .doc to pdf. Command line should go ahead and convert the file. My question is, when each thread calls the command line, does one command line process

SOAP Server with WSDL?

2006-12-07 Thread tobiah
I'm having trouble finding information about writing a SOAP server. I get the client part. There is much information about writing a client, but not so much about writing the server. Are there some good tutorials? I'm checking out: http://pywebsvcs.sourceforge.net/ But I'm a little confused.

Re: Why not just show the out-of-range index?

2006-12-07 Thread John Machin
OKB (not okblacke) wrote: John Machin wrote: It should be extremely easy (rather than not impossible) for anybody with half a clue snip Sheesh. And despite your use of RHN (Reverse Hungarian Notation) you don't know that someList is a list? I appreciate your taking the time to

Re: Embedded python adding variables linking to C++-Variables / callbacks

2006-12-07 Thread gagsl-py
On 7 dic, 11:33, iwl [EMAIL PROTECTED] wrote: What I found out up to now is to create a class inherited from an fitting type and overwrite the __setitem__ and __getitem__ method but haven't test this yet, something like that: class test(int): __setitem(self, value)__: C-Set-Func(value)

Re: Multithreaded python script calls the COMMAND LINE

2006-12-07 Thread gagsl-py
On 7 dic, 17:36, johnny [EMAIL PROTECTED] wrote: I have python script does ftp download in a multi threaded way. Each thread downloads a file, close the file, calls the comman line to convert the .doc to pdf. Command line should go ahead and convert the file. My question is, when each thread

Re: A Call to Arms for Python Advocacy

2006-12-07 Thread George Sakkis
Jeff Rush wrote: These works are to be formed into advocacy kits for various audiences. So far we have the following ideas for kits: - College Student's Python Advocacy Kit - IT Department Python Advocacy Kit - University Educator's Python Advocacy Kit - K-12 Educator's Python

Re: SOAP Server with WSDL?

2006-12-07 Thread Chris Lambacher
On Thu, Dec 07, 2006 at 12:49:09PM -0800, tobiah wrote: I'm having trouble finding information about writing a SOAP server. I get the client part. There is much information about writing a client, but not so much about writing the server. Are there some good tutorials? I'm checking out:

Re: Execution time of lines within a function

2006-12-07 Thread Ed Leafe
On Dec 4, 2006, at 11:36 PM, Paul McGuire wrote: The PythonDecoratorLibrary page on the Python wiki has a link to a @profile decorator, that I have used to profile the contents of targeted functions (only just now, I don't seem to be able to get to the wiki to get the exact link).

Re: memory error with matplot

2006-12-07 Thread John Hunter
lisa == lisa engblom [EMAIL PROTECTED] writes: lisa Hi, I am using matplotlib with python to generate a bunch of lisa charts. My code works fine for a single iteration, which lisa creates and saves 4 different charts. The trouble is that lisa when I try to run it for the entire

Re: Common Python Idioms

2006-12-07 Thread George Sakkis
Danny Colligan wrote: Is there a list somewhere listing those not-so-obvious-idioms? I don't know about lists of not-so-obvious idioms, but here's some gotchas (there may be some overlap with what you're asking about): http://zephyrfalcon.org/labs/python_pitfalls.html

Re: SOAP Server with WSDL?

2006-12-07 Thread tobiah
You want ZSI. If you already have a wsdl you then use wsdl2py and wsdl2dispatch to create your server classes. The server classes get used with ZSI.ServiceContainer. Unfortunately there is not much documentation about this. Actually, do I have to make a WSDL? Do people hand write

  1   2   >