Re: Why date do not construct from date?

2009-06-02 Thread Gabriel Genellina
En Tue, 02 Jun 2009 03:14:22 -0300, Chris Rebert escribió: On Mon, Jun 1, 2009 at 10:25 PM, Alexandr N Zamaraev wrote: import datetime as dt d = dt.date(2009, 10, 15) dt.date(d) Traceback (most recent call last):  File "", line 1, in TypeError: function takes exactly 3 arguments (1 giv

Re: Why date do not construct from date?

2009-06-02 Thread Peter Otten
Gabriel Genellina wrote: > If one can say float(3.0), str("hello"), etc -- what's so wrong with > date(another_date)? You can do x = float(x) when you don't know whether x is a float, int, or str. Not terribly useful, but sometimes convenient because making the float() call idempotent allows

python 2.6 packages in python 3.0

2009-06-02 Thread ssd
Hi, I usually works with packages like pyserial, numpy, mathplotlib,pyUSB, etc.. When is planned that these packages are supported in Python 3.0? Seen this i would say that is not recommendable to use Python 3.0 at the moment? most of 2.6 packages are not available, not working in python 3.0.

Re: python 2.6 packages in python 3.0

2009-06-02 Thread Chris Rebert
On Tue, Jun 2, 2009 at 12:51 AM, ssd wrote: > Hi, > > I usually works with packages like pyserial, numpy, mathplotlib,pyUSB, etc.. > > When is planned that these packages are supported in Python 3.0? That would depend on the individual packages and their maintainers. Check their respective websit

[no subject]

2009-06-02 Thread Kiran Siddiqui
hi have to parse a very complex dumps(whatever it is), i have done the parsing thruogh python.since the parsed data is very huge in amount, i have to feed it in the database (SQL), I have also done this... now the thing is i have to compare the data now present in the sql. in actual i have to

what is the biggest number that i can send to Wave_write.writeframes(data)

2009-06-02 Thread '2+
would like to take advantage of the wave module found a good example here: http://www.python-forum.org/pythonforum/viewtopic.php?f=2&t=10644 hmm .. i don't get how to write a stereo .. i mean i can set nchannels .. but how do i actually take control of each ch individually? and what's the range(in

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

2009-06-02 Thread Richard Brodie
"Visco Shaun" wrote in message news:mailman.966.1243852864.8015.python-l...@python.org... > 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): You've probably assigned to type somewhere in your code. What

Re: Ah, ctypes

2009-06-02 Thread Lawrence D'Oliveiro
In message , Nick Craig- Wood wrote: > As a ctypes user I found this an interesting story - thanks for > posting it! By the way, I hate wildcard imports. In the ctypes docs, they recommend you do this from ctypes import * but I prefer this: import ctypes as ct which explains the "ct.

Re:

2009-06-02 Thread Teguh Iskanto
how about this : - dump those data with sort enabled - use diff to those two dumps , eg: diff dump_a dump_b if you don't know what diff is , try : man diff HTH On Tue, Jun 2, 2009 at 2:50 AM, Kiran Siddiqui wrote: > hi have to parse a very complex dumps(whatever it is), i have done the > par

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

2009-06-02 Thread Vlastimil Brom
2009/6/2 Stef Mientki : ... > and the files generated by Py2Exe, don't work at all. > > Through this discussion, I discovered another problem, > because __file__ isn't the current file, > I can't run 1 module(file) from another module (file) . > > -- > http://mail.python.org/mailman/listinfo/python

Seach for encrypted socket wrapper

2009-06-02 Thread Hans Müller
Hello experts, I'm looking for secure way to pass messages from a python program to a c-library in both ways. This scenario is given: display client Calculation module in COBOL (yes, big, old but it works well) (python, wxpython) <- Network connec

Re: python 2.6 packages in python 3.0

2009-06-02 Thread Terry Reedy
Chris Rebert wrote: On Tue, Jun 2, 2009 at 12:51 AM, ssd wrote: Hi, I usually works with packages like pyserial, numpy, mathplotlib,pyUSB, etc.. When is planned that these packages are supported in Python 3.0? That would depend on the individual packages and their maintainers. Check their r

