Elisa Media Center 0.5.3 Release

2008-07-28 Thread Florian Boucault
Dear Elisa users, This mail announces the release of Elisa Media Center 0.5.3 codenamed Attraction. Installers and sources can be downloaded from http://elisa.fluendo.com/download/ Features added since 0.5.2: - iPod support has been improved: it shows the available Artists then the Albums of

Re: Attack a sacred Python Cow

2008-07-28 Thread Russ P.
On Jul 27, 10:32 pm, Terry Reedy [EMAIL PROTECTED] wrote: Derek Martin wrote: Furthermore, as you described, defining the function within the scope of a class binds a name to the function and then makes it a method of the class. Once that happens, *the function has become a method*. If

Re: Attack a sacred Python Cow

2008-07-28 Thread s0suk3
On Jul 27, 10:55 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: On Jul 26, 6:47 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], [EMAIL PROTECTED]

Re: Attack a sacred Python Cow

2008-07-28 Thread Carl Banks
On Jul 27, 5:14 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Sat, 26 Jul 2008 15:58:16 -0700, Carl Banks wrote: On Jul 26, 5:07 pm, Terry Reedy [EMAIL PROTECTED] wrote: Whether or not one should write 'if x' or 'if x != 0' [typo corrected] depends on whether one means

Re: Attack a sacred Python Cow

2008-07-28 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: On Jul 27, 10:55 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: On Jul 26, 6:47 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand

Re: Python program as daemon?

2008-07-28 Thread Diez B. Roggisch
Lawrence D'Oliveiro schrieb: In message [EMAIL PROTECTED], sturlamolden wrote: Basically it forks twice ... What's the advantage of forking twice over forking once and calling setsid? http://code.activestate.com/recipes/278731/ See the comments. Diez --

Re: Attack a sacred Python Cow

2008-07-28 Thread Nikolaus Rath
castironpi [EMAIL PROTECTED] writes: I think you misunderstood him. What he wants is to write class foo:    def bar(arg):        self.whatever = arg + 1 instead of class foo:    def bar(self, arg)        self.whatever = arg + 1 so 'self' should *automatically* only be inserted in the

We programming

2008-07-28 Thread srinivasan srinivas
Hi, Could someone suggest me better python modules for developing web programming related projects like web-pages download and uopload?? Thanks, Srini Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Attack a sacred Python Cow

2008-07-28 Thread Nikolaus Rath
Michael Torrie [EMAIL PROTECTED] writes: Colin J. Williams wrote: def fun( ., cat): I don't see the need for the comma in fun. It (the entire first variable!) is needed because a method object is constructed from a normal function object: def method(self,a,b): pass class

Re: Execution speed question

2008-07-28 Thread Suresh Pillai
On Fri, 25 Jul 2008 08:08:57 -0700, Iain King wrote: On Jul 25, 3:39 pm, Suresh Pillai [EMAIL PROTECTED] wrote: That's a good comparison for the general question I posed. Thanks. Although I do believe lists are less than ideal here and a different data structure should be used. To be more

Re: Attack a sacred Python Cow

2008-07-28 Thread Nikolaus Rath
Bruno Desthuilliers [EMAIL PROTECTED] writes: The fact that a function is defined within a class statement doesn't imply any magic, it just creates a function object, bind it to a name, and make that object an attribute of the class. You have the very same result by defining the function

Re: Attack a sacred Python Cow

2008-07-28 Thread Nikolaus Rath
Russ P. [EMAIL PROTECTED] writes: The issue here has nothing to do with the inner workings of the Python interpreter. The issue is whether an arbitrary name such as self needs to be supplied by the programmer. All I am suggesting is that the programmer have the option of replacing

Re: Attack a sacred Python Cow

