Re: Generating all combinations

2009-06-01 Thread pataphor
Mensanator wrote: I couldn't do that if they weren't subsets. Right. Sometimes one just has to assume things are different even if they look the same on the surface. That is because else one wouldn't be able to produce the other generators. I guess it would also work the other way around, a

Re: Why date do not construct from date?

2009-06-01 Thread Chris Rebert
On Mon, Jun 1, 2009 at 10:25 PM, Alexandr N Zamaraev wrote: > Simple example: > [code] > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] > on win32 import datetime as dt dt.date(2009, 10, 15) > datetime.date(2009, 10, 15) d = dt.date(2009, 10, 15) d

Re: Installing 3.1 questions

2009-06-01 Thread Martin v. Löwis
> Seems to work, but I'd like to know where Python installs its items. I'm > wanting to test version 3.1 and downloaded the 'Bzipped source tar ball' > file (not sure of the difference between it and the 'Gzipped' one). Do I > need to run some sort of 'install' command from the Terminal to get

Re: Generating all combinations

2009-06-01 Thread Mensanator
On Jun 1, 8:28 pm, Steven D'Aprano wrote: > On Mon, 01 Jun 2009 17:24:49 -0700, Mensanator wrote: > > On Jun 1, 6:40 pm, Steven D'Aprano > cybersource.com.au> wrote: > >> On Mon, 01 Jun 2009 11:23:35 -0700, Mensanator wrote: > >> > I believe the name you're looking for is > >> > combinations_with

Why date do not construct from date?

2009-06-01 Thread Alexandr N Zamaraev
Simple example: [code] Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 >>> import datetime as dt >>> dt.date(2009, 10, 15) datetime.date(2009, 10, 15) >>> d = dt.date(2009, 10, 15) >>> dt.date(d) Traceback (most recent call last): File "", line 1, in Type

Re: Absolute imports in Python 2.4

2009-06-01 Thread Gabriel Genellina
En Mon, 01 Jun 2009 21:40:26 -0300, Steven D'Aprano escribió: I have a package which includes a module which shadows a module in the standard library. For example: package +-- __init__.py +-- ham.py +-- spam.py +-- sys.py Inside that package, I want to import the standard library sys. In ot

re: Dabo 0.9.2 released

2009-06-01 Thread oyster
I have to say: please let dabo use english if it does not find any langauge resource! I have 'e:\prg\py\sap-24\python e:\prg\py\pure_pylib\_dabo\tools\remove_dLocalize.py .', but then the scripts says 'I don't know _" -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating all combinations

2009-06-01 Thread Mensanator
On Jun 1, 8:28�pm, Steven D'Aprano wrote: > On Mon, 01 Jun 2009 17:24:49 -0700, Mensanator wrote: > > On Jun 1, 6:40�pm, Steven D'Aprano > cybersource.com.au> wrote: > >> On Mon, 01 Jun 2009 11:23:35 -0700, Mensanator wrote: > >> > I believe the name you're looking for is > >> > combinations_with

Re: Challenge supporting custom deepcopy with inheritance

2009-06-01 Thread Gabriel Genellina
En Mon, 01 Jun 2009 14:19:19 -0300, Michael H. Goldwasser escribió: I can examine the inherited slots to see which special methods are there, and to implement my own __deepcopy__ accordingly. But to do so well seems to essentially require reimplementing the complicated logic of the co

Re: Installing 3.1 questions

2009-06-01 Thread Benjamin Kaplan
On Mon, Jun 1, 2009 at 10:15 PM, wrote: > Can anyone give me info on what and where Python installs on OS X? > I ran the installers for version 2.6 and 3.0 and only installed Python > (not IDLE, etc). I then added this to my .profile: > > PATH="/Library/Frameworks/Python.framework/Versions/3.0/b

Re: Is there any module for sea tides?

2009-06-01 Thread alex23
"alejandro" wrote: > I found some in C but could not find in Python The best I could find was a reference to some in-house code used by the US National Oceanoic & Atmospheric Association: http://tinyurl.com/mct9zz You might be able to contact the email address at the bottom and inquire ab

Re: Not going to let this drop ...

2009-06-01 Thread Tim Chase
If anyone who reads this email has anything to offer - time, money, equipment, whatever, I'd be *really* grateful to hear from them. I can put you in touch with people who know about things like the range of interface devices available for paraplegic and quadriplegic people. Ideally the program wo

Re: how to get the path of a module (myself) ?