Re: Challenge supporting custom deepcopy with inheritance

2009-06-02 Thread Lie Ryan
Gabriel Genellina wrote: > 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 reimplementi

Re: Is there any module for sea tides?

2009-06-02 Thread Roy Smith
In article , alex23 wrote: > "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 conta

Re: Why date do not construct from date?

2009-06-02 Thread Lie Ryan
Gabriel Genellina wrote: > En Tue, 02 Jun 2009 03:14:22 -0300, Chris Rebert > escribió: > >> On Mon, Jun 1, 2009 at 10:25 PM, Alexandr N Zamaraev >> wrote: > >> import datetime as dt >> d = dt.date(2009, 10, 15) >> dt.date(d) >>> Traceback (most recent call last): >>> File "", line

do replacement evenly

2009-06-02 Thread oyster
I have some strings, and I want to write them into a text files, one string one line but there is a requirement: every line has a max length of a certain number(for example, 10), so I have to replace extra SPACE*3 with SPACE*2, at the same time, I want to make the string looks good, so, for "I am12

Re: Why date do not construct from date?

2009-06-02 Thread Lie Ryan
Lie Ryan wrote: > Gabriel Genellina wrote: >> En Tue, 02 Jun 2009 03:14:22 -0300, Chris Rebert >> escribió: >> >>> On Mon, Jun 1, 2009 at 10:25 PM, Alexandr N Zamaraev >>> wrote: >>> import datetime as dt >>> d = dt.date(2009, 10, 15) >>> dt.date(d) Traceback (most recent call la

Re: do replacement evenly

2009-06-02 Thread Iain King
On Jun 2, 12:10 pm, oyster wrote: > I have some strings, and I want to write them into a text files, one > string one line > but there is a requirement: every line has a max length of a certain > number(for example, 10), so I have to replace extra SPACE*3 with > SPACE*2, at the same time, I want t

Re: What text editor is everyone using for Python

2009-06-02 Thread Christopher
On May 25, 1:35 pm, LittleGrasshopper wrote: > With so many choices, I was wondering what editor is the one you > prefer when coding Python, and why. I normally use vi, and just got > into Python, so I am looking for suitable syntax files for it, and > extra utilities. I dabbled with emacs at some

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

2009-06-02 Thread John Center
Hi Martin, I was able to compile ctypes with gcc4sparc without many changes to the CFLAGS, etc. I had another weird error, but upgrading to the latest gcc4sparc fixed it. One thing I'm not clear about is how extensions are built. I noticed that my CFLAGS are not being passed to gcc when buildin

Re: do replacement evenly

2009-06-02 Thread Mike Kazantsev
On Tue, 2 Jun 2009 19:10:18 +0800 oyster wrote: > I have some strings, and I want to write them into a text files, one > string one line > but there is a requirement: every line has a max length of a certain > number(for example, 10), so I have to replace extra SPACE*3 with > SPACE*2, at the same

Re: do replacement evenly

2009-06-02 Thread oyster
here is what I get [code] import re reSplitObj=re.compile('([ \t]*)|([^ \t]*)') def evenReplace(aStr, length): aStr=aStr.rstrip() tmp=reSplitObj.split(aStr) tmp=[i for i in tmp if i not in ['', None]] lenStr=[[0, len(i)][i.strip()!=''] for i in tmp] lenSpc=[[0, len(i)][i.strip()

Re: Challenge supporting custom deepcopy with inheritance

2009-06-02 Thread Scott David Daniels
Michael H. Goldwasser wrote: On Monday June 1, 2009, Scott David Daniels wrote: Michael H. Goldwasser wrote: > I'll accept the "small price for flexibility" that you > note, if necessary. However, I still desire a cleaner solution. You seem to think that "deepcopy" is

pyPgSql there is already a transaction in progres

2009-06-02 Thread someone
Hi, I'm using pyPgSQL for accessing Postgres and do some update and select queries. and getting WARNING: there is already a transaction in progress if I run runUpdate more than once. So, what happens is following: 1. SELECT address FROM address WHERE LOWER(address) = LOWER(%s); -- __existRecord 2

Re: Seach for encrypted socket wrapper

2009-06-02 Thread garabik-news-2005-05
Hans Müller wrote: > Hello experts, > > I'm looking for secure way to pass messages from a python program to a > c-library in both ways. > > This scenario is given: > > display client Calculation module in > COBOL (yes, big, old but it works well) > (p

Re: do replacement evenly

2009-06-02 Thread Scott David Daniels
oyster wrote: I have some strings, and I want to write them into a text files, one string one line but there is a requirement: every line has a max length of a certain number ... If you are doing this to fill and justify text, I seem to remember a research result stating that filled text (with

Re: pyPgSql there is already a transaction in progres

2009-06-02 Thread Paul Boddie
On 2 Jun, 15:32, someone wrote: > Hi, > I'm using pyPgSQL for accessing Postgres and do some update and select > queries. > and getting WARNING:  there is already a transaction in progress if I > run runUpdate more than once. I think this is because you're using explicit transaction statements am

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

2009-06-02 Thread rustom
> But since i like to do it The Right Way, I would > like to let the python-mode worry about this... > > Sorry if this is just a bunch of obvious thoughts to most of you. > > Regards, > Giovanni I dont see whats the problem. Heres my attempt to show you my emacs windows using python-mode (python.e

Re: do replacement evenly

2009-06-02 Thread python
Here's how we normalize whitespace in multiline blocks of text. Perhaps you can adapt this routine to your needs? Watch for line wrap. # clean up duplicate whitespace, leading/trailing whitespace, triple CRLF's def fixwhitespace( text ): output = [] lastLine = '' #

Re: pyPgSql there is already a transaction in progres

2009-06-02 Thread Tep
On Jun 2, 3:58 pm, Paul Boddie wrote: > On 2 Jun, 15:32, someone wrote: > > > Hi, > > I'm using pyPgSQL for accessing Postgres and do some update and select > > queries. > > and getting WARNING:  there is already a transaction in progress if I > > run runUpdate more than once. > > I think this is

Re: Seach for encrypted socket wrapper

2009-06-02 Thread bobicanprogram
On Jun 2, 5:28 am, Hans Müller wrote: > Hello experts, > > I'm looking for secure way to pass messages from a python program to a > c-library in both ways. > > This scenario is given: > > display client Calculation module in > COBOL (yes, big, old but it

Re: hash and __eq__

2009-06-02 Thread Aahz
In article <003e1491$0$9723$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: >On Sun, 31 May 2009 07:24:09 +0100, Arnaud Delobelle wrote: >> >> AFAIK, 'complexity' means 'worst case complexity' unless otherwise >> stated. > >No, it means "average or typical case" unless otherwise specified. >C

Re: pyPgSql there is already a transaction in progres

2009-06-02 Thread Paul Boddie
On 2 Jun, 16:49, Tep wrote: > On Jun 2, 3:58 pm, Paul Boddie wrote: > > Really, you should use the commit method on the cursor object > > You mean connection object, do you? Yes, I meant the connection object. :-) > I've tried that, but forgotten to remove BEGIN;COMMIT; statements from > my que

Re: Creating a Google Code project for GSoC

2009-06-02 Thread Robert Kern
On 2009-06-01 18:54, Eric Pruitt wrote: 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. Som

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

2009-06-02 Thread Stef Mientki
The same rule applies for your modules. As a general rule, NEVER say: execfile('mymodule.py') instead do: import mymodule mymodule.some_function() mymodule.another_function() (There are exceptions, but if you need to ask what they are, you're not ready to learn them! *wink*) hi Stev

Safe to import __builtin__ ?

2009-06-02 Thread mrstevegross
Is it generally safe to explicitly import __builtin__ in python? That is, my code reads like this: === foo.py === import __builtin__ ... print __builtin__.type('a') === EOF === It seems like it should be a safe import, but I just want to make sure. Thanks, --Steve -- http://mail.python.org/mail

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

2009-06-02 Thread Robert Kern
On 2009-06-02 14:24, Stef Mientki wrote: The same rule applies for your modules. As a general rule, NEVER say: execfile('mymodule.py') instead do: import mymodule mymodule.some_function() mymodule.another_function() (There are exceptions, but if you need to ask what they are, you're not re

Re: Safe to import __builtin__ ?

2009-06-02 Thread MRAB
mrstevegross wrote: Is it generally safe to explicitly import __builtin__ in python? That is, my code reads like this: === foo.py === import __builtin__ ... print __builtin__.type('a') === EOF === It seems like it should be a safe import, but I just want to make sure. Why do you want to impor

Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Joseph Garvin
So I was curious whether it's possible to use the ctypes module with C++ and if so how difficult it is. I figure in principal it's possible if ctypes knows about each compiler's name mangling scheme. So I searched for "ctypes c++" on Google. The third link will be "Using ctypes to Wrap C++ Librari

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Diez B. Roggisch
Joseph Garvin schrieb: So I was curious whether it's possible to use the ctypes module with C++ and if so how difficult it is. I figure in principal it's possible if ctypes knows about each compiler's name mangling scheme. So I searched for "ctypes c++" on Google. The third link will be "Using c

Re: Challenge supporting custom deepcopy with inheritance

2009-06-02 Thread Gabriel Genellina
En Tue, 02 Jun 2009 07:34:43 -0300, Lie Ryan escribió: Gabriel Genellina wrote: 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

Creating Mac OS X app

2009-06-02 Thread sh00le
Hi, This is my first post here, hope this is the right group, and sorry for my broken English. So, let's start. I have created small PyQt application Simple Task Timer (http://code.google.com/p/simpletasktimer/). Also I created windows binary distro with py2exe, and Linux packages (.rpm and .deb).

Re: Safe to import __builtin__ ?

2009-06-02 Thread mrstevegross
> Why do you want to import it? > > Seehttp://docs.python.org/library/__builtin__.html I'm using a weird python environment that overloads a few builtin functions. In order to run them, I need to explicitly invoke "__builtin__.foo()" to make sure I get the real builtin version, not the overloaded

Re: py2app and OpenGL, "No module named util" in ctypes

2009-06-02 Thread trhaynes
On May 28, 6:28 pm, Carl Banks wrote: > On May 28, 11:06 am, trhaynes wrote: > > > > > I'm trying to use py2app to package an OpenGL app, so first I tried to > > build the example here > > >http://svn.pythonmac.org/py2app/py2app/trunk/examples/PyOpenGL/ > > > and I get the error: > > > >  File >

Copying objects and multiple inheritance

2009-06-02 Thread Brian Allen Vanderburg II
What is the best way to copy an object that has multiple inheritance with the copy module. Particularly, some of the instances in the hierarchy use the __copy__ method to create a copy (because even for shallow copies they need some information updated a little differently), so how can I mak

Re: what is the biggest number that i can send to Wave_write.writeframes(data)

2009-06-02 Thread Rob Williscroft
'2+ wrote in news:mailman.1017.1243932401.8015.python-l...@python.org in comp.lang.python: > would like to take advantage of the wave module > found a good example here: > http://www.python-forum.org/pythonforum/viewtopic.php?f=2&t=10644 > > hmm .. i don't get how to write a stereo .. i mean i c

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Nick Craig-Wood
Diez B. Roggisch wrote: > Joseph Garvin schrieb: > > So I was curious whether it's possible to use the ctypes module with > > C++ and if so how difficult it is. I figure in principal it's possible > > if ctypes knows about each compiler's name mangling scheme. So I > > searched for "ctypes c++" o

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread A. Cavallo
Mmmm, not really a conspiracy but it is not that trivial In wrapping c++ you might find useful the commands nm with c++filt although they work under linux there is the same pair for every platform (under windows I remember there is objdump): they should only you need to wrap a c++ library.

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

2009-06-02 Thread Stef Mientki
Robert Kern wrote: On 2009-06-02 14:24, Stef Mientki wrote: The same rule applies for your modules. As a general rule, NEVER say: execfile('mymodule.py') instead do: import mymodule mymodule.some_function() mymodule.another_function() (There are exceptions, but if you need to ask what the

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Sebastian Wiesner
> Diez B. Roggisch wrote: >> Joseph Garvin schrieb: >> > So I was curious whether it's possible to use the ctypes module with >> > C++ and if so how difficult it is. I figure in principal it's possible >> > if ctypes knows about each compiler's name mangling scheme. So I >> > searched for "ctyp

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

2009-06-02 Thread Robert Kern
On 2009-06-02 18:00, Stef Mientki wrote: Robert Kern wrote: On 2009-06-02 14:24, Stef Mientki wrote: The same rule applies for your modules. As a general rule, NEVER say: execfile('mymodule.py') instead do: import mymodule mymodule.some_function() mymodule.another_function() (There are e

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Dave Angel
Joseph Garvin wrote: So I was curious whether it's possible to use the ctypes module with C++ and if so how difficult it is. I figure in principal it's possible if ctypes knows about each compiler's name mangling scheme. So I searched for "ctypes c++" on Google. The third link will be "Using cty

Re: "Exploding" (**myvariable) a dict with unicode keys

2009-06-02 Thread Samuel Wan
I started using python last week and ran into exceptions thrown when unicode dictionary keys are exploded into function arguments. In my case, decoded json dictionaries did not work as function arguments. There was a thread from Oct 2008 (http://www.gossamer-threads.com/lists/python/python/684379)

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Roy Smith
In article <78lit5f1mvib...@mid.uni-berlin.de>, "Diez B. Roggisch" wrote: > > More seriously -- how difficult is it to use ctypes instead of saying, > > boost::python, and why isn't this in a FAQ somewhere? ;) > > Because it's much more needed than name-mangling. Name mangling is > (amongst ot

is anyone using text to speech to read python documentation

2009-06-02 Thread eric_dex...@msn.com
I wrote a small pre-processor for python documentation and I am looking for advice on how to get the most natural sounding reading. I uploaded an example of a reading of lxml documentation as a podcast1 http://dexrow.blogspot.com/2009/06/python-voice-preprocessor.html. -- http://mail.pytho

Missing codecs in Python 3.0

2009-06-02 Thread samwyse
I have a Python 2.6 program (a code generator, actually) that tries several methods of compressing a string and chooses the most compact. It then writes out something like this: { encoding='bz2_codec', data = '...'} I'm having two problems converting this to Py3. First is the absence of the bz2

Re: Safe to import __builtin__ ?

2009-06-02 Thread Ben Finney
mrstevegross writes: > Is it generally safe to explicitly import __builtin__ in python? That > is, my code reads like this: > > === foo.py === > import __builtin__ > ... > print __builtin__.type('a') > === EOF === > > It seems like it should be a safe import, but I just want to make > sure. Ye

Re: how to find the last decorator of a chain

2009-06-02 Thread Aahz
In article , Gabriel wrote: > >I have something like this: > >@render(format="a") >@render(format="b") >@ >def view(format, data): > return data > >Each render will do something with 'data' if format match, and nothing >if not. > >But if there is no more renders to eval, the last one is the

Re: Missing codecs in Python 3.0

2009-06-02 Thread Chris Rebert
On Tue, Jun 2, 2009 at 7:15 PM, samwyse wrote: > I have a Python 2.6 program (a code generator, actually) that tries > several methods of compressing a string and chooses the most compact. > It then writes out something like this: >  { encoding='bz2_codec', data = '...'} > > I'm having two problem

Re: Challenge supporting custom deepcopy with inheritance

2009-06-02 Thread Aahz
In article , Michael H. Goldwasser wrote: > >Assume that class B inherits from class A, and that class A has >legitimately customized its deepcopy semantics (but in a way that is >not known to class B). If we want a deepcopy of B to be defined so >that relevant state inherited from A is copied a

Re: Missing codecs in Python 3.0

2009-06-02 Thread Carl Banks
On Jun 2, 7:35 pm, Chris Rebert wrote: > On Tue, Jun 2, 2009 at 7:15 PM, samwyse wrote: > > I have a Python 2.6 program (a code generator, actually) that tries > > several methods of compressing a string and chooses the most compact. > > It then writes out something like this: > >  { encoding='bz

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Lawrence D'Oliveiro
In message , Sebastian Wiesner wrote: > > >> That said I've used C++ with ctypes loads of times, but I always wrap >> the exported stuff in extern "C" { } blocks. > > No wonder, you have never actually used C++ with C types. An extern "C" > clause tells the compiler to generate C functions (mo

Re: Seach for encrypted socket wrapper

2009-06-02 Thread Lawrence D'Oliveiro
In message <4a24f0cc$0$3278$8e6e7...@newsreader.ewetel.de>, Hans Müller wrote: > display clientCalculation > module in COBOL (yes, big, old but it > works well) > (python, wxpython)<- Network connection ->C-Lib beeing called from > COBO

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Kay Schluehr
On 3 Jun., 05:51, Lawrence D'Oliveiro wrote: > In message , Sebastian Wiesner wrote: > > > > > >> That said I've used C++ with ctypes loads of times, but I always wrap > >> the exported stuff in extern "C" { } blocks. > > > No wonder, you have never actually used C++ with C types. An extern "C"

problem with sockets and transferring binary files

2009-06-02 Thread thebiggestbangtheory
Dear all, I am a python newbie. I am now progressing to writing a network app in python to learn more about it. I have a client and a server in python. The client sends a msg to the server asking it to tar a binary .dbxml file and then send it over to it. The steps are: from the 1. Clien

Re: Missing codecs in Python 3.0

2009-06-02 Thread Martin v. Löwis
samwyse wrote: > I have a Python 2.6 program (a code generator, actually) that tries > several methods of compressing a string and chooses the most compact. > It then writes out something like this: > { encoding='bz2_codec', data = '...'} > > I'm having two problems converting this to Py3. Firs

Re: problem with sockets and transferring binary files

2009-06-02 Thread Gabriel Genellina
En Wed, 03 Jun 2009 01:54:02 -0300, escribió: I am a python newbie. I am now progressing to writing a network app in python to learn more about it. [...] Surprisingly, the sha1 hash of the encrypted data before it is sent from server is different from the encrypted file data recei

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

2009-06-02 Thread Gabriel Genellina
En Tue, 02 Jun 2009 06:11:30 -0300, Vlastimil Brom escribió: [...] just in case the main problem would be the use of __file__ ... It seems, that the exe files generated from py2exe don't recognise this variable; sometimes I used code like try: __file__ except NameError: # py2exe __file

Re: Why date do not construct from date?

2009-06-02 Thread Gabriel Genellina
En Tue, 02 Jun 2009 08:07:32 -0300, Lie Ryan escribió: Gabriel Genellina wrote: En Tue, 02 Jun 2009 03:14:22 -0300, Chris Rebert escribió: On Mon, Jun 1, 2009 at 10:25 PM, Alexandr N Zamaraev wrote: import datetime as dt d = dt.date(2009, 10, 15) dt.date(d) Traceback (most recent call la

Re: problem with sockets and transferring binary files

2009-06-02 Thread thebiggestbangtheory
On Jun 2, 10:29 pm, "Gabriel Genellina" wrote: > En Wed, 03 Jun 2009 01:54:02 -0300,   > escribió: > > >            I am a python newbie. I am now progressing to writing a > > network app in python to learn more about it. [...] > > Surprisingly, the sha1 hash of the encrypted data before it is se

Re: Wrapping methods of built-in dict

2009-06-02 Thread shailesh
On May 21, 10:13 pm, George Sakkis wrote: > On May 21, 5:55 pm, shailesh wrote: > > > There doesn't seem to be a predicate returning method wrappers. Is > > there an alternate way to query an object for attributes that are of > > method wrappers? > > Sure:>>> MethodWrapper = type({}.__init__) > >

Python reimport

2009-06-02 Thread peteshinners
I've implemented a working reimport that, "does what you want". After a bit of testing with friends, I'm releasing version 1.0 tonight. http://code.google.com/p/reimport/ There's still work to do, but this already does a bit of fancy transmuting to push the reimport changes into the runtime. This

Re: Copying objects and multiple inheritance

2009-06-02 Thread Gabriel Genellina
En Tue, 02 Jun 2009 19:02:47 -0300, Brian Allen Vanderburg II escribió: What is the best way to copy an object that has multiple inheritance with the copy module. Particularly, some of the instances in the hierarchy ("...some of the classes in...", I presume?) use the __copy__ method t