Re: Proxy server?

2008-07-28 Thread Gary
Diez B. Roggisch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gary wrote: For what? A non-transparent proxy, for anonymity purposes only. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is the correct round() method? Use math.ceil

2008-07-28 Thread Maric Michaud
Le Monday 28 July 2008 02:35:08 Herman, vous avez écrit : Where is the correct round() method? Hello, I need a round function that _always_ rounds to the higher integer if the argument is equidistant between two integers. In Python 3.0, this is not the advertised behavior of the built-in

Re: how to upload files to google code filesection ?

2008-07-28 Thread Stef Mientki
Mike Driscoll wrote: 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,

Re: Attack a sacred Python Cow

2008-07-28 Thread Russ P.
On Jul 28, 4:23 am, Bruno Desthuilliers [EMAIL PROTECTED] wrote: 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

Re: Questions on 64 bit versions of Python

2008-07-28 Thread William McBrine
On Sun, 27 Jul 2008 20:31:07 +0200, Martin v. Löwis wrote: Originally, AMD called it x86-64, and later renamed it to AMD64. Intel originally implemented it under the name EM64T (for Extended Memory 64 Technology), and now calls the architecture Intel 64. I hadn't heard Intel 64 before. That's

Re: Attack a sacred Python Cow

2008-07-28 Thread Russ P.
On Jul 28, 2:52 am, alex23 [EMAIL PROTECTED] wrote: 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

Re: like py2exe, but on a mac

2008-07-28 Thread Tommy Nordgren
On 28 jul 2008, at 20.22, William McBrine wrote: 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

Re: like py2exe, but on a mac

2008-07-28 Thread Kevin Walzer
William McBrine wrote: 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

Re: SimpleJson is slow .... is there any C Compiled version ?

2008-07-28 Thread Joshua Kugler
sanket wrote: Hello All, I have created an API which fetches some data from the database. I am using simplejson to encode it and return it back. Now the problem is that, this API is being called for millions of times in a sequence. I ran a profiler and saw that most of the time is

Re: how to upload files to google code filesection ?

2008-07-28 Thread Mike Driscoll
Stef, Mike Driscoll wrote: 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

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

2008-07-28 Thread Russ P.
On Jul 28, 7: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

Re: how to upload files to google code filesection ?

2008-07-28 Thread Stef Mientki
Mike Driscoll wrote: Stef, Mike Driscoll wrote: 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

block/lambda

2008-07-28 Thread iu2
Hi, Playing with imitating lambdas and ruby blocks in Python, I came up with a very simple construct, for example: import compiler def dotimes(i, code): for i in range(i): exec code dotimes(5, ''' for j in range(i): print j, print ''', 'string', 'exec') This will print 0 0

Re: block/lambda