2008-07-28 Thread Nikolaus Rath
Michael Torrie [EMAIL PROTECTED] writes: I think the biggest reason why an implicit self is bad is because it prevents monkey-patching of existing class objects. Right now I can add a new method to any existing class just with a simple attribute like so (adding a new function to an existing

Re: Execution speed question

2008-07-28 Thread Suresh Pillai
On Fri, 25 Jul 2008 05:46:56 -0700, Iain King wrote: or 3. build a new list every iteration intead of deleting from the old one: while processing: new_off_list = [] for x in off_list: if goes_on(x): on_list.append(x) else:

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Alan Franzoni
Michael Torrie was kind enough to say: Of course any time you send coherent numbers over the network, I highly recommend you use what's called network byte order. In C, you'd use the htonl() call, and then when pulling it off the wire on the other end you'd use ntohl(). If you don't then

Callback Python procedure from Delphi DLL

2008-07-28 Thread [EMAIL PROTECTED]
Hi! I have a component, and a tool in Delphi. I wanna call it from Python. I can implement all things I need into a Delphi generated DLL. It is ok, I can use this DLL from Python, but the DLL procedure needs a callback procedure to return the partially output, and needs a python passed

Re: Command line arguements

2008-07-28 Thread Gabriel Genellina
En Mon, 28 Jul 2008 01:43:52 -0300, Henry Chang [EMAIL PROTECTED] escribió: try optparse :) http://docs.python.org/lib/module-optparse.html (optparse might be too much for a single argument) On Sun, Jul 27, 2008 at 9:13 PM, aditya shukla [EMAIL PROTECTED]wrote: in other words i do not

Re: Attack a sacred Python Cow

2008-07-28 Thread s0suk3
On Jul 28, 1:55 am, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: On Jul 27, 10:55 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], [EMAIL PROTECTED]

Module clarification

2008-07-28 Thread Hussein B
Hi. I'm a Java guy and I'm playing around Python these days... In Java, we organize our classes into packages and then jarring the packages into JAR files. What are modules in Python? What is the equivalent of modules in Java? Please correct me if I'm wrong: I saved my Python code under the file

Re: Callback Python procedure from Delphi DLL

2008-07-28 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi! I have a component, and a tool in Delphi. I wanna call it from Python. I can implement all things I need into a Delphi generated DLL. It is ok, I can use this DLL from Python, but the DLL procedure needs a callback procedure to return the partially output,

Re: Attack a sacred Python Cow

2008-07-28 Thread Michael Torrie
Nikolaus Rath wrote: No, but it could work like this: def a(x, y): self.x = x self.y = y Frankly this would make reading and debugging the code by a third party to be a nightmare. Rather than calling the variable self as I did in my example, I could it in a much better way:

os.symlink()

2008-07-28 Thread Nikolaus Rath
Hello, From `pydoc os`: symlink(...) symlink(src, dst) Create a symbolic link pointing to src named dst. Is there any reason why this is so deliberately confusing? Why is the target of the symlink, the think where it points *to*, called the `src`? It seems to me

Re: os.symlink()

2008-07-28 Thread Diez B. Roggisch
Nikolaus Rath wrote: Hello, From `pydoc os`: symlink(...) symlink(src, dst) Create a symbolic link pointing to src named dst. Is there any reason why this is so deliberately confusing? Why is the target of the symlink, the think where it points *to*,

Re: Attack a sacred Python Cow

2008-07-28 Thread alex23
On Jul 28, 3:07 pm, Russ P. [EMAIL PROTECTED] wrote: What was suggested in rejected on the thread you pointed me to was not what I suggested. Not even close. Get it, genius? *sigh* Clearly I don't have better things to do right now than waste my time. You wrote: So why not allow something

Re: method decorators and more on decorators

2008-07-28 Thread Gabriel Genellina
En Sun, 27 Jul 2008 15:26:39 -0300, Themistoklis Bourdenas [EMAIL PROTECTED] escribió: Hi, is there any possible way to get the class or class name inside a method decorator? For example in the code sample below: def decorate(func): print type(func) return func class myclass:

Re: Protecting instance variables

2008-07-28 Thread Nikolaus Rath
Hi, Sorry for replying so late. Your MUA apparently messes up the References:, so I saw you reply only now and by coincidence. Diez B. Roggisch [EMAIL PROTECTED] writes: Nikolaus Rath schrieb: Hello, I am really surprised that I am asking this question on the mailing list, but I really

Re: Execution speed question

2008-07-28 Thread bearophileHUGS
Suresh Pillai: Or 4, since the order of my nodes doesn't matter: swap the node to be deleted with the last node in the list and then remove the last node of the list. This is the fastest to date, if using native structures, for low number nodes being deleted per cycle (def if only deleting

SOAPpy WSDL problem: namespace of schema and import match error

