ANN: Python and XML talk in Omaha

2006-08-29 Thread Mike Hostetler
On Sept 5, I will be giving a presentation on Python and XML for the Omaha Dynamic Users Group. The goal of the Dynamic Users Group is to learn from and about dynamic languages, (Perl, Ruby, Smalltalk as well as Python). Most of the audience will not be Python users. However, my talk will

IAF - Interaction Framework Release 0.02

2006-08-29 Thread Gil Mueller
The framework now includes remote communication. IAF is a framework for specifying interactions between components or subsystems for reactive and distributed systems. It provides high-level message passing services based on group communication. It is also very useful for integrating

ANN: wxPyCoverage 0.01 - Interactive source display of trace.py output

2006-08-29 Thread djaquay
wxPyCoverage is a simple source browser that shows which lines of code have and have not been executed, by accepting the output from trace.py and updating the code display as the program executes. To run it, redirect the output from your program to the input of wxPyCoverage, thusly:

Wing IDE 2.1.2 released

2006-08-29 Thread Wingware Announce
Hi, We're happy to announce version 2.1.2 of Wing IDE, an advanced development environment for the Python programming language. This is a bugfix release that improves support for Python 2.5 (2.5c1 is required) and fixes a number of bugs. The release can be downloaded from:

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Gabriel Genellina
At Tuesday 29/8/2006 02:45, Antoon Pardon wrote: That may be true. But one may wonder if this is a failing of the programmer or a failing of the language that doesn't support such things. In any case, I don't see how this supports the original claim that strict type checking input params is

Re: unit test for a printing method

2006-08-29 Thread Marco Wahl
[OP] What is the proper way to test (using unit test) a method that print information? [...] Fredrik Lundh [EMAIL PROTECTED] writes: Scott David Daniels wrote: For silly module myprog.py: def A(s): print '---'+s+'---' in test_myprog.py: import unittest from

Re: [ANN] NumPy 1.0b4 now available

2006-08-29 Thread Bruce Who
Hi, Travis I can pack my scripts into an executable with py2exe, but errors occur once it runs: No scipy-style subpackage 'random' found in D:\test\dist\numpy. Ignoring: No module named info import core - failed: No module named _internal import lib - failed: 'module' object has no attribute

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Antoon Pardon
On 2006-08-29, Simon Forman [EMAIL PROTECTED] wrote: Antoon Pardon wrote: On 2006-08-28, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Antoon Pardon wrote: There seem to be enough problems that work with ints but not with floats. In such a case enforcing that the number you work with is

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Antoon Pardon
On 2006-08-29, Gabriel Genellina [EMAIL PROTECTED] wrote: At Tuesday 29/8/2006 02:45, Antoon Pardon wrote: That may be true. But one may wonder if this is a failing of the programmer or a failing of the language that doesn't support such things. In any case, I don't see how this supports

a question about my script

2006-08-29 Thread alper soyler
Hi all,I am trying to get some files from an ftp site by ftplib module and I wrote the below script. However I have a problem. With my script, I login to ftp.genome.jp site. then, I am changing the directory to pub/kegg/genomes/afm and I am downloading "a.fumigatus.pep" file. However, what I want

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Simon Forman
Antoon Pardon wrote: On 2006-08-28, Scott David Daniels [EMAIL PROTECTED] wrote: Antoon Pardon wrote: On 2006-08-25, Simon Forman [EMAIL PROTECTED] wrote: ... Generally asserts should be used to enforce invariants of your code (as opposed to typechecking), or to check certain things

Re: naive misuse? (of PyThreadState_SetAsyncExc)

2006-08-29 Thread Simon Forman
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: The documentation for PyThreadState_SetAsyncExc says To prevent naive misuse, you must write your own C extension to call this. Anyone care to list a few examples of such naive misuse? No? I'll take that then as proof that it's impossible

Re: XML parsing and writing