2008-07-28 Thread iu2
On Jul 28, 10:06 pm, iu2 [EMAIL PROTECTED] wrote: Hi, Playing with imitating lambdas and ruby blocks in Python, I came up with a very simple construct, for example: import compiler def dotimes(i, code):     for i in range(i):         exec code dotimes(5, ''' for j in range(i):        

xlrd: error open_workbook

2008-07-28 Thread Fabio Oikawa
Hello. I am trying to open an .xls (excel) file using xlrd, but an error message occurs when I open the workbook. I can open any other .xls file made by myself (either by MS Excel 2003 SP3 in Windows Vista or by OpenOffice 2.0 in Debian) using the *open_workbook*function: wb =

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

2008-07-28 Thread Carl Banks
On Jul 28, 10:00 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: 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

Is it allowed to use function results as default arguments ?

2008-07-28 Thread Stef Mientki
hello, I've a perfect working procedure, at least as far I've tested it it works perfect. But I was just experimenting with inspect, and saw that the default argument was not parsed correctly. So I wonder if this is allowed: def Get_Relative_Path ( target, base=os.curdir ) : ... As inspect

Re: multiple inheritance and __getattr__

2008-07-28 Thread Bruno Desthuilliers
Enrico a écrit : 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

Running python scripts in a VB program

2008-07-28 Thread Zach Hobesh
Does anyone have any clue on how to embed python scripts in a visual basic windows app? Additionally, does anybody else feel like Visual Basic is ridiculously confusing? Any help is appreciated. Thanks, -Zach -- http://mail.python.org/mailman/listinfo/python-list

Re: Protecting instance variables

2008-07-28 Thread Michael Mabin
What about __setattr__()? On Mon, Jul 28, 2008 at 5:23 AM, Nikolaus Rath [EMAIL PROTECTED] wrote: 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

Re: Protecting instance variables

2008-07-28 Thread Bruno Desthuilliers
Nikolaus Rath a écrit : 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

Re: Questions on 64 bit versions of Python

2008-07-28 Thread Martin v. Löwis
I hadn't heard Intel 64 before. That's a bit nervy, isn't it? Plus it seems to conflict with their own use of IA-64 (Intel Architecture 64) for the Itanium (vs. IA-32 for traditional x86). Indeed. Microsoft Installer has an architecture string for the MSI file; Intel64 there means Itanium

Re: Attack a sacred Python Cow

2008-07-28 Thread Bruno Desthuilliers
Russ P. a écrit : On Jul 28, 4:23 am, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Russ P. a écrit : (snip) A bonus is that it becomes clearer at the point of usage that .data is member data rather than a local variable. I totally disagree. The dot character is less obvious than the

Python-URL! - weekly Python news and links (Jul 28)

2008-07-28 Thread Gabriel Genellina
QOTW: Python's goals are to maximize opportunities for good programming, which is quite different. - Bruno Desthuilliers, contrasting Python with Java Load and initialize dynamic plugins from a directory:

seemingly simple list indexing problem

2008-07-28 Thread Ervan Ensis
My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58, 68]. I want to return the sorted indices of these items in the same order as the original list. So I should return [2, 0, 1] For a list that's already in

Re: Proxy server?

2008-07-28 Thread Diez B. Roggisch
Gary schrieb: Diez B. Roggisch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gary wrote: For what? A non-transparent proxy, for anonymity purposes only. You can't make any TCP/IP communication run through a proxy, unless it's transparent. HTTP (and maybe FTP, I personally

Re: seemingly simple list indexing problem

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 6:24 PM, Ervan Ensis [EMAIL PROTECTED] wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58, 68]. I want to return the sorted indices of these items in the same order as the

Re: Parsing VHDL with python, where to start.

2008-07-28 Thread Svenn Are Bjerkem
Hi again, when I get far enough to parse the VHDL (which is not currently the fact, but I have to look at the work coming up downstream) I will have to put it into an internal data structure and then write some classes to handle the MVC between whatever data I have and the PyQt4 widget that is

Re: Is it allowed to use function results as default arguments ?

2008-07-28 Thread Simon Forman
On Jul 28, 1:28 pm, Stef Mientki [EMAIL PROTECTED] wrote: hello, I've a perfect working procedure, at least as far I've tested it it works perfect. But I was just experimenting with inspect, and saw that the default argument was not parsed correctly. So I wonder if this is allowed: def

Re: seemingly simple list indexing problem

2008-07-28 Thread Gary Herron
Guilherme Polo wrote: On Mon, Jul 28, 2008 at 6:24 PM, Ervan Ensis [EMAIL PROTECTED] wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58, 68]. I want to return the sorted indices of these items in the

Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
Hi - experienced programmer but this is my first Python program. This URL will retrieve an excel spreadsheet containing (that day's) msci stock index returns.

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
On Mon, 2008-07-28 at 18:40 -0300, Guilherme Polo wrote: On Mon, Jul 28, 2008 at 6:24 PM, Ervan Ensis [EMAIL PROTECTED] wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58, 68]. I want to return the

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:00 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi - experienced programmer but this is my first Python program. This URL will retrieve an excel spreadsheet containing (that day's) msci stock index returns.

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58, 68]. I want to return the sorted indices of these items in the same order as the original list. So I

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
On Mon, 2008-07-28 at 15:00 -0700, Gary Herron wrote: Guilherme Polo wrote: On Mon, Jul 28, 2008 at 6:24 PM, Ervan Ensis [EMAIL PROTECTED] wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58,

Re: Download excel file from web?

2008-07-28 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: On Jul 28, 3:00 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi - experienced programmer but this is my first Python program. This URL will retrieve an excel spreadsheet containing (that day's) msci stock index returns.

Re: seemingly simple list indexing problem

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 7:00 PM, Gary Herron [EMAIL PROTECTED] wrote: Guilherme Polo wrote: On Mon, Jul 28, 2008 at 6:24 PM, Ervan Ensis [EMAIL PROTECTED] wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:29 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: On Jul 28, 3:00 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi - experienced programmer but this is my first Python program. This URL will retrieve an excel spreadsheet containing (that day's)

derivative in numpy

2008-07-28 Thread knielsen73
Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Cheers, Kim -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it allowed to use function results as default arguments ?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 5:28 PM, Stef Mientki [EMAIL PROTECTED] wrote: hello, I've a perfect working procedure, at least as far I've tested it it works perfect. But I was just experimenting with inspect, and saw that the default argument was not parsed correctly. So I wonder if this is

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:29 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: On Jul 28, 3:00 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi - experienced programmer but this is my first Python program.

Re: Download excel file from web?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:29 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: On Jul 28, 3:00 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]

ANN: PyCon UK Talks and Tutorials List Up

2008-07-28 Thread Fuzzyman
PyCon UK 2008 is the second PyCon event in the UK, and is being held on 12th to 14th September at the Birmingham Conservatoire. We have a bevy of national and international Python stars speaking as well as a host of members of the Python community. The conference starts with a day of tutorials

Re: derivative in numpy

2008-07-28 Thread Robert Kern
[EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. numpy.diff() handles the discrete difference. All you need to do

Re: derivative in numpy

2008-07-28 Thread Gary Herron
[EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Derivatives are a property of functions. Since numpy provides

Re: interpreter vs. compiled

2008-07-28 Thread Fuzzyman
On Jul 27, 6:02 am, castironpi [EMAIL PROTECTED] wrote: On Jul 24, 11:04 pm, Tim Roberts [EMAIL PROTECTED] wrote: castironpi [EMAIL PROTECTED] wrote: Compiling a program is different than running it.  A JIT compiler is a kind of compiler and it makes a compilation step.  I am saying

Re: Python Written in C?

2008-07-28 Thread VernM
On Jul 20, 3:50 pm, [EMAIL PROTECTED] wrote: I'm just learning about Python now and it sounds interesting. But I just read (on the Wiki page) that mainstream Python was written in C. That's what I was searching for: Python was written in what other language? See, my concern was something

Re: seemingly simple list indexing problem

2008-07-28 Thread iu2
On Jul 29, 12:10 am, John Krukoff [EMAIL PROTECTED] wrote: On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58, 68].  I want to return the sorted indices

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:52 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:29 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb:

Re: seemingly simple list indexing problem

2008-07-28 Thread Raymond Hettinger
[Ervan Ensis] I have a list like [108, 58, 68].  I want to return the sorted indices of these items in the same order as the original list.  So I should return [2, 0, 1] One solution is to think of the list indexes being sorted according the their corresponding values in the input array: s

Tkinter fullscreen with Mac OS X

2008-07-28 Thread C Martin
Is there a way to create a full screen app using Tkinter with Mac OS X?? On windows, this is relatively easy with overrideredirect(1). However, on the Mac, the top menu bar and dock are still displayed over the app. Is there a way to get rid of them? Thanks. --

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 4:04 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:52 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:29 pm,

Re: derivative in numpy

2008-07-28 Thread Ken Starks
[EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Cheers, Kim numpy and much more are wrapped together in 'sage'

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

2008-07-28 Thread Anders J. Munch
Steven D'Aprano wrote: 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 you don't even know a duck-type for x, you have no business invoking any

Re: Download excel file from web?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:52 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:29

Re: derivative in numpy

2008-07-28 Thread Robert Kern
Gary Herron wrote: [EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Derivatives are a property of functions.

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
On Mon, 2008-07-28 at 16:00 -0700, iu2 wrote: On Jul 29, 12:10 am, John Krukoff [EMAIL PROTECTED] wrote: On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like

Re: derivative in numpy

2008-07-28 Thread Ken Starks
Ken Starks wrote: [EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Cheers, Kim numpy and much more are wrapped

Re: Tkinter fullscreen with Mac OS X

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 8:10 PM, C Martin [EMAIL PROTECTED] wrote: Is there a way to create a full screen app using Tkinter with Mac OS X?? On windows, this is relatively easy with overrideredirect(1). However, on the Mac, the top menu bar and dock are still displayed over the app. Is there a

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 4:20 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:52 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:33

Python parsing iTunes XML/COM

2008-07-28 Thread william tanksley
I'm trying to convert the URLs contained in iTunes' XML file into a form comparable with the filenames returned by iTunes' COM interface. I'm writing a podcast sorter in Python; I'm using iTunes under Windows right now. iTunes' COM provides most of my data input and all of my mp3/aac editing

RE: Getting python 2.4 dll

2008-07-28 Thread Delaney, Timothy (Tim)
Guillermo wrote: 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. http://www.python.org/ which leads you to: http://www.python.org/download/ which leads you to: http://www.python.org/download/releases/2.4.5/

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

2008-07-28 Thread Steven D'Aprano
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote: On Jul 28, 10:00 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: 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

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

2008-07-28 Thread Steven D'Aprano
On Tue, 29 Jul 2008 01:19:00 +0200, Anders J. Munch wrote: Steven D'Aprano wrote: 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 you don't even

Re: seemingly simple list indexing problem

2008-07-28 Thread John Machin
Guilherme Polo wrote: It wasn't supposed to be the fastest solution, also, he didn't mention duplicated items. He didn't need to. He explicitly said list (which permits duplicates) and didn't mention a self-imposed uniqueness constraint. -- http://mail.python.org/mailman/listinfo/python-list

Re: like py2exe, but on a mac

2008-07-28 Thread William McBrine
On Mon, 28 Jul 2008 21:09:10 +0200, Tommy Nordgren wrote: Try setting the Output popup menu to 'None' That was the first thing I did. -- 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 -- pass it on -- http://mail.python.org/mailman/listinfo/python-list

Re: like py2exe, but on a mac

2008-07-28 Thread William McBrine
On Mon, 28 Jul 2008 15:18:43 -0400, Kevin Walzer wrote: Add this call to your Python script somewhere (modify as needed): try: self.tk.call('console', 'hide') except TclError: pass Ah, yes! Thanks. -- 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Re: Download excel file from web?

2008-07-28 Thread MRAB
On Jul 29, 12:41 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 4:20 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:52 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 5:39 pm, MRAB [EMAIL PROTECTED] wrote: On Jul 29, 12:41 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 4:20 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:52 pm, Guilherme

Re: Attack a sacred Python Cow

2008-07-28 Thread Ben Finney
Bruno Desthuilliers [EMAIL PROTECTED] writes: Boy, I don't know who you think you're talking to, but you're obviously out of luck here. I'm 41, married, our son is now a teenager, I have an happy social life, quite a lot of work, and no time to waste in the streets. And FWIW, name-calling

Re: Attack a sacred Python Cow

2008-07-28 Thread Bruno Desthuilliers
Derek Martin a écrit : On Sun, Jul 27, 2008 at 09:39:26PM +0200, Bruno Desthuilliers wrote: As for the latter part of #3, self (or some other variable) is required in the parameter list of object methods, It's actually the parameter list of the *function* that is used as the implementation of

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

2008-07-28 Thread Gary Josack
Trent Mick wrote: 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

Re: python lists and newline character

2008-07-28 Thread Gary Josack
Gary Herron wrote: 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

Re: Attack a sacred Python Cow

2008-07-28 Thread Bruno Desthuilliers
Nikolaus Rath a écrit : Michael Torrie [EMAIL PROTECTED] writes: (snip) In short, unlike what most of the implicit self advocates are saying, it's not just a simple change to the python parser to do this. It would require a change in the interpreter itself and how it deals with classes.

Re: seemingly simple list indexing problem

2008-07-28 Thread John Machin
On Jul 29, 8:10 am, John Krukoff [EMAIL PROTECTED] wrote: On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like [108, 58, 68]. I want to return the sorted indices

Re: Download excel file from web?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 9:39 PM, MRAB [EMAIL PROTECTED] wrote: On Jul 29, 12:41 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 4:20 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 3:52 pm,

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

2008-07-28 Thread Steven D'Aprano
On Tue, 29 Jul 2008 00:23:02 +, Steven D'Aprano wrote: Dude. Dude. Just... learn some Python before you embarrass yourself further. I'm sorry Anders, that was a needlessly harsh thing for me to say. I apologize for the unpleasant tone. Still, __nonzero__ is a fundamental part of

Re: Attack a sacred Python Cow

2008-07-28 Thread Russ P.
On Jul 28, 5:44 pm, Ben Finney [EMAIL PROTECTED] wrote: Bruno Desthuilliers [EMAIL PROTECTED] writes: Boy, I don't know who you think you're talking to, but you're obviously out of luck here. I'm 41, married, our son is now a teenager, I have an happy social life, quite a lot of work, and

Re: ctypes - unloading implicitly loaded dlls

2008-07-28 Thread pigmartian
Nick Craig-Wood wrote: You could try loading C explicitly with ctypes.LoadLibrary() before loading A, then you'll have a handle to unload it before you load B. I did think of that, but no luck. Guess the cdll doesn't look for a dll loaded already by python. I guess that does make sense.

Re: Attack a sacred Python Cow

2008-07-28 Thread Russ P.
On Jul 28, 12:08 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: It's a very simple idea that you insist on making complicated. As I said, I could write a pre-processor myself to implement it in less than a day. Preprocessor are not a solution. Sorry. I never said that a pre-processor

Re: Is it allowed to use function results as default arguments ?

2008-07-28 Thread Benjamin
On Jul 28, 3:28 pm, Stef Mientki [EMAIL PROTECTED] wrote: hello, I've a perfect working procedure, at least as far I've tested it it works perfect. But I was just experimenting with inspect, and saw that the default argument was not parsed correctly. So I wonder if this is allowed: def

Re: Attack a sacred Python Cow

2008-07-28 Thread Ben Finney
Ben Finney [EMAIL PROTECTED] writes: It has, at least, long ago bought him a place in my kill-file. Seeing your side of the conversation, I can only confirm that decision as correct. This should perhaps say seeing the parts of his communication that leak through by being quoted in others's

exec(code) not allowing import on top level?

2008-07-28 Thread Peter Teuben
if I define a simple string code, with the following contents: import math def foo(x): return math.sqrt(x) and i run it using exec(code) in python, math is not known. But when I recode the string as: def foo(x): import math return math.sqrt(x) it works fine. That seemed like an

Re: Attack a sacred Python Cow

2008-07-28 Thread alex23
On Jul 29, 4:46 am, Russ P. [EMAIL PROTECTED] wrote: As I said, I could write a pre-processor myself to implement it in less than a day. So WHY DON'T YOU WRITE IT ALREADY? If you're meeting so much resistance to your idea, why not scratch your own damn itch and just do it? Or doesn't that

Re: derivative in numpy

2008-07-28 Thread castironpi
On Jul 28, 5:34 pm, [EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Cheers,  Kim I presume you are taking

Re: block/lambda

2008-07-28 Thread castironpi
On Jul 28, 3:12 pm, iu2 [EMAIL PROTECTED] wrote: On Jul 28, 10:06 pm, iu2 [EMAIL PROTECTED] wrote: Hi, Playing with imitating lambdas and ruby blocks in Python, I came up with a very simple construct, for example: import compiler def dotimes(i, code):     for i in range(i):    

Dynamically adding methods to a class...

2008-07-28 Thread Piyush Anonymous
class MyObject: def __init__(self, name): self.name = name def do_this_default(self): print default do_this implementation for %s % self.name def custom_do_this(): #method to be added print custom do_this implementation for %s % self.name def

Re: exec(code) not allowing import on top level?

2008-07-28 Thread Gary Herron
Peter Teuben wrote: if I define a simple string code, with the following contents: import math def foo(x): return math.sqrt(x) What? You have not told us something important here. First, that code won't fail because it does not even execute the function foo -- it just defines it.

Re: exec(code) not allowing import on top level?

2008-07-28 Thread Gary Herron
Peter Teuben wrote: if I define a simple string code, with the following contents: import math def foo(x): return math.sqrt(x) What? You have not told us something important here. First, that code won't fail because it does not even execute the function foo -- it just defines it.

Re: interpreter vs. compiled

2008-07-28 Thread castironpi
On Jul 28, 5:58 pm, Fuzzyman [EMAIL PROTECTED] wrote: On Jul 27, 6:02 am, castironpi [EMAIL PROTECTED] wrote: On Jul 24, 11:04 pm, Tim Roberts [EMAIL PROTECTED] wrote: castironpi [EMAIL PROTECTED] wrote: Compiling a program is different than running it.  A JIT compiler is a kind

Re: Attack a sacred Python Cow

2008-07-28 Thread Russ P.
On Jul 28, 8:44 pm, alex23 [EMAIL PROTECTED] wrote: On Jul 29, 4:46 am, Russ P. [EMAIL PROTECTED] wrote: As I said, I could write a pre-processor myself to implement it in less than a day. So WHY DON'T YOU WRITE IT ALREADY? I'm working on something else right now if you don't mind, but

Re: Rant (was Re: x*x if x10

2008-07-28 Thread greg
Diez B. Roggisch wrote: I maybe should paraphrase don't return objects you passed as arguments from a function. The important thing is that a function shouldn't modify any object unless it's the express purpose of the function to do so. You could call this the look but don't touch rule. --

Re: with statement for two files

2008-07-28 Thread greg
Diez B. Roggisch wrote: Paul Rubin wrote: use contextlib.nexted(). You mean contextlib.nested I guess. Although nexted is an intriguing-sounding word. I wonder what it could mean? -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 6:05 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 9:39 PM, MRAB [EMAIL PROTECTED] wrote: On Jul 29, 12:41 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 4:20 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 6:05 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 9:39 PM, MRAB [EMAIL PROTECTED] wrote: On Jul 29, 12:41 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 28, 4:20 pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL

Re: Questions on 64 bit versions of Python (Thank-you!)

2008-07-28 Thread python
Dear List, Thanks for everyone's feedback - excellent detail - all my questions have been answered. BTW: Roel was correct that I got confused over the AMD and Intel naming conventions regarding the 64 bit versions of Python for Windows. (I missed that nuance that the Intel build refered to the

Re: block/lambda

2008-07-28 Thread John Nagle
iu2 wrote: Hi, Playing with imitating lambdas and ruby blocks in Python, I came up with a very simple construct, for example: import compiler Python supports nested functions. You don't have to use a lambda form just to get a local function. Just write an ordinary nested def within

[issue3456] compile python using MinGW

2008-07-28 Thread Xue Can
New submission from Xue Can [EMAIL PROTECTED]: I hope the official source release can add support for MinGW to compile python under Win32 platform. And layout built files like python in Unix-like paltforms. -- components: Build messages: 70338 nosy: xuecan severity: normal status: open

[issue3455] os.remove()method document error

2008-07-28 Thread 香槟酒
香槟酒 [EMAIL PROTECTED] added the comment: yes, i use this method,but actually the result don't agree with the Python's manual. my OS is windows xp and version is simplified chinese! 2008/7/28 Benjamin Peterson [EMAIL PROTECTED] Benjamin Peterson [EMAIL PROTECTED] added the comment: What do

[issue3455] os.remove()method document error

2008-07-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: There seems to be some misunderstanding. zkfarmer, you said: it deletes my file that in use without any exception. Can you explain this sentence? How is your file in use? -- nosy: +amaury.forgeotdarc

<    1   2   3   >