2009-06-01 Thread Carl Banks
On Jun 1, 4:46 pm, Stef Mientki wrote: > MRAB wrote: > > Stef Mientki wrote: > >> hello, > > >> I've pictures stored in a path relative to my python source code. > >> To get a picture, I need to know what path I'm on in each python module. > >> I thought __file__ would do the job, > >> but apparen

Installing 3.1 questions

2009-06-01 Thread jyoung79
Can anyone give me info on what and where Python installs on OS X? I ran the installers for version 2.6 and 3.0 and only installed Python (not IDLE, etc). I then added this to my .profile: PATH="/Library/Frameworks/Python.framework/Versions/3.0/bin:${PATH}" PATH="/Library/Frameworks/Python.fra

Re: how to get the path of a module (myself) ?

2009-06-01 Thread Steven D'Aprano
On Tue, 02 Jun 2009 02:55:13 +0200, Stef Mientki wrote: >> What are you trying to do? Using execfile is probably not the right >> solution. >> >> > Maybe you're right, and it's not the best solution for my problem. I've > written a program, that contains many files, both python files and data > fi

Re: Generating all combinations

2009-06-01 Thread Steven D'Aprano
On Mon, 01 Jun 2009 17:24:49 -0700, Mensanator wrote: > On Jun 1, 6:40 pm, Steven D'Aprano cybersource.com.au> wrote: >> On Mon, 01 Jun 2009 11:23:35 -0700, Mensanator wrote: >> > I believe the name you're looking for is >> > combinations_with_replacement. It is one of the features being added >>

Re: how to get the path of a module (myself) ?

2009-06-01 Thread Stef Mientki
Steven D'Aprano wrote: On Tue, 02 Jun 2009 01:46:23 +0200, Stef Mientki wrote: MRAB wrote: Stef Mientki wrote: hello, I've pictures stored in a path relative to my python source code. To get a picture, I need to know what path I'm on in each python module. I thought __file__ w

Absolute imports in Python 2.4

2009-06-01 Thread Steven D'Aprano
I have a package which includes a module which shadows a module in the standard library. For example: package +-- __init__.py +-- ham.py +-- spam.py +-- sys.py Inside that package, I want to import the standard library sys. In other words, I want an absolute import. In Python 2.7, absolute impo

Re: Generating all combinations

2009-06-01 Thread Mensanator
On Jun 1, 6:40 pm, Steven D'Aprano wrote: > On Mon, 01 Jun 2009 11:23:35 -0700, Mensanator wrote: > > I believe the name you're looking for is combinations_with_replacement. > > It is one of the features being added to 3.1 which should give all the > > subsets of the Cartesian Product: > > > permu

Re: What text editor is everyone using for Python

2009-06-01 Thread MRAB
Emile van Sebille wrote: On 6/1/2009 4:57 PM Steven D'Aprano said... Having noted that the word "Quit" does appear, how do you then *actually* Quit? Apart from taunting the user, what is it that Ctrl-G is actually doing when it displays the word "Quit" in what seems to be some sort of status b

Re: how to get the path of a module (myself) ?

2009-06-01 Thread MRAB
Stef Mientki wrote: MRAB wrote: Stef Mientki wrote: hello, I've pictures stored in a path relative to my python source code. To get a picture, I need to know what path I'm on in each python module. I thought __file__ would do the job, but apparently I didn't read the documentation carefully en

Re: What text editor is everyone using for Python

2009-06-01 Thread Emile van Sebille
On 6/1/2009 4:57 PM Steven D'Aprano said... Having noted that the word "Quit" does appear, how do you then *actually* Quit? Apart from taunting the user, what is it that Ctrl-G is actually doing when it displays the word "Quit" in what seems to be some sort of status bar? Ahhh.. memories of d

Re: how to get the path of a module (myself) ?

2009-06-01 Thread Dave Angel
Stef Mientki wrote: MRAB wrote: Stef Mientki wrote: hello, I've pictures stored in a path relative to my python source code. To get a picture, I need to know what path I'm on in each python module. I thought __file__ would do the job, but apparently I didn't read the documentation carefully

Re: how to get the path of a module (myself) ?

2009-06-01 Thread Steven D'Aprano
On Tue, 02 Jun 2009 01:46:23 +0200, Stef Mientki wrote: > MRAB wrote: >> Stef Mientki wrote: >>> hello, >>> >>> I've pictures stored in a path relative to my python source code. To >>> get a picture, I need to know what path I'm on in each python module. >>> I thought __file__ would do the job, >>