2006-08-29 Thread Stefan Behnel
c00i90wn wrote: Stefan Behnel wrote: c00i90wn wrote: Hey, I'm having a problem with the xml.dom.minidom package, I want to generate a simple xml for storing configuration variables, for that purpose I've written the following code, but before pasting it I'll tell you what my problem is. On

Re: Don't use __slots__ (was Re: performance of dictionary lookup vs. object attributes)

2006-08-29 Thread Antoon Pardon
On 2006-08-27, Jacob Hallen [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Patrick Maupin [EMAIL PROTECTED] wrote: Unfortunately there is a side effect to slots. They change the behaviour of the objects that have slots in a way that can be abused by control freaks and static typing

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Jonathan Gardner
Simon Forman wrote: If you have a reason to restrict your code to using only ints (perhaps you're packing them into an array of some sort, or passing them to a C extension module) then yes, of course it's appropriate. I politely disagree. Rather than an interface that demands an actual int,

prob with tkinter

2006-08-29 Thread JyotiC
hi, i am making a GUI using tkinter i need to get lot of data from user, it's in form of a excel sheets(many rows n columns) what i am using is grid for foramating, frame is from Toplevel, data collected from Entry widget I can't see most of the columns. I am not able to add scroll bar, i want it

prob with tkinter

2006-08-29 Thread JyotiC
hi, i am making a GUI using tkinter i need to get lot of data from user, it's in form of a excel sheets(many rows n columns) what i am using is grid for foramating, frame is from Toplevel, data collected from Entry widget I can't see most of the columns. I am not able to add scroll bar, i want it

Re: a question about my script

2006-08-29 Thread Gabriel Genellina
At Tuesday 29/8/2006 03:55, alper soyler wrote: I am trying to get some files from an ftp site by ftplib module and I wrote the below script. However I have a problem. With my script, I login to ftp.genome.jp site. then, I am changing the directory to pub/kegg/genomes/afm and I am downloading

Candygram

2006-08-29 Thread Salvatore
Hello, I am using the following code to fetch URL Is there a way to speed it. I cant't get rid of the time.sleep(1) for every request !!! Thank you for you advise Regards Salvatore from candygram import cg def fetchURL(): r = cg.Receiver() r.addHandler(cg.Any,getURL,cg.Message)

The lib email parse problem...

2006-08-29 Thread 叮叮当当
hi, all when a email body consist with multipart/alternative, i must know when the boundary ends to parse it, but the email lib have not provide some function to indicate the boundary end, how to solve it ? thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Antoon Pardon
On 2006-08-29, Jonathan Gardner [EMAIL PROTECTED] wrote: Simon Forman wrote: If you have a reason to restrict your code to using only ints (perhaps you're packing them into an array of some sort, or passing them to a C extension module) then yes, of course it's appropriate. I politely

Re: How ahead are you guys in the (Python) real world?

2006-08-29 Thread Fredrik Lundh
Ray wrote: Since I haven't used Python at work, I am using Python 2.5 right now. However I wonder, how fast are you guys moving from version to version at work? fwiw, I work on systems that runs on 1.5.2, 2.1, 2.3 and bleeding edge. /F --

Re: How ahead are you guys in the (Python) real world?

2006-08-29 Thread Fredrik Lundh
Jorge Vargas wrote: for ones 2.5 is not consider production code yet so noone should be running anything on it. same with 1.6. that's completely ignoring how Python's developed, though. if you know what you're doing, using stable (*) betas or release candidates can be an excellent idea. /F

Re: Desktop Notification/Alerts In Python

2006-08-29 Thread alex23
Chaos wrote: I am looking for ways to have a Desktop Alert, like the one most IM Messengers have (MSN, AIM) at the lower right above the taskbar. Can anyone point me to the right resources to use? Under Windows, they're called balloon tips. Here's a thread from a few years back asking for the

Re: The lib email parse problem...

2006-08-29 Thread Fredrik Lundh
wrote: when a email body consist with multipart/alternative, i must know when the boundary ends to parse it, or use a library that understands multipart messages. but the email lib have not provide some function to indicate the boundary end, how to solve it ?

Re: How ahead are you guys in the (Python) real world?

2006-08-29 Thread Bruno Desthuilliers
Ray wrote: Since I haven't used Python at work, I am using Python 2.5 right now. However I wonder, how fast are you guys moving from version to version at work? As an illustration my ex-company just moved to Java 5, which was released around... what, 2-3 years ago? (While I am running Java 6

Re: XML parsing and writing

2006-08-29 Thread Fredrik Lundh
someone wrote: Nice package ElementTree is but sadly it doesn't have a pretty print, well, guess I'll have to do it myself, if you have one already can you please give it to me? thanks :) http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/indent.py /F --

Re: The lib email parse problem...

2006-08-29 Thread John Machin
叮叮当当 wrote: hi, all when a email body consist with multipart/alternative, i must know when the boundary ends to parse it, but the email lib have not provide some function to indicate the boundary end, how to solve it ? By reading the manual.

Re: Truly platform-independent DB access in Python?

2006-08-29 Thread Bruno Desthuilliers
Boris Dušek wrote: Bruno Desthuilliers wrote: but what if the OS with server accessing the site that is on shared area changes? And what if Python is not installed on it ?-) Seriously, do you think that hosting companies swap OS very often ? No, I don't. But I was trying to find the

Re: unit test for a printing method

2006-08-29 Thread Fredrik Lundh
Marco Wahl wrote: Fredrik Lundh [EMAIL PROTECTED] writes: Scott David Daniels wrote: For silly module myprog.py: def A(s): print '---'+s+'---' in test_myprog.py: import unittest from cStringIO import StringIO # or from StringIO ... why are you trying to

Re: The lib email parse problem...

2006-08-29 Thread 叮叮当当
this is not enough. when a part is mulitpart/alternative, i must find out which sub part i need, not all the subparts. so i must know when the alternative is ended. John Machin 写道: 叮叮当当 wrote: hi, all when a email body consist with multipart/alternative, i must know when the boundary

Re: The lib email parse problem...

2006-08-29 Thread Max M
叮叮当当 wrote: this is not enough. when a part is mulitpart/alternative, i must find out which sub part i need, not all the subparts. so i must know when the alternative is ended. Have you tried the email module at all? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science

Re: The lib email parse problem...

2006-08-29 Thread 叮叮当当
supose a email part like this: Content-Type: Multipart/Alternative; boundary=Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm --Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7bit abcd. --Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm

Re: Pros/Cons of Turbogears/Rails?

2006-08-29 Thread Paul Boddie
[comp.lang.ruby snipped] Ray wrote: Paul Boddie wrote: So actual maturity isn't important when using a technology: it's perceived maturity that counts, right? Well depends on counts in what sense. Counts as in the managers up there perceive something as mature, despite proofs of the

Re: The lib email parse problem...

2006-08-29 Thread 叮叮当当
i just use email module lib. Max M 写道: 叮叮当当 wrote: this is not enough. when a part is mulitpart/alternative, i must find out which sub part i need, not all the subparts. so i must know when the alternative is ended. Have you tried the email module at all? -- hilsen/regards Max

Re: How ahead are you guys in the (Python) real world?

2006-08-29 Thread Fuzzyman
Ray wrote: Since I haven't used Python at work, I am using Python 2.5 right now. However I wonder, how fast are you guys moving from version to version at work? As an illustration my ex-company just moved to Java 5, which was released around... what, 2-3 years ago? (While I am running Java 6

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Steve Holden
Antoon Pardon wrote: On 2006-08-29, Gabriel Genellina [EMAIL PROTECTED] wrote: At Tuesday 29/8/2006 02:45, Antoon Pardon wrote: That may be true. But one may wonder if this is a failing of the programmer or a failing of the language that doesn't support such things. In any case, I don't see

Re: time.clock() going backwards??

2006-08-29 Thread Hendrik van Rooyen
Grant Edwards [EMAIL PROTECTED] Wrote: | On 2006-08-28, Grant Edwards [EMAIL PROTECTED] wrote: | | For processors that run at (say) 2GHz, several million (say 10 | million) represents a difference of 10e6/2e9 = 0.005 seconds | between when the processors were sufficiently powered up to |

Re: How to let a loop run for a while before checking for break condition?

2006-08-29 Thread Hendrik van Rooyen
Claudio Grondi [EMAIL PROTECTED] wrote: 8- | The test of the counter is what actually slows the loop down. Probably | the test of time slows the loop even more down. Any test slows a loop | down, so the idea here is to get rid of the test what can be done by | interrupting

Re: The lib email parse problem...

2006-08-29 Thread Fredrik Lundh
wrote: the plain text is abcd, and the alternative content type is text/html, i should prefer explain the html content, and i must not explaint the two part ,so i want to get the boundary end. so use the email module: import email message_text = ... message =

Re: The lib email parse problem...

2006-08-29 Thread Steve Holden
叮叮当当 wrote: supose a email part like this: Content-Type: Multipart/Alternative; boundary=Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm --Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7bit abcd.

Re: Starting up the server

2006-08-29 Thread alex23
john Perry wrote: how to solve these error ImportError: No module named pkg_resources Hey John, There's a TurboGears group that will be better suited to answering TG-related questions: http://groups.google.com/group/turbogears It looks like this issue has come up before:

Re: Pros/Cons of Turbogears/Rails?

2006-08-29 Thread Christophe
Paul Boddie a écrit : [comp.lang.ruby snipped] Ray wrote: I've met a number of people who've told me they'd program in Eiffel if they could. And hey, perhaps in its day Eiffel *was* the best OO language out there. Certainly it looked cleaner than C++! :) So why don't they? Management

Re: The lib email parse problem...

2006-08-29 Thread 叮叮当当
this is just a temp solution for the simplest email format as my example, and i cannot always only show the html part. but in fact , there are many more difficult mail format btw, i know how to use walk(), and the question is not this. my code is as the following: def mail_content(mail):

Re: The lib email parse problem...

2006-08-29 Thread 叮叮当当
i know how to use email module lib. the question is about how to handle the rfc 1521 mime mulitpart/alternitave part . i know emai can handle mulitpart , but the subpart alternative is special . Steve Holden 写道: 叮叮当当 wrote: supose a email part like this: Content-Type:

Re: The lib email parse problem...

2006-08-29 Thread Fredrik Lundh
wrote: btw, i know how to use walk(), and the question is not this. so what is the question? /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Antoon Pardon
On 2006-08-29, Steve Holden [EMAIL PROTECTED] wrote: Antoon Pardon wrote: On 2006-08-29, Gabriel Genellina [EMAIL PROTECTED] wrote: At Tuesday 29/8/2006 02:45, Antoon Pardon wrote: That may be true. But one may wonder if this is a failing of the programmer or a failing of the language that

Re: The lib email parse problem...

2006-08-29 Thread John Machin
叮叮当当 wrote: this is not enough. when a part is mulitpart/alternative, i must find out which sub part i need, not all the subparts. so i must know when the alternative is ended. So you'll have to write your own tree-walker. It would seem that is_multipart(), get_content_type() and

Re: about daemons and IPC

2006-08-29 Thread flupke
[EMAIL PROTECTED] schreef: Hey people! For the first time I'm doing a client/server application, and I'm really confused with IPC stuff. I read the fastest method is shared memory, but I tryed mmap and found it tedious for the amount of data I'm handling (which is 30K at most, but mmap

ntp in python

2006-08-29 Thread Janto Dreijer
I want to measure the packet delivery delays over various network links. For this I need to synchronise the times of the sender and receiver, either against NTP or eachother. Unfortunately I won't necessarily have root priviledges to change the PCs' clocks. So I'm looking for a way I can

Re: unit test for a printing method

2006-08-29 Thread noro
Fredrik Lundh wrote: Scott David Daniels wrote: For silly module myprog.py: def A(s): print '---'+s+'---' in test_myprog.py: import unittest from cStringIO import StringIO # or from StringIO ... why are you trying to reinvent doctest ? /F it was my

Re: unit test for a printing method

2006-08-29 Thread Fredrik Lundh
noro wrote: why are you trying to reinvent doctest ? it was my understanding that doctest is intented to test the little examples in a function/class documention, do people use it for more then that, i.e - do an extentive output testing for thier apps? yes (by using doctest to test the test

Re: NEED HELP

2006-08-29 Thread Rob Wolfe
[EMAIL PROTECTED] wrote: Below is my code, which is kind of virtual and with its help ill use it in my main project. Now what i am looking for is can anybody write all the code inside a class...so that I can reuse it. I am kind of novice...n kind of stuc with that. from Tkinter import *

Re: Pros/Cons of Turbogears/Rails?

2006-08-29 Thread Ray
Paul Boddie wrote: snip Sure. Just get certified on whatever today's middle management are advocating, spend a few years working with that stuff, then repeat the process for the next generation of middle management - it can certainly make money for people who don't seek any meaning in what

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-08-29 Thread Joachim Durchholz
Jim Gibson schrieb: The problem addressed by what is know in Perl as the 'Schwartzian Transform' is that the compare operation can be an expensive one, regardless of the whether the comparison uses multiple keys. Since in comparison sorts, the compare operation will be executed N(logN)

Extending the dict class

2006-08-29 Thread chosechu
Hello Pythoneers: I need to pass a list of named arguments to a function in a given order, and make sure these named arguments are retrieved using keys() in the same order they were given. Example: keyargs={} keyargs['one']=1 keyargs['two']=2 keyargs['three']=3 myfunc(**keyargs) - myfunc would

Re: Extending the dict class

2006-08-29 Thread Duncan Booth
chosechu wrote: Is it possible to force dictionary creation in these case to use my own dict class instead of the default one? No I guess we can formulate this as a more generic question: if I want to modify the behaviour of the dictionary class, is there any way to do it interpreter-wide

Re: Pros/Cons of Turbogears/Rails?

2006-08-29 Thread Paul Boddie
Ray wrote: It can certainly make money--true. Don't seek any meaning in what they do?! You're just accusing a lot of honest hardworking people to be mindless drones there. We have feelings too, you know :( Well, I'm sorry for the unintentional insult. However, I've come to believe that some

Re: Extending the dict class

2006-08-29 Thread chosechu
Duncan Booth wrote: Is it possible to force dictionary creation in these case to use my own dict class instead of the default one? No Ouch. I was expecting something like that, thanks for confirming it. If I may: this seems inconsistent to me. I have created an augmented version of the

Re: Extending the dict class

2006-08-29 Thread Bruno Desthuilliers
chosechu wrote: Hello Pythoneers: I need to pass a list of named arguments to a function in a given order, and make sure these named arguments are retrieved using keys() in the same order they were given. Example: keyargs={} keyargs['one']=1 keyargs['two']=2 keyargs['three']=3

Re: Pros/Cons of Turbogears/Rails?

2006-08-29 Thread Bruno Desthuilliers
Paul Boddie wrote: Ray wrote: (snip) We're a Java shop so our developers are trained in Java, Struts, Tomcat, etc. Any switch to a dynamic language will be a huge change. However it baffles me that they are open to at least a PoC in Rails. but when I suggested Python, they went: nah we're

Python and Prolog

2006-08-29 Thread rodmc
Can anyone recommend a library which will let me bridge between Python and Prolog? I have looked around but as yet have had no luck. Either the libraries are no longer being updated or the links do not work. FYI: I am using Python 2.4 and SWI Prolog, I would also like to make sure it can run on

Re: Extending the dict class

2006-08-29 Thread chosechu
I'm not sure to understand why you want to do so - perhaps you could tell more about your real use case ? Without diving into too many details: I am calling SOAPpy to build SOAP requests. When calling a proxy, named arguments are used to build up the corresponding XML like:

subprocess woes

2006-08-29 Thread km
Hi all, I have a strange question. a program on shell looks as follows: $cat test.fa |fasta34 -q @ s where test.fa contains a protein sequence (alphabets); s is the database to be searched and @ +indicates that the input is from stdin (ie., 'cat test.fa') now instead of 'cat test.fa' i take that

Re: Extending the dict class

2006-08-29 Thread Fredrik Lundh
chosechu wrote: Yes, if I could simply modify myfunc() I would have workarounds. This would mean me modifying SOAPpy and specializing it for my needs. maybe you could fake it: class fakedict(dict): def __init__(self, *data): self.data = list(data) for k, v in data:

Re: Extending the dict class

2006-08-29 Thread Duncan Booth
chosechu wrote: SOAPpy cannot know in advance the argument names since they are server-dependent and SOAPpy is generic, so retrieving named arguments with **k seems like the sensible thing to do. Unfortunately this gets converted to a dict so looses all ordering when being received.

Re: Extending the dict class

2006-08-29 Thread chosechu
Duncan Booth wrote: If the order of the argument names matters, then it seems to me that should be handled by the SOAP library, not pushed onto the end user whoch should just be calling the function with the named arguments in the most convenient order. Shouldn't SOAPpy be able to get this

Re: How ahead are you guys in the (Python) real world?

2006-08-29 Thread A.M. Kuchling
On 28 Aug 2006 20:13:54 -0700, Ray [EMAIL PROTECTED] wrote: Since I haven't used Python at work, I am using Python 2.5 right now. However I wonder, how fast are you guys moving from version to version at work? At our company, we build a product on top of Debian (product line 1) or

Re: ntp in python

2006-08-29 Thread Jeremy Sanders
Janto Dreijer wrote: I want to measure the packet delivery delays over various network links. For this I need to synchronise the times of the sender and receiver, either against NTP or eachother. Couldn't you just use NTP itself to get the delivery delay? You can read the delay out from the

Re: Extending the dict class

2006-08-29 Thread chosechu
(the exact set of methods you need to override depends on how SOAPpy fetches the members). [fakedict class] This I did. And checking out the source it seems SOAPpy retrieves named parameters through keys(), which is the method I tried to overload. Trouble is: something happens to my fakedict

Re: Extending the dict class

2006-08-29 Thread Duncan Booth
chosechu wrote: Duncan Booth wrote: If the order of the argument names matters, then it seems to me that should be handled by the SOAP library, not pushed onto the end user whoch should just be calling the function with the named arguments in the most convenient order. Shouldn't SOAPpy

Re: Extending the dict class

2006-08-29 Thread chosechu
Duncan Booth wrote: No, you weren't able to extend the builtin dict class nor touch any its constructor. Yes, sorry. Forgot the negation. All you did was to create a subclass with its own constructor and hide the name for the builtin dictionary type. The original type was still unchanged

Re: Extending the dict class

2006-08-29 Thread Tim N. van der Leeuw
Fredrik Lundh wrote: chosechu wrote: Yes, if I could simply modify myfunc() I would have workarounds. This would mean me modifying SOAPpy and specializing it for my needs. maybe you could fake it: No you cannot fake it, because the ** form of passing arguments constructs a new

Re: Extending the dict class

2006-08-29 Thread Tim N. van der Leeuw
chosechu wrote: Duncan Booth wrote: If the order of the argument names matters, then it seems to me that should be handled by the SOAP library, not pushed onto the end user whoch should just be calling the function with the named arguments in the most convenient order. Shouldn't

Re: Extending the dict class

2006-08-29 Thread Fredrik Lundh
Tim N. van der Leeuw wrote: maybe you could fake it: No you cannot fake it, because the ** form of passing arguments constructs a new dictionary (and that dictionary is the standard built-in type of dictionary, not your own fake-dictionary). yeah, I thought he was passing a dictionary to a

Re: Max OSX and Excel

2006-08-29 Thread Jorge Vargas
On 28 Aug 2006 15:50:57 -0700, John Machin [EMAIL PROTECTED] wrote: Jorge Vargas wrote: On 8/28/06, Johanna Pfalz [EMAIL PROTECTED] wrote: To be more specific, I'm interested in reading in certain rows and columns from an excel spreadsheet directly without converting the information to a

absolute imports (python-2.5)

2006-08-29 Thread [EMAIL PROTECTED]
Hello all I just played around a bit with python 2.5 and relative imports. Bit disappointed so far. Hoped to be able to use this new feature to develop standalone libraries that can be just dropped into any project without having to adjust any imports. pkg/ pkg/__init__.py pkg/main.py

Re: ntp in python

2006-08-29 Thread Sander Steffann
Hi, I want to measure the packet delivery delays over various network links. For this I need to synchronise the times of the sender and receiver, either against NTP or eachother. Maybe you can contact RIPE. They have test-boxes for exactly these kind of tests. I know AMS-IX uses them to

Re: Python daemon process

2006-08-29 Thread Thomas Dybdahl Ahle
I might not have made myself very clear, since you both got me wrong. What I need, is not a method to terminate a process, but a way to terminate a process when the main process dies. From the atexit module info: Note: the functions registered via this module are not called when the program is

Re: newbe question about removing items from one file to another file

2006-08-29 Thread Anthra Norell
Dexter, I looked at the format specification. It contains an example: --- CsoundSynthesizer; ; test.csd - a Csound structured data file CsOptions -W -d -o tone.wav /CsOptions CsVersion;optional section Before 4.10 ;these two statements

Re: Extending the dict class

2006-08-29 Thread chosechu
Tim N. van der Leeuw wrote: Anyways, modifiying SOAPpy might not be a bad idea: submit your changes to the project, and you can write on your CV that you have contributed to open-source projects! ;-) Been there, done that. Don't worry, my contributions to open-source projects is largely

SOAPpy question

2006-08-29 Thread Yusnel Rojas
hello ,I'm wondering if SOAPpy doesn't have something to generate a wsdl for a specific application.Let's say, I wrote a web service with SOAPpy, is there any way to generate the wsdl for it. If there aren't can someone give a little example of both. thanks --

refering to base classes

2006-08-29 Thread glenn
hi - Im quite new to python, wondering if anyone can help me understand something about inheritance here. In this trivial example, how could I modify the voice method of 'dog' to call the base class 'creatures' voice method from with in it? class creature: def __init__(self):

Re: Python editor

2006-08-29 Thread John Salerno
Jerry Fleming wrote: Larry Bates wrote: Jason Jiang wrote: Hi, Could someone recommend a good Python editor? Thanks. Jason For just getting started use Idle that comes with Python. If you are already a user or if you are looking for a more powerful solution you can use Eclipse (with

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-08-29 Thread xhoster
Joachim Durchholz [EMAIL PROTECTED] wrote: Jim Gibson schrieb: The problem addressed by what is know in Perl as the 'Schwartzian Transform' is that the compare operation can be an expensive one, regardless of the whether the comparison uses multiple keys. Since in comparison sorts, the

Re: refering to base classes

2006-08-29 Thread Chaz Ginger
glenn wrote: hi - Im quite new to python, wondering if anyone can help me understand something about inheritance here. In this trivial example, how could I modify the voice method of 'dog' to call the base class 'creatures' voice method from with in it? class creature: def

Re: refering to base classes

2006-08-29 Thread Chaz Ginger
Chaz Ginger wrote: glenn wrote: hi - Im quite new to python, wondering if anyone can help me understand something about inheritance here. In this trivial example, how could I modify the voice method of 'dog' to call the base class 'creatures' voice method from with in it? class creature:

Re: Extending the dict class

2006-08-29 Thread Bruno Desthuilliers
chosechu wrote: Duncan Booth wrote: No, you weren't able to extend the builtin dict class nor touch any its constructor. Yes, sorry. Forgot the negation. All you did was to create a subclass with its own constructor and hide the name for the builtin dictionary type. The original type was

Re: refering to base classes

2006-08-29 Thread Roberto Bonvallet
glenn wrote: [...] In this trivial example, how could I modify the voice method of 'dog' to call the base class 'creatures' voice method from with in it? class creature: def __init__(self): self.noise= def voice(self): return voice: + self.noise class

Re: Python editor

2006-08-29 Thread [EMAIL PROTECTED]
John Salerno wrote: Is it possible to get vim-python for Windows, or is that just a Linux build? It builds for windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: refering to base classes

2006-08-29 Thread Bruno Desthuilliers
glenn wrote: hi - Im quite new to python, wondering if anyone can help me understand something about inheritance here. In this trivial example, how could I modify the voice method of 'dog' to call the base class 'creatures' voice method from with in it? class creature: def

Re: RE Module

2006-08-29 Thread Roman
It turns out false alarm. It work. I had other logic in the expression involving punctuation marks and got all confused with the escape characters. It becomes a mess trying to keep track of all the reserved character as you are going from module to module. tobiah wrote: Roman wrote: I

Re: Python editor

2006-08-29 Thread Andrew Robert
[EMAIL PROTECTED] wrote: John Salerno wrote: Is it possible to get vim-python for Windows, or is that just a Linux build? It builds for windows. When installed, you may also want to consider the python add-on located at http://www.vim.org/scripts/script.php?script_id=790 Enhanced

Re: Python editor

2006-08-29 Thread Neil Cerutti
On 2006-08-29, John Salerno [EMAIL PROTECTED] wrote: Vim (vim-python) or emacs (python.el) is always the best solution. Is it possible to get vim-python for Windows, or is that just a Linux build? The windows binary for the latest version, 7.0, includes the Python commands (the version 6

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-08-29 Thread Gabriel Genellina
At Tuesday 29/8/2006 07:50, Joachim Durchholz wrote: Wikipedia says it's going from 2NlogN to N. If a sort is massively dominated by the comparison, that could give a speedup of up to 100% (approximately - dropping the logN factor is almost irrelevant, what counts is losing that factor of 2).

Re: M$ windows python libs installed in arbitrary directories forcustomized python distributions

2006-08-29 Thread Fredrik Lundh
alf wrote: ok, let me clarify, by M$ I meant Micro$oft. http://www.catb.org/~esr/faqs/smart-questions.html#writewell /F -- http://mail.python.org/mailman/listinfo/python-list

Re: refering to base classes

2006-08-29 Thread Jason
Chaz Ginger wrote: Chaz Ginger wrote: glenn wrote: hi - Im quite new to python, wondering if anyone can help me understand something about inheritance here. In this trivial example, how could I modify the voice method of 'dog' to call the base class 'creatures' voice method from with

Re: How to let a loop run for a while before checking for break condition?

2006-08-29 Thread Hendrik van Rooyen
Hendrik van Rooyen [EMAIL PROTECTED] wrote: 8- Here are some more results, three runs without, and three with a comment in the body of the interesting loop: (a summary follows the detail) python junk.py 0x501 Loop 1 Elapsed time is: 31.2168951035 Loop 1

Re: refering to base classes

2006-08-29 Thread Chaz Ginger
Jason wrote: Chaz Ginger wrote: Chaz Ginger wrote: glenn wrote: hi - Im quite new to python, wondering if anyone can help me understand something about inheritance here. In this trivial example, how could I modify the voice method of 'dog' to call the base class 'creatures' voice method

Re: M$ windows python libs installed in arbitrary directories forcustomized python distributions

2006-08-29 Thread DH
Fredrik Lundh wrote: alf wrote: ok, let me clarify, by M$ I meant Micro$oft. http://www.catb.org/~esr/faqs/smart-questions.html#writewell /F And by /F, you mean fuck off? http://www.libervis.com/blogs/15/Jastiv/eric_raymond_and_the_rtfm_jerks

  1   2   >