2008-07-28 Thread Christof Winter
I am trying to use a webservice with SOAPpy: import SOAPpy intact_wsdl = http://www.ebi.ac.uk/intact/binary-search-ws/binarysearch?wsdl; intact_serv = SOAPpy.WSDL.Proxy(intact_wsdl) The resulting error message is posted below. If I understand it right, XMLSchema.py complains about the imported

Re: ctypes - unloading implicitly loaded dlls

2008-07-28 Thread Nick Craig-Wood
pigmartian [EMAIL PROTECTED] wrote: I'm writing a program that uses functionality from two different sets of cdlls which reside in two different directories, call them 'libA.dll' and 'libB.dll'. Although I don't directly use it, both directories contain a dll with the same name,

Re: Google Group: architectgurus

2008-07-28 Thread Gerhard Häring
Dear Guru, Sudhakar Chavali wrote: Hi I have created a group called architectgurus (http://groups.google.com/ group/architectgurus) or [EMAIL PROTECTED] . Irrespective of technology, vendor, domain I will be discussing and share my thoughts in homogenous and harmonious way. If you are

Re: Raw Strings (I Think)

2008-07-28 Thread Gabriel Genellina
En Thu, 24 Jul 2008 12:02:00 -0300, Lanny [EMAIL PROTECTED] escribió: I've used glob.glob to get a list of files in a directory and now I want to use os.system to execute one of those files, the problem is that python automatically puts a escape charater infront of the back slashes so the

Re: Google Group: architectgurus

2008-07-28 Thread Diez B. Roggisch
Gerhard Häring wrote: Dear Guru, Sudhakar Chavali wrote: Hi I have created a group called architectgurus (http://groups.google.com/ group/architectgurus) or [EMAIL PROTECTED] . Irrespective of technology, vendor, domain I will be discussing and share my thoughts in homogenous and

Re: Module clarification

2008-07-28 Thread Floris Bruynooghe
On Jul 28, 9:54 am, Hussein B [EMAIL PROTECTED] wrote: Hi. I'm a Java guy and I'm playing around Python these days... In Java, we organize our classes into packages and then jarring the packages into JAR files. What are modules in Python? An importable or runable (i.e. script) collection of

Proxy server?

2008-07-28 Thread Gary
I've seen examples for HTTP and FTP use, but not for simply any TCP data on any port, which is what I require. Can anyone please point me in the right direction? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: Module clarification

2008-07-28 Thread Hussein B
On Jul 28, 6:55 am, Floris Bruynooghe [EMAIL PROTECTED] wrote: On Jul 28, 9:54 am, Hussein B [EMAIL PROTECTED] wrote: Hi. I'm a Java guy and I'm playing around Python these days... In Java, we organize our classes into packages and then jarring the packages into JAR files. What are

Re: Module clarification

2008-07-28 Thread Diez B. Roggisch
Hussein B wrote: Hi. I'm a Java guy and I'm playing around Python these days... In Java, we organize our classes into packages and then jarring the packages into JAR files. What are modules in Python? What is the equivalent of modules in Java? Read the docs:

Re: Attack a sacred Python Cow

2008-07-28 Thread Colin J. Williams
Michael Torrie wrote: Colin J. Williams wrote: def fun( ., cat): I don't see the need for the comma in fun. It (the entire first variable!) is needed because a method object is constructed from a normal function object: def

Re: Proxy server?

2008-07-28 Thread Diez B. Roggisch
Gary wrote: I've seen examples for HTTP and FTP use, but not for simply any TCP data on any port, which is what I require. Can anyone please point me in the right direction? For what? How to use such a thing, a transparent proxy? There is nothing to it, just plug it between your router and

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Scott David Daniels
Alan Franzoni wrote: Michael Torrie was kind enough to say: Of course any time you send coherent numbers over the network, I highly recommend you use what's called network byte order I'm sure python has some convention in the struct module for dealing with this. Not in the struct

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread [EMAIL PROTECTED]
On Mon, Jul 28, 2008 at 5:45 AM, Scott David Daniels [EMAIL PROTECTED] wrote: Alan Franzoni wrote: Michael Torrie was kind enough to say: Of course any time you send coherent numbers over the network, I highly recommend you use what's called network byte order I'm sure python has some

Re: Execution speed question

2008-07-28 Thread Suresh Pillai
On Mon, 28 Jul 2008 10:44:18 +0200, Suresh Pillai wrote: Since I am doing A LOT of loops over the nodes and the number of nodes is also huge, my concern using sets is that in order to iterate over the set in each step of my simulation, the set items need to be converted to a list every time.

Re: how to upload files to google code filesection ?

2008-07-28 Thread Mike Driscoll
On Jul 26, 12:43 pm, Stef Mientki [EMAIL PROTECTED] wrote: hello, In a program I want to download (updated) files from google code (not the svn section). I could find a python script to upload files, but not for downloading. Anyone has a hint or a solution ? thanks, Stef Mientki You

Re: Python program as daemon?

2008-07-28 Thread James Harris
On 25 Jul, 20:05, sturlamolden [EMAIL PROTECTED] wrote: On Jul 25, 8:37 pm, Johny [EMAIL PROTECTED] wrote: Is it possible to run a Python program as daemon? Thanks Here is an example on how to run a Python script as a Unix daemon:

Re: Module clarification

2008-07-28 Thread Duncan Booth
Hussein B [EMAIL PROTECTED] wrote: If I have a couple of modules, is there a way to package them? or there is no such a thing in Python? It sounds rather as though you haven't yet gone through the Python tutorial. You really should read it, even if you just skim through it to see what

ctypes and how to copy data passed to callback

2008-07-28 Thread waldek
Hi, I'm trying to handle data passed to Py Callback which is called from C dll. Callback passes data to another thread using Queue module and there the data are printed out. If data is printed out in a callback itself it's ok. If I put on queue and next get from queue in another thread script

Re: Attack a sacred Python Cow

2008-07-28 Thread Bruno Desthuilliers
Russ P. a écrit : On Jul 27, 12:39 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Derek Martin a écrit : On Sun, Jul 27, 2008 at 08:19:17AM +, Steven D'Aprano wrote: You take the name down to a single letter. As I suggested in an earlier post on this thread, why not take it down to

Re: Attack a sacred Python Cow

2008-07-28 Thread Bruno Desthuilliers
Russ P. a écrit : On Jul 27, 3:11 pm, Russ P. [EMAIL PROTECTED] wrote: On Jul 27, 12:39 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Derek Martin a écrit : On Sun, Jul 27, 2008 at 08:19:17AM +, Steven D'Aprano wrote: You take the name down to a single letter. As I suggested in an

Python FTP - NameError: name 'mydpa' is not defined

2008-07-28 Thread Harry
Hi there. I am trying to download a file(sn.last) from a public FTP server with the following code: from ftplib import FTP ftp=FTP('tgftp.nws.noaa.gov') ftp.login() ftp.cwd('SL.us008001/DF.of/DC.radar/DS.81dpr/SI.kbuf') ftp.retrbinar('RETR sn.last', open(mydpa,'wb').write) ftp.quit() but got an

Re: ctypes and how to copy data passed to callback

2008-07-28 Thread Diez B. Roggisch
waldek wrote: Hi, I'm trying to handle data passed to Py Callback which is called from C dll. Callback passes data to another thread using Queue module and there the data are printed out. If data is printed out in a callback itself it's ok. If I put on queue and next get from queue in

Getting python 2.4 dll

2008-07-28 Thread Guillermo
Hi there, Is it possible to get a 2.4 dll of python for Windows easily? I need it to use python as scripting language for Vim. Regards, Guillermo -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is the correct round() method?

2008-07-28 Thread Casey
On Jul 28, 12:34 am, Gary Herron [EMAIL PROTECTED] wrote: This will work as you wish:   math.floor(x+0.5) This works fine for positive x but what about negative: round(2.5) 3.0 floor(2.5 + 0.5) 3.0 round(-2.5) -3.0 floor(-2.5 + 0.5) -2.0 Maybe: def round2(x): return math.floor(x +

Re: Module clarification

2008-07-28 Thread Brett Ritter
On Jul 28, 4:54 am, Hussein B [EMAIL PROTECTED] wrote: Hi. I'm a Java guy and I'm playing around Python these days... In Java, we organize our classes into packages and then jarring the packages into JAR files. What are modules in Python? What is the equivalent of modules in Java? I'm new

Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-28 Thread Steven D'Aprano
Cutting to the crux of the discussion... On Sun, 27 Jul 2008 23:45:26 -0700, Carl Banks wrote: I want something where if x will do but a simple explicit test won't. Explicit tests aren't simple unless you know what type x is. If x could be of any type, you can't write a simple test. Does x

Re: ctypes and how to copy data passed to callback

2008-07-28 Thread Thomas Heller
waldek schrieb: Hi, I'm trying to handle data passed to Py Callback which is called from C dll. Callback passes data to another thread using Queue module and there the data are printed out. If data is printed out in a callback itself it's ok. If I put on queue and next get from queue

Re: Module clarification

2008-07-28 Thread Hussein B
On Jul 28, 8:11 am, Duncan Booth [EMAIL PROTECTED] wrote: Hussein B [EMAIL PROTECTED] wrote: If I have a couple of modules, is there a way to package them? or there is no such a thing in Python? It sounds rather as though you haven't yet gone through the Python tutorial. You really should

Re: Execution speed question

2008-07-28 Thread Sion Arrowsmith
Suresh Pillai [EMAIL PROTECTED] wrote: [ ... ] is there any way to iterate over the items in a set other than converting to a list or using the pop() method. Er, how about directly iterating over the set? -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ Frankly I have no

QOTW [was Re: Attack a sacred Python Cow]

2008-07-28 Thread Steven D'Aprano
On Sun, 27 Jul 2008 21:42:37 -0700, Russ P. wrote: +1 QOTW Do you realize what an insult that is to everyone else who has posted here in the past week? Actually I don't. I hadn't realised that when a person believes that somebody has made an especially clever, witty, insightful or fun

Re: Execution speed question

2008-07-28 Thread Steven D'Aprano
On Mon, 28 Jul 2008 15:04:43 +0200, Suresh Pillai wrote: I could of course use the old trick of using a dictionary with 'None' values and then using iterkeys(). But I thought sets were supposed to replace this. So maybe I should be asking a more basic question: is there any way to iterate

GUID Generation

2008-07-28 Thread Robert Rawlins
Chaps, I've been looking at the following recipe for generating a GUID http://code.activestate.com/recipes/163604/ however I note that its about 6 years old. Has python since adopted an internal module for GUID generation? Or is this 3rd part module still the best option? Cheers,

Re: os.symlink()

2008-07-28 Thread Grant Edwards
On 2008-07-28, Nikolaus Rath [EMAIL PROTECTED] wrote: Hello, From `pydoc os`: symlink(...) symlink(src, dst) Create a symbolic link pointing to src named dst. Is there any reason why this is so deliberately confusing? Why is the target of the symlink, the

Re: GUID Generation

2008-07-28 Thread Tim Golden
Robert Rawlins wrote: I’ve been looking at the following recipe for generating a GUID http://code.activestate.com/recipes/163604/ however I note that its about 6 years old. Has python since adopted an internal module for GUID generation? Or is this 3^rd part module still the best option? Not

Re: xml.dom's weirdness?

2008-07-28 Thread Sion Arrowsmith
Stefan Behnel [EMAIL PROTECTED] wrote: Using my system Python (2.5.1 on Ubunutu Gutsy): $ strace -e open python -c '' 21 | wc -l 551 $ strace -e open python -c '' 21 | wc -l 4631 Using a self-built Python I have lying around: $ strace -e open python2.3 -c '' 21 | wc -l 210 $

RE: GUID Generation

2008-07-28 Thread Robert Rawlins
Not only is the answer, Yes: http://docs.python.org/lib/module-uuid.html but it's just featured as Doug Hellmann's module of the Week: http://blog.doughellmann.com/2008/07/pymotw-uuid.html TJG Thanks Tim, Perfect! Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: ActiveState Code (the new Python Cookbook) has been launched

2008-07-28 Thread Nick Craig-Wood
Trent Mick [EMAIL PROTECTED] wrote: I happy to announce that ActiveState Code has been taken out of beta. This is the new site replacing the ASPN Cookbooks -- in particular the Python Cookbook. http://code.activestate.com/ Looks great and much faster than the old site! Mind

Re: Execution speed question

2008-07-28 Thread Suresh Pillai
On Mon, 28 Jul 2008 15:04:43 +0200, Suresh Pillai wrote: On Mon, 28 Jul 2008 10:44:18 +0200, Suresh Pillai wrote: Since I am doing A LOT of loops over the nodes and the number of nodes is also huge, my concern using sets is that in order to iterate over the set in each step of my

multiple inheritance and __getattr__

2008-07-28 Thread Enrico
Hi there, I have the following situation (I tryed to minimize the code to concentrate on the issue): class A(object): def __getattr__(self, name): print 'A.__getattr__' if name == 'a': return 1 raise AttributeError('%s not found in A' % name) class B(object): def __getattr__(self,

Re: QOTW [was Re: Attack a sacred Python Cow]

2008-07-28 Thread member thudfoo
On 28 Jul 2008 14:07:44 GMT, Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 27 Jul 2008 21:42:37 -0700, Russ P. wrote: +1 QOTW Do you realize what an insult that is to everyone else who has posted here in the past week? Actually I don't. I hadn't realised that when a person

Re: Python FTP - NameError: name 'mydpa' is not defined

2008-07-28 Thread MRAB
On Jul 28, 2:27 pm, Harry [EMAIL PROTECTED] wrote: Hi there. I am trying to download a file(sn.last) from a public FTP server with the following code: from ftplib import FTP ftp=FTP('tgftp.nws.noaa.gov') ftp.login() ftp.cwd('SL.us008001/DF.of/DC.radar/DS.81dpr/SI.kbuf') ftp.retrbinar('RETR

Re: We programming

2008-07-28 Thread Larry Bates
srinivasan srinivas wrote: Hi, Could someone suggest me better python modules for developing web programming related projects like web-pages download and uopload?? Thanks, Srini Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/ urllib, urllib2, httplib All

Re: Encoding for Devanagari Script.

2008-07-28 Thread Atul.
Hi Fredrik and Terry, Well I got this on IDLE I think I have done something wrong. import codecs f = open(C:\Documents and Settings\admin\My Documents\corpus\dainaikAikya collected by sushant.txt,r, utf_8) Traceback (most recent call last): File pyshell#1, line 1, in module f =

Re: xml.dom's weirdness?

2008-07-28 Thread Paul Boddie
On 28 Jul, 16:15, Sion Arrowsmith [EMAIL PROTECTED] wrote: Stefan Behnel [EMAIL PROTECTED] wrote: Blame Ubuntu/Debian. I'd be wary about including Debian in that blame. Using 4.0 here, with a 2.4.4 default and a 2.5.0 straight from the package: [...] I can imagine that some of the Python

Using Python Modules from JAVA

2008-07-28 Thread raymi
Hi all, I'd like to use the pygments syntax highlighting module from within a JAVA application. While I understand how to use Jython to execute a script file or interpret single statements, I don't know how I can use a whole module (i.e. the several files pygments consists of). In order to deploy

Re: Encoding for Devanagari Script.

2008-07-28 Thread Tim Golden
Atul. wrote: Hi Fredrik and Terry, Well I got this on IDLE I think I have done something wrong. import codecs f = open(C:\Documents and Settings\admin\My Documents\corpus\dainaikAikya collected by sushant.txt,r, utf_8) Traceback (most recent call last): File pyshell#1, line 1, in module

Re: multiple inheritance and __getattr__

2008-07-28 Thread David C. Ullrich
In article [EMAIL PROTECTED], Enrico [EMAIL PROTECTED] wrote: Hi there, I have the following situation (I tryed to minimize the code to concentrate on the issue): class A(object): def __getattr__(self, name): print 'A.__getattr__' if name == 'a': return 1 raise

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Alan Franzoni
Scott David Daniels was kind enough to say: Alan Franzoni wrote: Please don't pass this misinformation along. In the struct module document, see the section on the initial character: Character Byte order Size and alignment @ nativenative =

Suggestions for creating a PDF table

2008-07-28 Thread Kirk Strauser
Short question: Is there a good library for generating HTML-style tables with the equivalent of colspans, automatically sized columns, etc. that can render directly to PDF? Longer question: I'm re-doing a big chunk of locally-written code. I have a report-generating function that takes a list

Re: SOAPpy WSDL problem: namespace of schema and import match error

2008-07-28 Thread Christof Winter
Christof Winter wrote, On 28.07.2008 12:32: I am trying to use a webservice with SOAPpy: import SOAPpy intact_wsdl = http://www.ebi.ac.uk/intact/binary-search-ws/binarysearch?wsdl; intact_serv = SOAPpy.WSDL.Proxy(intact_wsdl) [...] My question: - Is there a problem with the WSDL file being

Re: with statement for two files

2008-07-28 Thread Paul Rubin
braver [EMAIL PROTECTED] writes: with open(src) as readin, open(dst,w) as writin: # WRONG: comma doesn't work ... -- so that you have transactional safety for two file descriptors? use contextlib.nexted(). -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding for Devanagari Script.

2008-07-28 Thread Atul.
Thanks, Tim that did work. I will proceed with my playing around now. Thanks a ton. Atul. Only slightly. You're importing the codecs module but you're not using it. So you're *actually* using the built-in open function, which doesn't have an encoding parameter. It does have a third param

Re: How to figure out if the platform is 32bit or 64bit?

2008-07-28 Thread Trent Mick
Manuel Vazquez Acosta wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Just test for maxint value: from sys import maxint if maxint 33: print more than 32 bits # probably 64 else: print 32 bits I believe that was already suggested in this thread. That test will just

Re: ActiveState Code (the new Python Cookbook) has been launched

2008-07-28 Thread Trent Mick
Nick Craig-Wood wrote: Trent Mick [EMAIL PROTECTED] wrote: I happy to announce that ActiveState Code has been taken out of beta. This is the new site replacing the ASPN Cookbooks -- in particular the Python Cookbook. http://code.activestate.com/ Looks great and much faster than the

Re: with statement for two files

2008-07-28 Thread Diez B. Roggisch
Paul Rubin wrote: braver [EMAIL PROTECTED] writes: with open(src) as readin, open(dst,w) as writin: # WRONG: comma doesn't work ... -- so that you have transactional safety for two file descriptors? use contextlib.nexted(). You mean contextlib.nested I guess. Didn't know about that

Re: Attack a sacred Python Cow

2008-07-28 Thread Kay Schluehr
On 28 Jul., 06:42, Russ P. [EMAIL PROTECTED] wrote: On Jul 27, 8:58 pm, castironpi [EMAIL PROTECTED] wrote: On Jul 27, 2:39 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Derek Martin a écrit : It's bad programming, but the world is full of bad programmers, and we don't always

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Grant Edwards
On 2008-07-28, Alan Franzoni [EMAIL PROTECTED] wrote: Scott David Daniels was kind enough to say: Alan Franzoni wrote: Please don't pass this misinformation along. In the struct module document, see the section on the initial character: Character Byte order Size and alignment

Re: Suggestions for creating a PDF table

2008-07-28 Thread Larry Bates
Kirk Strauser wrote: Short question: Is there a good library for generating HTML-style tables with the equivalent of colspans, automatically sized columns, etc. that can render directly to PDF? Longer question: I'm re-doing a big chunk of locally-written code. I have a report-generating

python lists and newline character

2008-07-28 Thread Support Desk
Hello all, I am using os.popen to get a list returned of vpopmail users, something like this x = os.popen('/home/vpopmail/bin/vuserinfo -n -D mydomain.com).readlines() x returns a list, of usernames, and I am trying to append the usernames with the domain like so for line

Re: binding names doesn't affect the bound objects (was: print doesn't respect file inheritance?)

2008-07-28 Thread bukzor
On Jul 26, 7:08 am, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: On Sat, 26 Jul 2008 14:07:52 +1000 Ben Finney [EMAIL PROTECTED] wrote:     sys.stdout = n Re-binds the name 'sys.stdout' to the object already referenced by the name 'n'. No objects are changed by this; only bindings of names

Re: Easier way to get the here path?

2008-07-28 Thread bukzor
On Jul 26, 9:19 am, Andrew [EMAIL PROTECTED] wrote: bukzor wrote: from os.path import abspath, realpath realpath(path.__file__.rstrip(c)) '/home/bgolemon/python/symlinks/path.py' realpath(abspath(path.__file__.rstrip(c))) '/home/bgolemon/python/symlinks/symlinks/path.py' --

Re: python lists and newline character

2008-07-28 Thread Stephen Johnson
domain.strip() Assuming domain is the string with the newline. -Steve Johnson On Jul 28, 2008, at 1:32 PM, Support Desk wrote: Hello all, I am using os.popen to get a list returned of vpopmail users, something like this x = os.popen('/home/vpopmail/bin/vuserinfo -n -D

Re: python lists and newline character

2008-07-28 Thread Gary Herron
Support Desk wrote: Hello all, I am using os.popen to get a list returned of vpopmail users, something like this x = os.popen('/home/vpopmail/bin/vuserinfo -n -D mydomain.com).readlines() x returns a list, of usernames, and I am trying to append the usernames with the

Re: ActiveState Code (the new Python Cookbook) has been launched

2008-07-28 Thread Kay Schluehr
On 28 Jul., 18:55, Trent Mick [EMAIL PROTECTED] wrote: Nick Craig-Wood wrote: Trent Mick [EMAIL PROTECTED] wrote: I happy to announce that ActiveState Code has been taken out of beta. This is the new site replacing the ASPN Cookbooks -- in particular the Python Cookbook.

Re: like py2exe, but on a mac

2008-07-28 Thread Tommy Nordgren
On 28 jul 2008, at 03.59, William McBrine wrote: On Sun, 13 Jul 2008 00:58:59 +0200, Python.Arno wrote: http://undefined.org/python/py2app.html py2app bundles Python itself into the app, right? I wonder, is there no way to create an app bundle that relies on the existing installation

Re: Module clarification

2008-07-28 Thread Marcus.CM
Hi Hussein, Basically a module is a FILE and is considered as a singleton model. Yes ur wow.py assumption is correct. I recommend getting Mark Lutz Learning Python book to get you started. Marcus.CM Hussein B wrote: Hi. I'm a Java guy and I'm playing around Python these days... In Java, we

Re: We programming

2008-07-28 Thread Marcus.CM
Hi , I hope this doesnt invite flames.but for webpages i suggest stick with php... I'm outta here.wooosh srinivasan srinivas wrote: Hi, Could someone suggest me better python modules for developing web programming related projects like web-pages download and uopload?? Thanks,

Re: Easier way to get the here path?

2008-07-28 Thread bukzor
On Jul 28, 10:34 am, bukzor [EMAIL PROTECTED] wrote: On Jul 26, 9:19 am, Andrew [EMAIL PROTECTED] wrote: bukzor wrote: from os.path import abspath, realpath realpath(path.__file__.rstrip(c)) '/home/bgolemon/python/symlinks/path.py' realpath(abspath(path.__file__.rstrip(c)))

Re: Module clarification

2008-07-28 Thread Themis Bourdenas
I would recommend dive into python. Its available free online (just google it) and it tries to teach you python, not programming which unfortunately many books try to do. It assumes that you already have some experience with C++ or Java and contradicts python syntax/semantics to those languages.

Re: We programming

2008-07-28 Thread D'Arcy J.M. Cain
On Tue, 29 Jul 2008 02:00:54 +0800 Marcus.CM [EMAIL PROTECTED] wrote: I hope this doesnt invite flames.but for webpages i suggest stick with php... Oh, come on. You're just asking for it. :-) [Turns flame thrower to low setting] OK, here is why I don't like PHP. When I am creating

Re: Attack a sacred Python Cow

2008-07-28 Thread castironpi
On Jul 28, 2:26 am, Nikolaus Rath [EMAIL PROTECTED] wrote: castironpi [EMAIL PROTECTED] writes: I think you misunderstood him. What he wants is to write class foo:    def bar(arg):        self.whatever = arg + 1 instead of class foo:    def bar(self, arg)        self.whatever =

Re: like py2exe, but on a mac

2008-07-28 Thread William McBrine
On Mon, 28 Jul 2008 19:51:26 +0200, Tommy Nordgren wrote: There is Platypus, a general open source program to wrap a script in an Macintosh (GUI) Application. Thanks. I tried Platypus, and it's close to what I want. But I still can't seem to get rid of the small Console window that pops up

Re: QOTW [was Re: Attack a sacred Python Cow]

2008-07-28 Thread castironpi
On Jul 28, 9:07 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Sun, 27 Jul 2008 21:42:37 -0700, Russ P. wrote: +1 QOTW Do you realize what an insult that is to everyone else who has posted here in the past week? Actually I don't. I hadn't realised that when a person

  1   2   3   >