Re: What text editor is everyone using for Python

2009-06-01 Thread Steven D'Aprano
On Tue, 02 Jun 2009 10:54:48 +1200, Lawrence D'Oliveiro wrote: > In message , Albert van der Horst wrote: > >> An indication of how one can see one is in emacs is also appreciated. > > How about, hit CTRL/G and see if the word "Quit" appears somewhere. Ah, one has to love user interfaces design

Creating a Google Code project for GSoC

2009-06-01 Thread Eric Pruitt
Hello everyone, I am a student working on GSoC 2009 for PSF. My proposal involves making changes to the subprocess module and subprocess.Popen. I wish to create a Google Code project to host my changes so that I can receive feedback from the community. Some of the code I have incorporated falls un

Re: how to get the path of a module (myself) ?

2009-06-01 Thread Stef Mientki
Thanks David, but David Lyon wrote: On Mon, 01 Jun 2009 23:28:16 +0200, Stef Mientki wrote: hello, I've pictures stored in a path relative to my python source code. To get a picture, I need to know what path I'm on in each python module. I thought __file__ would do the job, but appare

Re: how to get the path of a module (myself) ?

2009-06-01 Thread Stef Mientki
MRAB wrote: Stef Mientki wrote: hello, I've pictures stored in a path relative to my python source code. To get a picture, I need to know what path I'm on in each python module. I thought __file__ would do the job, but apparently I didn't read the documentation carefully enough, because file is

Re: Generating all combinations

2009-06-01 Thread Steven D'Aprano
On Mon, 01 Jun 2009 11:23:35 -0700, Mensanator wrote: > I believe the name you're looking for is combinations_with_replacement. > It is one of the features being added to 3.1 which should give all the > subsets of the Cartesian Product: > > permutations_with_replacement:product() > combinatio

Re: Python, Tkinter and popen problem

2009-06-01 Thread norseman
MRAB wrote: norseman wrote: Piet van Oostrum wrote: norseman (n) wrote: [snip] n> Some questions: n> 1) "...], stdout=PIPE).stdout n>^^ why the double use? It is not a double use. Popen(["z6.py"], stdout=PIPE) gives you a Popen object, not a file object

Re: screen scraping

2009-06-01 Thread David
ubuntu@gmail.com wrote: Hello, does anybody have a simple tutorial for screen scrapping? I want to extract IP addresses from particular web page, reading documentation for a couple of days and writing some really simple scripts, but cant get it to work. Did anybody see any manual explicittl

Re: Simple metaclass code failing

2009-06-01 Thread LittleGrasshopper
On Jun 1, 3:44 am, Piet van Oostrum wrote: > > Piet van Oostrum (I) wrote: > >I> But your class definition: > >I> class C3(C1, C2): > >I> says that C1 should be before C2. Conflict!! > >I> Change it to class C3(C2, C1): > > Of course the C1 is then superfluous. > > I wonder why you want this.

Re: Simple metaclass code failing

2009-06-01 Thread LittleGrasshopper
On Jun 1, 2:38 am, Piet van Oostrum wrote: > > LittleGrasshopper (L) wrote: > >L> On May 31, 3:59 pm, Carl Banks wrote: > >>> On May 31, 3:52 pm, LittleGrasshopper wrote: > > >>> > This is some simple code which I got from Guido's paper on the > >>> > unification of classes and types, which

Re: What text editor is everyone using for Python

