Andreas Löscher wrote:
import types
import marshal
def a(): pass
...
s=marshal.dumps(a.__code__)
f=types.FunctionType(marshal.loads(s), {})
f
What version of python do you have? If I try your code above I get :
>>> import type
Andreas Löscher wrote:
Am Mittwoch, den 14.04.2010, 11:33 +0200 schrieb Gabriel Rossetti:
Paul Rubin wrote:
Gabriel Rossetti writes:
I am trying to serialize a function, class, etc and transfer it
You mean the actual code? You have to use marshal rather than
Andreas Löscher wrote:
Am Mittwoch, den 14.04.2010, 11:33 +0200 schrieb Gabriel Rossetti:
Paul Rubin wrote:
Gabriel Rossetti writes:
I am trying to serialize a function, class, etc and transfer it
You mean the actual code? You have to use marshal rather than
Paul Rubin wrote:
Gabriel Rossetti writes:
I am trying to serialize a function, class, etc and transfer it
You mean the actual code? You have to use marshal rather than pickle,
the Python versions have to be the same at both ends, and you better
have some kind of authenticated
Hello everyone,
I am trying to serialize a function, class, etc and transfer it, have it
unserialized and used. The thing is that this code is not defined on the
receiving side and thus it does not work. I tried the following tests:
Terminal A:
>>> import pickle
>>> def test(): pass
...
>>>
kj wrote:
Subject line pretty much says it all: is there a book like "Effective
Java" for Python. I.e. a book that assumes that readers are
experienced programmers that already know the basics of the language,
and want to focus on more advanced programming issues?
~K
Effective Java is a g
n00m wrote:
Congrats!
Your choice -- to ban building of muslim mosques -- is the only choice
to save our civililazation.
This yellow plague (incl. Chinese etc) must be eliminated from our
Planet,
They are very cunning critters, they can play on strings of
compassion,
but its riffraffs. What do yo
Hello everyone,
I'm going nuts with some regex, could someone please show me what I'm
doing wrong?
I have an XMPP msg :
123
456
...
the node may be absent or empty (), the node
may be absent. I'd like to grab everything exept the
Hello everyone,
I am having problems with the platform module when being run from a
frozen program (py2exe). It imports it fine, but it gives me the
following error :
'module' object does not contain attribute 'platform' when I do this :
platform.platfom()
Does platform have a problem with
Dave Angel wrote:
Gabriel Rossetti wrote:
Hello
everyone,
I get this error on python 2.6.1 on mac os x 10.6 :
UnboundLocalError: local variable '_[1]' referenced before assignment
here's the code that raises this:
params = [ self.__formatData(paramProcFunc, query, p)
Hello,
I couldn't find SPA in poplib, does anyone know of an alternative
implementation?
Thanks,
Gabriel
--
Arimaz SA
Ingénieur en Informatique
Av. du 24 Janvier 11
Ateliers de la Ville de Renens, Atelier 5
1020 Renens, Switzerland
www.arimaz.com
www.mydeskfriend.com
Mob: +41-(0)79-539-0069
T
Hello everyone,
I get this error on python 2.6.1 on mac os x 10.6 :
UnboundLocalError: local variable '_[1]' referenced before assignment
here's the code that raises this:
params = [ self.__formatData(paramProcFunc, query, p) for p in params ]
what I don't get is that it worked on mac os x 10
Hello everyone, I get the following error with the shelve module (python
2.5.2) sometimes :
>>> s = shelve.open("save.dat", writeback=True)
>>> s
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.5/UserDict.py", line 167, in __repr__
return repr(dict(self.iterit
Hello everyone,
I'd like to ba able to import a package and have it's __init__
conditionally import a subpackage. Suppose that you have this structure :
mybase/
mybase/__init__.py
mybase/mypkg
mybase/mypkg/__init__.py
mybase/mypkg/module0.py
mybase/mypkg/type1
mybase/mypkg/type1/__init__.py
my
Hello everyone,
I am looking for a version of python 2.5.x compiled for windows in debug
mode, but I can't find this, does anyone have a link or have a version
that he/she can send me?
Thank you,
Gabriel
--
http://mail.python.org/mailman/listinfo/python-list
Hello everyone,
I found what was not working in my code (see Twisted mailing list topics
"self.socket.accept() in doRead() in tcp.py has (11, 'Resource
temporarily unavailable') error", "Twisted, PushProducer, Words & big
msgs, any limit?" and Python mailing list topic "socket.send : (11,
'Re
Gabriel Rossetti wrote:
Hello everyone,
I get a (11, 'Resource temporarily unavailable') error when I try to
send a file using a socket. Is there s size limit? I tried sending a
smaller file and ii poses no problem. Am I doing something wrong? Here
is the code:
def sendMessage(
Hello everyone,
I get a (11, 'Resource temporarily unavailable') error when I try to
send a file using a socket. Is there s size limit? I tried sending a
smaller file and ii poses no problem. Am I doing something wrong? Here
is the code:
def sendMessage(host, port, msg):
if isinstance(ms
Piet van Oostrum wrote:
Gabriel Rossetti (GR) wrote:
GR> I have a 1-1 relation, I have a thread reading msgs from a network socket
GR> and a method waiting for an answer to arrive (see my thread
GR> "Threading.Condition problem"). I would like to be able t
Piet van Oostrum wrote:
Gabriel Rossetti (GR) wrote:
GR> Hello everyone,
GR> I am using threading.Condition.wait(timeout) and was surprised to see that
GR> there is no return value nor an exception when wait() is used w/ a timeout.
GR> How am I supposed to kn
Maxim Khitrov wrote:
On Thu, Jul 16, 2009 at 5:00 PM, Carl Banks wrote:
On Jul 16, 8:12 am, Gabriel Rossetti
wrote:
Hello everyone,
I am using threading.Condition.wait(timeout) and was surprised to see
that there is no return value nor an exception when wait() is used w/ a
timeout
Hello everyone,
I am using threading.Condition.wait(timeout) and was surprised to see
that there is no return value nor an exception when wait() is used w/ a
timeout. How am I supposed to know if it was notified or if it timed out?
cheers,
Gabriel
--
http://mail.python.org/mailman/listinfo/py
Piet van Oostrum wrote:
Gabriel Rossetti (GR) wrote:
GR> Sorry if this appears twice, I sent it once with an attachment and it never
GR> arrived so maybe the attachment is posing problems. I inlined the code this
GR> time (at the bottom), thank you,
GR
Lawrence D'Oliveiro wrote:
In message , Gabriel
Rossetti wrote:
I am looking for blocking XMPP API. I'm wanting to make a webservice
that uses XMPP, but all the XMPP libs I find are non-blocking (i.e. w/
callbacks).
So why not have the caller sleep or something until the c
Sorry if this appears twice, I sent it once with an attachment and it
never arrived so maybe the attachment is posing problems. I inlined the
code this time (at the bottom), thank you,
Gabriel
## Original message
Hello everyone,
I wrote a
The previous msg w/ attached code is the wrong code, please use the code
attached to this msg, thank you and sorry for this.
Gabriel
Gabriel Rossetti wrote:
Hello everyone,
I wrote a small example that listens for xmpp msgs in a thread. The
main program calls a function that blocks (using
Hello everyone,
I wrote a small example that listens for xmpp msgs in a thread. The main
program calls a function that blocks (using Condition.wait) until a msg
has been received and then returns the msg. When a msg arrives, it is
put in a variable in the thread's object, it then calls the not
Hello everyone,
I am looking for blocking XMPP API. I'm wanting to make a webservice
that uses XMPP, but all the XMPP libs I find are non-blocking (i.e. w/
callbacks). I'd like to be able to do something like :
cl = Client("t...@domain.com/res01", "password",)
msg = "any ideas? Using Java I h
John Machin wrote:
On Jun 17, 1:41 am, Gabriel Rossetti
wrote:
Hello everyone,
I get an OperationalError with sqlite3 if I put the wrong column name,
but shouldn't that be a ProgrammingError instead? I read PEP 249 and it
says :
[snip]
and to me it sounds more like a progra
Hello everyone,
I get an OperationalError with sqlite3 if I put the wrong column name,
but shouldn't that be a ProgrammingError instead? I read PEP 249 and it
says :
"OperationalError
Exception raised for errors that are related to the
database's operat
Paul Boddie wrote:
On 26 Mai, 13:46, Gabriel Rossetti
wrote:
def getParams(curs):
curs.execute("select * from param where id=%d", 1001)
First of all, you should use the database module's parameter style,
which is probably "%s" - something I've thou
Diez B. Roggisch wrote:
Gabriel Rossetti wrote:
Hello everyone, I am trying to use dbapi with mysql and I get this error:
Traceback (most recent call last):
File "", line 1, in
File "", line 2, in getUnitParams
File "/var/lib/python-support/python2.5/MySQ
Hello everyone, I am trying to use dbapi with mysql and I get this error:
Traceback (most recent call last):
File "", line 1, in
File "", line 2, in getUnitParams
File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 151,
in execute
query = query % db.literal(args)
TypeError:
thomas.vo...@likeabird.de wrote:
On 17 Mai, 04:22, Grant Edwards wrote:
On 2009-05-17, Thomas Vogel wrote:
I'm currently have the problem that I try to read UDP messages from
multiple sockets in parallel. So let's say I get UDP packets from the
same IP on the ports 2000, 2001, 2002,.
Peter Otten wrote:
Gabriel Rossetti wrote:
I have three modules A, B, C;
A declares this globally :
UpdateEvent, UPDATE_EVENT_ID = wx.lib.newevent.NewEvent()
Then they import stuff from each other:
- A imports a constant from module B (in "__main__")
- A imports a clas
Hello everyone,
I have three modules A, B, C;
A declares this globally :
UpdateEvent, UPDATE_EVENT_ID = wx.lib.newevent.NewEvent()
Then they import stuff from each other:
- A imports a constant from module B (in "__main__")
- A imports a class and some constants from module C
- B imports a c
Gabriel Rossetti wrote:
Hello everyone,
I am wanting to create an installer for my project. I first use py2exe
to create win32 executables and then would like to have an easy to use
(for the end user) installer. I would need the installer to launch a
script (a python script also turned into
Hello everyone,
I am tryng to use py2exe with BeautifulSoup and simplejson. I have
already successfully used it with storm and twisted, but for some reason
py2exe does not find neither BeautifulSoup nor simplejson. I did do
something different when installing those packages, I used easy_install
a
Hello everyone,
I am wanting to create an installer for my project. I first use py2exe
to create win32 executables and then would like to have an easy to use
(for the end user) installer. I would need the installer to launch a
script (a python script also turned into an exec) after the install
Jeremiah Dodds wrote:
On Wed, Apr 1, 2009 at 8:25 AM, Gabriel Rossetti
mailto:gabriel.rosse...@arimaz.com>> wrote:
Hello everyone,
I am using beautiful soup to parse some HTML and I came across
something strange.
Here is an illustration:
>>> soup
Gabriel Rossetti wrote:
Hello everyone,
I am using BeautifulSoup to parse some HTML and I came across something
strange.
Here is an illustration:
soup = BeautifulSoup(u'hello ça boume
hello ça boume
soup.find("div", "text")
hello ça boume
soup.find("div&q
Hello everyone,
I am using BeautifulSoup to parse some HTML and I came across something
strange.
Here is an illustration:
soup = BeautifulSoup(u'hello ça boume
hello ça boume
soup.find("div", "text")
hello ça boume
soup.find("div", "text").string
soup.find("div", "text").next
u'hello \xe7a
Hello everyone,
I am using beautiful soup to parse some HTML and I came across something
strange.
Here is an illustration:
>>> soup = BeautifulSoup(u'hello ça boume>> soup
hello ça boume
>>> soup.find("div", "text")
hello ça boume
>>> soup.find("div", "text").string
>>> soup.find("div", "text"
Gabriel Rossetti wrote:
Hello everyone,
I am having a problem with urllib2, when I do this :
post = urllib.urlencode(post)
request = urllib2.Request(url, post)
response = urllib2.urlopen(request)
or this :
post = urllib.urlencode(post)
response = urllib2.urlopen(url, post)
or
MRAB wrote:
Gabriel Rossetti wrote:
Hello everyone,
I am trying to write a regex pattern to match an ID in a URL only if
it is not a given ID. Here's an example, the ID not to match is
"14522XXX98", if my URL is "/profile.php?id=14522XXX99" I want it to
match and
Hello everyone,
I am having a problem with urllib2, when I do this :
post = urllib.urlencode(post)
request = urllib2.Request(url, post)
response = urllib2.urlopen(request)
or this :
post = urllib.urlencode(post)
response = urllib2.urlopen(url, post)
or this :
post = urllib.
Hello everyone,
I am trying to write a regex pattern to match an ID in a URL only if it
is not a given ID. Here's an example, the ID not to match is
"14522XXX98", if my URL is "/profile.php?id=14522XXX99" I want it to
match and if it's "/profile.php?id=14522XXX98" I want it not to. I tried
th
Duncan Booth wrote:
Gabriel Rossetti wrote:
Ok, maybe I mis-stated my problem (or mis-understood your answers).. I
don' t want to share code as in have multiple processes access a
variable and have the same value, like it is done in threads, what I
want is to not have n copies o
andrew cooke wrote:
Gabriel Rossetti wrote:
Ok, maybe I mis-stated my problem (or mis-understood your answers).. I
don' t want to share code as in have multiple processes access a
variable and have the same value, like it is done in threads, what I
want is to not have n copies of the
Gabriel Rossetti wrote:
Hello everyone,
I would like to know if it is possible to turn python code into a
shared lib? I have several processes that use the same base code, and
it seems like every process loads the "shared" code into memory. I
would like it to be loaded once and sh
Hello everyone,
I would like to know if it is possible to turn python code into a shared
lib? I have several processes that use the same base code, and it seems
like every process loads the "shared" code into memory. I would like it
to be loaded once and shared, like a .so in linux or a .dll i
Peter Otten wrote:
Gabriel Rossetti wrote:
Hello everyone,
I originally posted this on the Twisted mailing list, but now it seams
to be a more general python/environment problem. If I run the attached
example in Eclipse, it works, if I run it from a terminal, it doesn't, I
get :
$ p
Hello everyone,
I originally posted this on the Twisted mailing list, but now it seams
to be a more general python/environment problem. If I run the attached
example in Eclipse, it works, if I run it from a terminal, it doesn't, I
get :
$ python xml_parser_test.py
Traceback (most recent cal
Hello,
I am using poplib and I noticed that calls to top() don't return the msg
info (2nd index in the returned list, e.g. email.top(1,0)[1]) in the
same order, by that I mean the date could be email.top(1,0)[1][2] or
email.top(1,0)[1][5], etc. Is there a reason for that other than that
may b
James Mills wrote:
On Mon, Feb 2, 2009 at 2:57 PM, David Lyon wrote:
To be truly cross platform, consider
using the Tcl/Tk toolkit rather tahn
wxWindows. Why ? Because Tcl/TK
is packaged and provided along with
most Python distributions.
I agree with your point..
The problem is that
Gabriel Rossetti wrote:
Terry Reedy wrote:
Gabriel Rossetti wrote:
I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2.
Have you tried the much newer 2.6? 2.5.3 will be out soon with some
bug fixes.
Thanks for the reply Terry, I just tried the pyserial example with
python
Terry Reedy wrote:
Gabriel Rossetti wrote:
I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2.
Have you tried the much newer 2.6? 2.5.3 will be out soon with some
bug fixes.
Thanks for the reply Terry, I just tried the pyserial example with
python 2.6 and it still has the
I have been debugging a distributed application for about 2 days that
has a memory leak. My app is a Twisted app, so I thought that maybe it
was on the twisted side, I finally isolated it to no being a Twisted
problem but a Python problem. The problem comes from the code that uses
wxPython and
Martin v. Löwis wrote:
I like to create a cross-platform standalone python application, like
Mac OS *.app dirs. The idea is to distribute a zip file containing
everything (the python interpreter and all) so that a user just unzips
it and runs it.
I don't think this can possibly work. If t
Hello everyone,
I like to create a cross-platform standalone python application, like
Mac OS *.app dirs. The idea is to distribute a zip file containing
everything (the python interpreter and all) so that a user just unzips
it and runs it. Has anyone ever done anything like that? I searched
g
Joe Strout wrote:
I'm trying to (gently) convince my business partner that we should be
adding Python to our core toolset. He's never used it before, apart
from poking around in the tutorial a bit at my urging. But he's got a
birthday coming up, and I'd like to get him a book that will help h
Hello everyone!
I trying to work with time and I a bit confused... If I look at my
clock, it's 16:59 (4:59pm), if I type "date" in a terminal, it says the
same thing. I'm wanting to write a simple NTP-type server/client (it's
not NTP at all actually, but does the same thing). The idea is that
Mike Driscoll wrote:
On Sep 23, 5:01 am, Gabriel Rossetti <[EMAIL PROTECTED]>
wrote:
Hello everyone,
I'm trying to use python's freeze utility but I'm running into problems.
I called it like this :
python /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py
~/Docu
Hello everyone,
I'm trying to use python's freeze utility but I'm running into problems.
I called it like this :
python /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py
~/Documents/Code/Python/src/jester/service.py -m jester
then I did : make
then I tried to run it : ./service
and
Gabriel Rossetti wrote:
Hello,
I'm using tempfile.mkdtemp() in a multithreading program and I've been
having problems with it. Sometimes it tells me the file I'm trying to
access (in the directory created with tempfile.mkdtemp()) doesn't
exist. I suspect that tempfile.m
Hello everyone,
I'm trying to import some modules into another's namespace (network_utils)
network_utils.py:
import utils
import constants as main_const
from services import constants as srv_const
from plugins import constants as plg_const
#
# Import all the message creation functions
#
f = di
Dennis Lee Bieber wrote:
On Thu, 21 Aug 2008 13:22:33 +0200, Gabriel Rossetti
<[EMAIL PROTECTED]> declaimed the following in
comp.lang.python:
have a solution? I have to create unique and temp. directories to use an
external program that creates a temp. file with the same name every
Dennis Lee Bieber wrote:
On Thu, 21 Aug 2008 13:22:33 +0200, Gabriel Rossetti
<[EMAIL PROTECTED]> declaimed the following in
comp.lang.python:
have a solution? I have to create unique and temp. directories to use an
external program that creates a temp. file with the same name every
Bruno Desthuilliers wrote:
Gabriel Rossetti a écrit :
Terry Reedy wrote:
(snip)
Unlike the class approach, this requires recreating the constant
functions and dict with each call to _test. Quick to write but a
bit 'dirty', in my opinion. Another standard idiom is to set up the
Hello,
I'm using tempfile.mkdtemp() in a multithreading program and I've been
having problems with it. Sometimes it tells me the file I'm trying to
access (in the directory created with tempfile.mkdtemp()) doesn't exist.
I suspect that tempfile.mkdtemp() returns the same directory to
differen
Terry Reedy wrote:
Gabriel Rossetti wrote:
Bruno Desthuilliers wrote:
Gabriel Rossetti a écrit :
I thought that since functions are objects, that I could obtain
it's nested functions.
Well, there's probably a very hackish way, but it's not worth the pain.
What Brun
Bruno Desthuilliers wrote:
Gabriel Rossetti a écrit :
Hello,
I can't get getattr() to return nested functions,
Of course. Nested functions are not attributes of their container
function.
Ok
I tried this :
>>> def toto():
... def titi():
... pass
...
Gabriel Genellina wrote:
En Wed, 20 Aug 2008 05:34:38 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribi�:
I can't get getattr() to return nested functions, I tried this :
>>> def toto():
... def titi():
... pass
... f = getattr(toto, "t
Hello,
I can't get getattr() to return nested functions, I tried this :
>>> def toto():
... def titi():
... pass
... f = getattr(toto, "titi")
... print str(f)
...
>>> toto()
Traceback (most recent call last):
File "", line 1, in
File "", line 4, in toto
AttributeError
Kurda Yon wrote:
Hi,
I found one example which defines the addition of two vectors as a
method of a class. It looks like that:
class Vector:
def __add__(self, other):
data = []
for j in range(len(self.data)):
data.append(self.data[j] + other.data[j])
return Vector(data)
In
Gabriel Genellina wrote:
En Wed, 11 Jun 2008 04:21:03 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribió:
Gabriel Genellina wrote:
En Tue, 10 Jun 2008 09:44:13 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribió:
I wanted to use the h2py.py script (Tools/scripts/h2py.py) an
Duncan Booth wrote:
Mike Orr <[EMAIL PROTECTED]> wrote:
That's a misunderstanding of classes vs instances. If you have an
instance of MyClass(Superclass), there is one instance but several
classes. The instance is of MyClass; there is no instance of
Superclass. 'self' has a .__class__ att
Bruno Desthuilliers wrote:
Gabriel Rossetti a écrit :
Larry Bates wrote:
Gabriel Rossetti wrote:
Hello everyone,
I had read somewhere that it is preferred to use
self.__class__.attribute over ClassName.attribute to access class
(aka static) attributes. I had done this and it seamed to work
Mike Orr wrote:
On Jun 5, 8:40 am, Gabriel Rossetti <[EMAIL PROTECTED]>
wrote:
Hello everyone,
I had read somewhere that it is preferred to use
self.__class__.attribute over ClassName.attribute to access class (aka
static) attributes. I had done this and it seamed to work, u
Gabriel Genellina wrote:
En Tue, 10 Jun 2008 09:44:13 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribió:
I wanted to use the h2py.py script (Tools/scripts/h2py.py) and it
didn't like char litterals :
Skipping: PC_ERROR = ord()
where my *.h file contained :
#define PC_E
Hello everyone,
I wanted to use the h2py.py script (Tools/scripts/h2py.py) and it didn't
like char litterals :
Skipping: PC_ERROR = ord()
where my *.h file contained :
#define PC_ERROR '0'
I searched the web and found a post with the same error :
http://mail.python.org/pipermail/python-lis
Larry Bates wrote:
Gabriel Rossetti wrote:
Hello everyone,
I had read somewhere that it is preferred to use
self.__class__.attribute over ClassName.attribute to access class
(aka static) attributes. I had done this and it seamed to work, until
I subclassed a class using this technique and
Hello everyone,
I had read somewhere that it is preferred to use
self.__class__.attribute over ClassName.attribute to access class (aka
static) attributes. I had done this and it seamed to work, until I
subclassed a class using this technique and from there on things started
screwing up. I fi
Arimaz SA
Av. du 24 Janvier 11
Ateliers de la Ville de Renens, Atelier 5
1020 Renens, Switzerland
www.mydeskfriend.com
Mob: +41-(0)79-539-0069
Tel: +41-(0)21-566-7343
sturlamolden wrote:
On Apr 25, 4:38 pm, Gabriel Rossetti
<[EMAIL PROTECTED]> wrote:
Hello,
I'm having some t
Hello,
I'm having some trouble with the Queue class, for some reason, if I do
this (ch == ) :
q = Queue.Queue(0)
repr(ch)
q.put(ch, True)
len(q.queue)
where the output is :
'\x02'
0
why isn't the character/string being put it in the queue?
Thank you,
Gabriel
--
http://mail.python.org/mail
Matt Nordhoff wrote:
> Matt Nordhoff wrote:
>
>> Gabriel Rossetti wrote:
>>
>>> Hello everyone,
>>>
>>> we are writing an application that needs some cleanup to be done if the
>>> application is quit, normally (normal termination) o
Hello everyone,
we are writing an application that needs some cleanup to be done if the
application is quit, normally (normal termination) or by a signal like
SIGINT or SIGTERM. I know that the __del__ method exists, but unless I'm
mistaken there is no guarantee as of when it will be called, an
sprad wrote:
> I'm a high school computer teacher, and I'm starting a series of
> programming courses next year (disguised as "game development" classes
> to capture more interest). The first year will be a gentle
> introduction to programming, leading to two more years of advanced
> topics.
>
> I
Bruno Desthuilliers wrote:
> Gabriel Rossetti a écrit :
>> Hello,
>>
>> I am using Partial Function Application in a class and I've come up
>> with a problem, when the method is called it tries to pass "self" to
>> the curried/partial functi
Diez B. Roggisch wrote:
> Gabriel Rossetti schrieb:
>
>> Hello,
>>
>> I am using Partial Function Application in a class and I've come up with
>> a problem, when the method is called it tries to pass "self" to the
>> curried/partial
Gabriel Rossetti wrote:
> Hello,
>
> I am using Partial Function Application in a class and I've come up with
> a problem, when the method is called it tries to pass "self" to the
> curried/partial function, but this should be the first argument in
> reality,
Hello,
I am using Partial Function Application in a class and I've come up with
a problem, when the method is called it tries to pass "self" to the
curried/partial function, but this should be the first argument in
reality, but since the function is curried, then the self gets passed as
the se
Arnaud Delobelle wrote:
> On Mar 26, 8:35 am, Gabriel Rossetti
> <[EMAIL PROTECTED]> wrote:
>
>> Hello,
>>
>> I wrote a program that reads data from a file and puts it in a string,
>> the problem is that it loops infinitely and that's not wanted, her
Gabriel Rossetti wrote:
> Hello,
>
> I wrote a program that reads data from a file and puts it in a string,
> the problem is that it loops infinitely and that's not wanted, here is
> the code :
>
> d = repr(f.read(DEFAULT_BUFFER_SIZE))
> while d != &
Hello,
I wrote a program that reads data from a file and puts it in a string,
the problem is that it loops infinitely and that's not wanted, here is
the code :
d = repr(f.read(DEFAULT_BUFFER_SIZE))
while d != "":
file_str.write(d)
d = repr(f.read(DEFAULT_BUFFER_SIZE))
I
Carsten Haese wrote:
> On Tue, 2008-03-18 at 09:06 +0100, Gabriel Rossetti wrote:
>
>> Hello,
>>
>> I am reading core python python programming and it talks about using the
>> idiom
>> described on
>> http://aspn.activestate.com/ASPN/Cookbook/Pyt
Carsten Haese wrote:
> On Tue, 2008-03-18 at 09:06 +0100, Gabriel Rossetti wrote:
>
>> Hello,
>>
>> I am reading core python python programming and it talks about using the
>> idiom
>> described on
>> http://aspn.activestate.com/ASPN/Cookbook/Pyt
Hello,
I am reading core python python programming and it talks about using the
idiom
described on
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/205183 .
I'm using python 2.5.1 and if I try :
class MyClass(object):
def __init__(self):
self._foo = "foo"
self._bar =
Michael Wieher wrote:
> stupid question: you have myPackage somewhere on sys.path?
>
> I mean, module1.py only knows it lives in a directory, it doesn't know
> anything about anything above it.
>
>
>
> 2008/3/10, Gabriel Rossetti <[EMAIL PROTECTED]
> <mai
Sam wrote:
> Hello,
>
> I may misunderstand your problem, but it may be related to the
> execution environment, especially the PYTHONPATH variable. Have a look
> at the following log:
>
> [EMAIL PROTECTED]:/$ pwd
> /
> [EMAIL PROTECTED]:/$ cat -n /tmp/test_import.py
> 1 class A(object):
>
1 - 100 of 103 matches
Mail list logo