2009-06-01 Thread Lawrence D'Oliveiro
In message , Albert van der Horst wrote: > An indication of how one can see one is in emacs is also appreciated. How about, hit CTRL/G and see if the word "Quit" appears somewhere. -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-06-01 Thread Lawrence D'Oliveiro
In message , Albert van der Horst wrote: > You can carry vim (or Edwin's editor for that matter) on a FAT > [USB] stick. > (As they say: "Speak softly, and carry a large stick.") I like that. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get the path of a module (myself) ?

2009-06-01 Thread MRAB
Stef Mientki wrote: hello, I've pictures stored in a path relative to my python source code. To get a picture, I need to know what path I'm on in each python module. I thought __file__ would do the job, but apparently I didn't read the documentation carefully enough, because file is the path to

Re: how to get the path of a module (myself) ?

2009-06-01 Thread David Lyon
On Mon, 01 Jun 2009 23:28:16 +0200, Stef Mientki wrote: > hello, > > I've pictures stored in a path relative to my python source code. > To get a picture, I need to know what path I'm on in each python module. > I thought __file__ would do the job, > but apparently I didn't read the documentation

Re: Ah, ctypes

2009-06-01 Thread Nick Craig-Wood
David Bolen wrote: > Nick Craig-Wood writes: > > > ctypes could potentially note that function types don't have enough > > references to them when passed in as arguments to C functions? It > > might slow it down microscopically but it would fix this problem. > > Except that ctypes can't know

how to get the path of a module (myself) ?

2009-06-01 Thread Stef Mientki
hello, I've pictures stored in a path relative to my python source code. To get a picture, I need to know what path I'm on in each python module. I thought __file__ would do the job, but apparently I didn't read the documentation carefully enough, because file is the path to the module that calle

Urllib2 proxy settings

2009-06-01 Thread K-Dawg
Hello, I am having trouble with an application running on a linux server. It keeps reverting to old proxy settings and messing up the web application. I have checked everything I can think of, and since the application is written in Python and uses urllib to call a web service (which is where th

RE: which database is suitable for small applications

2009-06-01 Thread Phil Runciman
Hi Lawrence, I appreciate your remarks. However database engines cache their table/views to support sequential accessing within a set. With a good accessing scheme and with enough cache memory you will have all your small tables in memory. So the simplest thing is let the DBMS do its thing. Th

Re: Parsing Data

2009-06-01 Thread babypython
Thanks a lot. That works for me. Chris Rebert-6 wrote: > > On Mon, Jun 1, 2009 at 11:45 AM, babypython <2myemailaddr...@gmail.com> > wrote: >> >> I am trying to parse through  this data for analysis. I am new to python >> and >> wondering what would be the quickest way to extract the data from

screen scraping

2009-06-01 Thread ubuntu . exe
Hello, does anybody have a simple tutorial for screen scrapping? I want to extract IP addresses from particular web page, reading documentation for a couple of days and writing some really simple scripts, but cant get it to work. Did anybody see any manual explicittly for screen scraping? Thanks

Re: PyQt4 + WebKit

2009-06-01 Thread David Boddie
On Monday 01 June 2009 16:16, dudekks...@gmail.com wrote: > On 31 Maj, 02:32, David Boddie wrote: >> So, you only want to handle certain links, and pass on to WebKit those >> which you can't handle? Is that correct? > > Yes, I want to handle external links (out of my host) and links > starting

Re: How can I install a newer version of python

2009-06-01 Thread Chris Rebert
On Mon, Jun 1, 2009 at 12:16 PM, nathan.charles.sum...@gmail.com wrote: > I am on MacOS 10.5. It has python 2.5.1 installed. > > How can I install a newer version of python (e.g. 3.1) without > breaking my current environment (I am not sure what programs/scripts > are using the python comes with M

How can I install a newer version of python

2009-06-01 Thread nathan.charles.sum...@gmail.com
I am on MacOS 10.5. It has python 2.5.1 installed. How can I install a newer version of python (e.g. 3.1) without breaking my current environment (I am not sure what programs/scripts are using the python comes with MacOS). I just want to use the newer version of python for my own project. I found

Re: Parsing Data

2009-06-01 Thread Chris Rebert
On Mon, Jun 1, 2009 at 11:45 AM, babypython <2myemailaddr...@gmail.com> wrote: > > I am trying to parse through  this data for analysis. I am new to python and > wondering what would be the quickest way to extract the data from this file. > The data files consists of comments (starting with ! and #

Re: Challenge supporting custom deepcopy with inheritance

2009-06-01 Thread Michael H . Goldwasser
On Monday June 1, 2009, Scott David Daniels wrote: >Michael H. Goldwasser wrote: >> Chris, >> >> Thanks for your well-written reply. Your analogy to the >> complexities of other special methods is well noted. I'll accept >> the "small price for flexibility" that

Re: Ah, ctypes

2009-06-01 Thread David Bolen
Nick Craig-Wood writes: > ctypes could potentially note that function types don't have enough > references to them when passed in as arguments to C functions? It > might slow it down microscopically but it would fix this problem. Except that ctypes can't know the lifetime needed for the callbac

Re: Not going to let this drop ...

2009-06-01 Thread Steve Holden
Leslie Hawthorn wrote: > > > On Sun, May 31, 2009 at 9:35 PM, Steve Holden > wrote: > > I don't know if Google are planning to run a Highly-Open Participation > event this year, but if they are then maybe we could establish a few > tasks for that. > > >

Re: Python, Tkinter and popen problem

2009-06-01 Thread MRAB
norseman wrote: Piet van Oostrum wrote: norseman (n) wrote: [snip] n> Some questions: n> 1) "...], stdout=PIPE).stdout n>^^ why the double use? It is not a double use. Popen(["z6.py"], stdout=PIPE) gives you a Popen object, not a file object. If you add

Parsing Data

2009-06-01 Thread babypython
I am trying to parse through this data for analysis. I am new to python and wondering what would be the quickest way to extract the data from this file. The data files consists of comments (starting with ! and #). Then, the data follows. All I want is the data in array ( I don't care about the co

Re: Not going to let this drop ...

2009-06-01 Thread Leslie Hawthorn
On Sun, May 31, 2009 at 9:35 PM, Steve Holden wrote: > I don't know if Google are planning to run a Highly-Open Participation > event this year, but if they are then maybe we could establish a few > tasks for that. > We are planning to do so in Q4 of this year, further details TBD. I'll make sur

Re: Python, Tkinter and popen problem

2009-06-01 Thread norseman
Piet van Oostrum wrote: norseman (n) wrote: n> Piet van Oostrum wrote: norseman (n) wrote: n> I have tried both and Popen2.popen2(). n> os.popen runs both way, contrary to docs. What do you mean `os.popen runs both way'? n> It reads from child while console writes directly to child -

Re: Generating all combinations

2009-06-01 Thread Mensanator
On Jun 1, 10:11 am, pataphor wrote: > Johannes Bauer wrote: > > Any help is appreciated! > > This is on the fringe of exploitation, but hey, maybe the code helps you > think about the algorithm. > > IMHO the following code is a glaring complaint about the injustice of > omission itertools inflicts

Re: Metaclass mystery

2009-06-01 Thread LittleGrasshopper
On Jun 1, 11:11 am, Michele Simionato wrote: > On Jun 1, 7:18 pm, LittleGrasshopper wrote: > > > I have to thank you for all the invaluable materials you have provided > > to the python community. The process that you followed must have been > > incredibly arduous. > > *Incredibly ardous* is an e

Re: Metaclass mystery

2009-06-01 Thread Michele Simionato
On Jun 1, 7:18 pm, LittleGrasshopper wrote: > I have to thank you for all the invaluable materials you have provided > to the python community. The process that you followed must have been > incredibly arduous. *Incredibly ardous* is an exaggeration, but in the case of the MRO I needed to do som

Re: Challenge supporting custom deepcopy with inheritance

2009-06-01 Thread Scott David Daniels
Michael H. Goldwasser wrote: Chris, Thanks for your well-written reply. Your analogy to the complexities of other special methods is well noted. I'll accept the "small price for flexibility" that you note, if necessary. However, I still desire a cleaner solution. You seem to think th

Re: Metaclass mystery

2009-06-01 Thread LittleGrasshopper
On Jun 1, 12:42 am, Michele Simionato wrote: > On May 31, 2:32 am, LittleGrasshopper wrote: > > > Seriously, metaclasses are making my brain hurt. How do people like > > Michele Simionato and David Mertz figure these things out? Does it all > > come to looking at the C source code for the CPython

Re: Challenge supporting custom deepcopy with inheritance

2009-06-01 Thread Michael H . Goldwasser
Chris, Thanks for your well-written reply. Your analogy to the complexities of other special methods is well noted. I'll accept the "small price for flexibility" that you note, if necessary. However, I still desire a cleaner solution. I can examine the inherited slots to see which sp

Re: Metaclass mystery

2009-06-01 Thread LittleGrasshopper
On Jun 1, 12:18 am, Lie Ryan wrote: > LittleGrasshopper wrote: > > On May 31, 2:03 pm, a...@pythoncraft.com (Aahz) wrote: > >> In article > >> , > > >> LittleGrasshopper   wrote: > On May 31, 12:19=A0am, Arnaud Delobelle wrote: > > [1]http://www.python.org/download/releases/2.2.3/descri

Re: BMP32 for linux

2009-06-01 Thread Scott David Daniels
(1) Please don't top post; it is not the norm here. Re-arrange and prune as I've done below. Djames Suhanko wrote: > wrote: >> Djames Suhanko wrote: >>> Hello, all! >>> ... the bmp32 module for linux? This module can to load bmp image >>> with alpha channel where is not supported others imag

Re: What text editor is everyone using for Python

2009-06-01 Thread Albert van der Horst
In article , Lawrence D'Oliveiro wrote: >In message , Lie Ryan wrote: > >> norseman wrote: >> >>> Suggestion: >>> Take a look at the top two most used OS you use and learn the default >>> (most often available) text editors that come with them. >> >> Which means Notepad on Windows? > >Or you coul

Re: What text editor is everyone using for Python

2009-06-01 Thread Albert van der Horst
In article , Roy Smith wrote: >In article , > Bar Shirtcliff wrote: > >> I can't say a thing about other editors, except that when some shell >> script perversely dumped me into vi a month ago, I felt as horrified >> as if some actually living bugs had crawled out of my own reflection >> on the

Re: BMP32 for linux

2009-06-01 Thread Djames Suhanko
Thank you for answer, Scott ! The python in my embbeded system have not support to others formats. :-( Then, I found a tip about bmp32 with alpha channel, but I don't have this module (bmp32) in Ubuntu. I'm using the cx_Freeze to compile my program, but when I put them in my embbeded system, the

Illegal seek with os.popen

2009-06-01 Thread pruebauno
Should I open a bug report for this? Python 2.5.1 (r251:54863, Sep 19 2007, 14:58:06) [C] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.popen('cat','w') >>> Python 3.1rc1 (r31rc1:73054, Jun 1 2009, 10:49:24) [C] on aix5 Type "help", "copyrig

Re: Problem building 64-bit python 2.6.2 on Solaris 10

2009-06-01 Thread Martin v. Löwis
> Ok, so it looks like the only option here is to use LD_LIBRARY_PATH. Not really: there is also crle, and LD_RUN_PATH. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess and win32security.ImpersonateLoggedOnUser

2009-06-01 Thread Martin P. Hellwig
Emin.shopper Martinian.shopper wrote: The source for subprocess just uses CreateProcess. Which means that, short of monkey-patching it, you're going to have to roll your own subprocess-like code (I think). Basically, you'll need to run CreateProcessAsUser or CreateProcessAsLogonW. They're both a

Re: BMP32 for linux

2009-06-01 Thread Scott David Daniels
Djames Suhanko wrote: Hello, all! Did you know the bmp32 module for linux? This module can to load bmp image with alpha channel where is not supported others images formats. Hmmm, why do you think PNG and TGA do not support alpha? --Scott David Daniels scott.dani...@acm.org -- http://mail.pytho

Re: Ah, ctypes

2009-06-01 Thread Nick Craig-Wood
Lawrence D'Oliveiro wrote: > I wrote some code months ago to output 1-bit-per-pixel PNG files from > Python, doing direct calls to libpng using ctypes, because PIL didn't give > me sufficient control over colour tables and pixel depths. > > I thought the code was working fine. I left it aside

Re: Building PIL under Cygwin & Python 2.5

2009-06-01 Thread Martin v. Löwis
> I think this is an issue that probably needs to be addressed by PIL > maintainers that fully understand the root of the problem (and it > should probably go in the PIL FAQ), but in the meantime does anyone > out there know how to get around this issue? Why do you need to use Cygwin Python? Rega

Re: Generating all combinations

2009-06-01 Thread pataphor
Johannes Bauer wrote: Any help is appreciated! This is on the fringe of exploitation, but hey, maybe the code helps you think about the algorithm. IMHO the following code is a glaring complaint about the injustice of omission itertools inflicts on the perfectly natural and obvious procedu

Re: what I would like python.el to do (and maybe it does)

2009-06-01 Thread J Kenneth King
Piet van Oostrum writes: >> J Kenneth King (JKK) wrote: > >>JKK> Well, that's the thing -- type a statement into a python interpreter and >>JKK> you just get a new prompt. > >>JKK> LISP has a REPL, so you get some sort of feedback printed. > > iPython also has a REPL, but only when you enter

Re: subprocess and win32security.ImpersonateLoggedOnUser

2009-06-01 Thread Emin.shopper Martinian.shopper
> The source for subprocess just uses CreateProcess. Which means that, > short of monkey-patching it, you're going to have to roll your own > subprocess-like code (I think). Basically, you'll need to run > CreateProcessAsUser or CreateProcessAsLogonW. They're both a bit > of a pig in terms of getti

Re: PyQt4 + WebKit

2009-06-01 Thread dudekksoft
On 31 Maj, 02:32, David Boddie wrote: > On Saturday 30 May 2009 17:39, dudekks...@gmail.com wrote: > > > I need to grab clicked links in QWebView. Everything is fine when I > > use linkClicked() signal. LinkDelegationPolicy is set to > > DelegateAllLinks and there is a problem. If some site has Ja

Re: subprocess and win32security.ImpersonateLoggedOnUser

2009-06-01 Thread Tim Golden
[slightly rearranged for top-to-bottom reading...] On Mon, Jun 1, 2009 at 9:38 AM, Tim Golden wrote: Emin.shopper Martinian.shopper wrote: Dear Experts, I am having some issues with the subprocess module and how it interacts with win32security.ImpersonateLoggedOnUser. Specifically, I use the

Re: subprocess and win32security.ImpersonateLoggedOnUser

2009-06-01 Thread Emin.shopper Martinian.shopper
Thanks. But how do I fix this so that the subprocess does inherit the impersonated stuff? On Mon, Jun 1, 2009 at 9:38 AM, Tim Golden wrote: > Emin.shopper Martinian.shopper wrote: >> >> Dear Experts, >> >> I am having some issues with the subprocess module and how it >> interacts with win32securi

Re: subprocess and win32security.ImpersonateLoggedOnUser

2009-06-01 Thread Tim Golden
Emin.shopper Martinian.shopper wrote: Dear Experts, I am having some issues with the subprocess module and how it interacts with win32security.ImpersonateLoggedOnUser. Specifically, I use the latter to change users but the new user does not seem to be properly inherited when I spawn further subp

Re: Class Methods help

2009-06-01 Thread Jean-Michel Pichavant
FYI, same without decorators, if you python version does not support it. class MyClass: def some_func(x): return x+2 some_func = staticmethod(some_func) JM bd satish wrote: Thanks to Tim Chase & Lie Ryan !! That was exactly what I was looking for !! It's time for me to now rea

Re: Problem building 64-bit python 2.6.2 on Solaris 10

2009-06-01 Thread John Center
On May 29, 7:13 pm, "Martin v. Löwis" wrote: > > Ah, too much text - I was confused by you reporting two issues in a > single email message. That has exhausted my capacity for quick message > scanning. > Sorry about that. I have a tendency to over document... > So this is a ctypes problem. You'l

Dabo 0.9.2 released

2009-06-01 Thread Ed Leafe
At long last, we are finally releasing Dabo 0.9.2. This fixes the errors that were found in 0.9.1; adds a brand-new Web Update implementation that should make keeping current much easier, as well as a whole bunch of improvements under the hood. You can grab the latest version at ht

subprocess and win32security.ImpersonateLoggedOnUser

2009-06-01 Thread Emin.shopper Martinian.shopper
Dear Experts, I am having some issues with the subprocess module and how it interacts with win32security.ImpersonateLoggedOnUser. Specifically, I use the latter to change users but the new user does not seem to be properly inherited when I spawn further subprocesses. I am doing something like

Re: "TypeError: 'int' object is not callable"

2009-06-01 Thread Rhodri James
On Mon, 01 Jun 2009 11:40:50 +0100, Visco Shaun wrote: when I was executing the below code I got "TypeError: 'int' object is not callable" exception. Why is it so? if type(c) == type(ERROR): c can be a string or an integer representing an error In the absence of the rest of your code this i

BMP32 for linux

2009-06-01 Thread Djames Suhanko
Hello, all! Did you know the bmp32 module for linux? This module can to load bmp image with alpha channel where is not supported others images formats. But I couldn't to found this module to install in my linux box. :-( do you have tips? Thanks ! -- Djames Suhanko LinuxUser 158.760 -- http://mail

Re: automated web with python?

2009-06-01 Thread P. Kaminski
OK, I found a solution -- Selenium, from http://selenium.org. I downloaded Selenium RC and this works fantastic! I'll get the job done by tomorrow ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: "TypeError: 'int' object is not callable"

2009-06-01 Thread Chris Rebert
On Mon, Jun 1, 2009 at 3:40 AM, Visco Shaun wrote: > when I was executing the below code I got "TypeError: 'int' object is > not callable" exception. Why is it so? > > if type(c) == type(ERROR): > > c can be a string or an integer representing an error Please also, now and in the future, provide

Re: Simple metaclass code failing

2009-06-01 Thread Piet van Oostrum
> Piet van Oostrum (I) wrote: >I> But your class definition: >I> class C3(C1, C2): >I> says that C1 should be before C2. Conflict!! >I> Change it to class C3(C2, C1): Of course the C1 is then superfluous. I wonder why you want this. What is the problem you want to solve? Apart from the m

Re: "TypeError: 'int' object is not callable"

2009-06-01 Thread Andre Engels
On Mon, Jun 1, 2009 at 12:40 PM, Visco Shaun wrote: > when I was executing the below code I got "TypeError: 'int' object is > not callable" exception. Why is it so? > > if type(c) == type(ERROR): > > c can be a string or an integer representing an error Could you please give a larger piece of cod

Not going to let this drop ...

2009-06-01 Thread Steve Holden
If you have a few minutes to read this message you might just be able to make a big difference to the lives of some very disadvantaged people. If you can't help, don't worry. Sorry for bothering you. There's a project that needs help. The chuzer project is moribund (the rest of this message explai

Ah, ctypes

2009-06-01 Thread Lawrence D'Oliveiro
I wrote some code months ago to output 1-bit-per-pixel PNG files from Python, doing direct calls to libpng using ctypes, because PIL didn't give me sufficient control over colour tables and pixel depths. I thought the code was working fine. I left it aside for some months, came back to it a week o

"TypeError: 'int' object is not callable"

2009-06-01 Thread Visco Shaun
when I was executing the below code I got "TypeError: 'int' object is not callable" exception. Why is it so? if type(c) == type(ERROR): c can be a string or an integer representing an error -- Thanks & Regards visco -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple metaclass code failing

2009-06-01 Thread Piet van Oostrum
> LittleGrasshopper (L) wrote: >L> On May 31, 3:59 pm, Carl Banks wrote: >>> On May 31, 3:52 pm, LittleGrasshopper wrote: >>> >>> >>> >>> > This is some simple code which I got from Guido's paper on the >>> > unification of classes and types, which Arnaud suggested to improve my >>> > kn

Re: NameError function not found

2009-06-01 Thread Jean-Michel Pichavant
Cameron Pulsford wrote: Hey everyone, I am extremely stumped on this. I have 2 functions.. def _determinant(m): return m[0][0] * m[1][1] - m[1][0] * m[0][1] def cofactor(self): """Returns the cofactor of a matrix.""" newmatrix = [] for i, minor in enumerate(self.minors()): ne

Re: what I would like python.el to do (and maybe it does)

2009-06-01 Thread Piet van Oostrum
> J Kenneth King (JKK) wrote: >JKK> Well, that's the thing -- type a statement into a python interpreter and >JKK> you just get a new prompt. >JKK> LISP has a REPL, so you get some sort of feedback printed. iPython also has a REPL, but only when you enter the Python code manually in the iPy

Re: [Tutor] Challenge supporting custom deepcopy with inheritance

2009-06-01 Thread Gabriel Genellina
En Mon, 01 Jun 2009 00:28:12 -0300, Michael H. Goldwasser escribió: Hi Kent, Thanks for your thoughts. For the original example code, you are correct that we could make it work by having B provide the one-arg constructor to match A's constructor signature. But I don't see this as a general s

Re: automated web with python?

2009-06-01 Thread Jeremiah Dodds
On Mon, Jun 1, 2009 at 8:26 AM, P. Kaminski wrote: > Ech... The problem is that mechanize doesn't support JavaScript, and > these web forms are full of various JS functions... Maybe someone > knows a way out of this? Doesn't have to be Python... > -- > http://mail.python.org/mailman/listinfo/pyth

Re: Metaclass mystery

2009-06-01 Thread Michele Simionato
On May 31, 2:32 am, LittleGrasshopper wrote: > Seriously, metaclasses are making my brain hurt. How do people like > Michele Simionato and David Mertz figure these things out? Does it all > come to looking at the C source code for the CPython interpreter? Actually I never looked at the C source

Re: automated web with python?

2009-06-01 Thread P. Kaminski
Ech... The problem is that mechanize doesn't support JavaScript, and these web forms are full of various JS functions... Maybe someone knows a way out of this? Doesn't have to be Python... -- http://mail.python.org/mailman/listinfo/python-list

Re: Metaclass mystery

2009-06-01 Thread Lie Ryan
LittleGrasshopper wrote: > On May 31, 2:03 pm, a...@pythoncraft.com (Aahz) wrote: >> In article >> , >> >> LittleGrasshopper wrote: On May 31, 12:19=A0am, Arnaud Delobelle wrote: > [1]http://www.python.org/download/releases/2.2.3/descrintro/ >>> I'm about 2/3 of the way through this pa