On Wed, 10 Oct 2007 05:58:51 +, Alan Isaac wrote:
> I am on a Windows box.
>
> I pickle a tuple of 2 simple objects with the pickle module.
> It pickles fine. It unpickles fine.
>
> I upload to a server.
> I try to unpickle from the URL. No luck. Try it:
> x1, x2 =
> pickle.load(urllib.u
Diez B. Roggisch schrieb:
>>> Yes, it is.
>>
>> I'm afraid not.
>>
>> As I admitted in my reply to Marc, I overstated my case by saying that
>> L isn't rebound at all. Of course it is rebound, but to itself.
>>
>> However, it is not true that += "always leads to a rebinding of a to
>> the result
>> Yes, it is.
>
> I'm afraid not.
>
> As I admitted in my reply to Marc, I overstated my case by saying that L
> isn't rebound at all. Of course it is rebound, but to itself.
>
> However, it is not true that += "always leads to a rebinding of a to the
> result of the operation +". The + opera
I apologize for being a dick. It won't happen again.
I was actually thinking that the 25 standard
timezones (which make a reasonable list or
can be easily generated by clicking a map)
could serve as a filter to make the detail
list reasonably sized.
Something like this:
import pytz
import dateti
hi.
i am trying to learn event binding. i have a form with a couple of buttons
for different tags, which all call the same function. the text on the
buttons changes from record to record. this is the problem area:
def showrecords(self):
"""this function updates the form labels to show
Just Another Victim of the Ambient Morality schrieb:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Just Another Victim of the Ambient Morality schrieb:
>>> HTMLParser is behaving in, what I find to be, strange ways and I
>>> would like to better underst
I am on a Windows box.
I pickle a tuple of 2 simple objects with the pickle module.
It pickles fine. It unpickles fine.
I upload to a server.
I try to unpickle from the URL. No luck. Try it:
x1, x2 =
pickle.load(urllib.urlopen('http://www.american.edu/econ/notes/hw/example1'))
I change the f
On 9 Okt, 17:18, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> lgwe wrote:
> > I have a python-script: myscript, used to start a program on another
> > computer and I use OptionParser in optpars.
> > I use it like this: myscript -H host arg1 -x -y zzz
> > I would like OptionParser to ignore all a
Hi,
Have any one faced such problem, I assume it must be common if it can
be replicated so easily , or something wrong with my system
Also if I use tar.members instead of tar.getmembers() it works
so what is the diff. between tar.members and tar.getmembers()
rgds
Anurag
--
http://mail.python.o
> If nothing else, please use Google. Many will thank you.
>
http://www.google.com/search?hl=en&q=Definitional+Interpreters+for+Higher-Order+Functions&btnG=Search
http://www.brics.dk/~hosc/vol11/contents.html
Definitional Interpreters for Higher-Order Programming Languages
Definitional Interpre
Corrected the links...
1. Programming Languages: Application and Interpretation
Shriram Krishnamurthi
Part VII Continuations
http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/plai-2007-04-26.pdf
2. Essentials of Programming Languages (2nd edition)
Friedman, Wand and Haynes
Chapt
> Can anyone explain:
>
> (1) its origin
>From the Bibliographic Notes of Chapter 12 Continuations in a Functional
Language, Theories of Programming Languages by John C. Reynolds, page 370:
"A history of the repeated discoveries of continuations (occurring largely
in the context of functional lan
On Oct 9, 2007, at 12:44 PM, Andreas Kraemer wrote:
> Hi everyone,
>
> I know that the subject of mutable objects as dictionary keys has
> been discussed a number of times in this forum (see for instance
> "freezing" of classes), but I would love to hear the thoughts of
> the experts on the
On Oct 9, 2007, at 7:37 PM, Andreas Kraemer wrote:
> From: Chris Mellon <[EMAIL PROTECTED]>
> Sent: Tuesday, October 9, 2007 1:51:04 PM
>
> > Because, by definition, if you have the key then you don't need
> to get
> > it from the dict. What you're doing here is conflating 2 mappings
> into
>
Hi,
My code looks like this:
for item in bigset:
self.__sub1(item)
self.__sub2(item)
self.__sub3(item)
# the subX functions, in turn, use various 3rd party modules.
Now, I would like to do this:
for item in bigset:
try:
self.__sub1(item)
self.__sub2(item)
self.__sub3(item)
I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm
running my regression tests. I'm seeing occasional cases where
M2Crypto raises the exception SSL.SSLError, and the associated
error is "(0, 'Error')", which is the bogus error you get if you feed 0 to
"perror". It failed once on "v
Since you are starting a new project you may want to look into
something new and different
http://mdp.cti.depaul.edu/examples
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 10, 3:32 pm, "Nicholas Bastin" <[EMAIL PROTECTED]> wrote:
> On 10/9/07, Chris Mellon <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 09 Oct 2007 16:56:30 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
>
> > > Is it possible to mix classes defined in both Python and C in the same
> > > module? Ideal
Hello everyone,
i'm new user of python, in fact, i'm using Control Desk from dsPACE. I
just want to change the programm a bit to fit to my application.
I draw xyplot using virsual instrument xyplot in Control Desk, and i
want to delect any curses if it's needed. But in Control Desk the
xyplot is
When importing Java packages in Jython, what is the convention to
simplify imports? For example:
import java.util as util
Is this correct? Or should I use from * import *?
--
http://mail.python.org/mailman/listinfo/python-list
On 10/9/07, Chris Mellon <[EMAIL PROTECTED]> wrote:
> On 09 Oct 2007 16:56:30 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
> >
> > Is it possible to mix classes defined in both Python and C in the same
> > module? Ideally I would like to be able to do:
> >
> > from some.module import MyPythonCl
Bruno Desthuilliers a écrit :
(snip)
> And it is *not* rebound:
Doh. Stupid me. Of course it is - but to a ref to the same object...
>>> class A:
... l = []
...
>>> class B(A): pass
...
>>> B.__dict__
{'__module__': '__main__', '__doc__': None}
>>> B.l
[]
>>> B.l += [1]
>>> B.__dict__
{'__m
Marc 'BlackJack' Rintsch a écrit :
> On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
>
>
>L = []
>id(L)
>>
>>3083496716L
>>
>L += [1]
>id(L)
>>
>>3083496716L
>>
>>It's the same L, not rebound at all.
>
> It *is* rebound. To the same object, but it *is* assigned to `L`
[EMAIL PROTECTED] a écrit :
> Hi.
>
> I've got a question on the differences and how to define static and
> class variables.
What's a "static" variable ? A variable that doesn't move ?-)
> Hence, my understanding is that static variables must be bound to the
> class defining the variables
Yo
On Oct 8, 7:32 am, Joost Kremers <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Don't both "man" and those words for measurement come ultimately from
> > words for "hand" (similarly to words like "manual", as in labor)?
>
> no.
Do not bluntly contradict me in public.
> "manual" is deri
[EMAIL PROTECTED] writes:
> Matthias, thanks for the reference, but I dont have access to an
> engineering library. I would appreciate, if you have access to paper/
> scanner or electronic copy to help many of us out, you are
> not just helping me but many will thank you.
Given that you seem to b
From: Chris Mellon <[EMAIL PROTECTED]>
Sent: Tuesday, October 9, 2007 1:51:04 PM
> Because, by definition, if you have the key then you don't need to get
> it from the dict. What you're doing here is conflating 2 mappings into
> one: string value->person and person->values. Use 2 explicit dicts t
On Tue, 09 Oct 2007 22:43:16 +, Steven D'Aprano wrote:
> On Tue, 09 Oct 2007 19:46:35 +, Marc 'BlackJack' Rintsch wrote:
>
>> On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
>>
>> L = []
>> id(L)
>>> 3083496716L
>> L += [1]
>> id(L)
>>> 3083496716L
>>>
>>> It'
On 10/9/07, John Machin <[EMAIL PROTECTED]> wrote:
> On 10/10/2007 1:33 AM, Hamilton, William wrote:
> >> From: Tommy Grav
> >>
> >> Hi everyone,
> >>
> >>I have a list of objects where I have want to do two loops.
> >> I want to loop over the list and inside this loop, work on all
> >> the ele
On Tue, 09 Oct 2007 21:25:38 +0200, Laszlo Nagy wrote:
> a = 1
> a+= 1 # The compiler will probably optimize this and the Python bytecode
> interpreter will not rebind 'a' here, just increment the integer in
> memory.
No. This is Python, not C. You can't increment integers in memory.
Integers ar
On Tue, 09 Oct 2007 22:27:47 +0200, Diez B. Roggisch wrote:
> Steven D'Aprano schrieb:
>> On Tue, 09 Oct 2007 19:23:37 +0200, Diez B. Roggisch wrote:
>>
>>> Your believes aside, this is simply wrong. The statement
>>>
>>> a += x
>>>
>>> always leads to a rebinding of a to the result of the operat
On Tue, 09 Oct 2007 19:46:35 +, Marc 'BlackJack' Rintsch wrote:
> On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
>
> L = []
> id(L)
>> 3083496716L
> L += [1]
> id(L)
>> 3083496716L
>>
>> It's the same L, not rebound at all.
>
> It *is* rebound. To the same objec
It's cool when you solve your own problems. It was as simple as this:
def dictToKeyValue(self, mydict):
soap_list = []
for key,value in mydict.items():
inner = {"key":key,"value":value}
soap_list.append(inner)
return soap_list
It's just a list of di
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Just Another Victim of the Ambient Morality schrieb:
>> HTMLParser is behaving in, what I find to be, strange ways and I
>> would like to better understand what it is doing and why.
>>
>> First, it doesn't a
On 10/10/2007 1:00 AM, Chris Mellon wrote:
> On 10/9/07, Tommy Grav <[EMAIL PROTECTED]> wrote:
>> Hi everyone,
>>
>>I have a list of objects where I have want to do two loops.
>> I want to loop over the list and inside this loop, work on all
>> the elements of the list after the one being handl
On 10/10/2007 1:33 AM, Hamilton, William wrote:
>> From: Tommy Grav
>>
>> Hi everyone,
>>
>>I have a list of objects where I have want to do two loops.
>> I want to loop over the list and inside this loop, work on all
>> the elements of the list after the one being handled in the outer
The man
On 10/10/2007 12:30 AM, Tommy Grav wrote:
> Hi everyone,
>
> I have a list of objects where I have want to do two loops.
> I want to loop over the list and inside this loop, work on all
> the elements of the list after the one being handled in the outer
> loop. I can of course do this with index
Just Another Victim of the Ambient Morality schrieb:
> HTMLParser is behaving in, what I find to be, strange ways and I would
> like to better understand what it is doing and why.
>
> First, it doesn't appear to translate HTML escape characters. I don't
> know the actual terminology but
>> who says that timezones have to be separated by one hour each?
>
> The Earth says. It takes 24 hours to revolve.
Your kidding me, aren't you? Beside the fact that the earth does not
revolve in 24h (leap seconds, if you like to google), even the 24 hours
of a day are as arbitrary as you prefe
>> who says that timezones have to be separated by one hour each?
>
> The Earth says. It takes 24 hours to revolve.
Wrong
>> Why aren't they separated by 30minutes, or 20, or 10? Or 2 hours?
>
> Why isn't an hour defined to be 30 minutes?
>
>> Or why don't we have a global time?
>
> Like UTC?
On 10/10/2007 12:56 AM, Stefan Arentz wrote:
> Is it possible to mix classes defined in both Python and C in the same
> module? Ideally I would like to be able to do:
>
> from some.module import MyPythonClass, MyCClass
>
> I guess that would mean that this would look like this on disk:
>
> som
HTMLParser is behaving in, what I find to be, strange ways and I would
like to better understand what it is doing and why.
First, it doesn't appear to translate HTML escape characters. I don't
know the actual terminology but things like & don't get translated into
& as one would like.
On Oct 9, 2007, at 3:32 PM, . wrote:
> On Tue, 09 Oct 2007 19:20:06 +, gnuist006 wrote:
>
>> On Oct 8, 11:09 pm, "." <[EMAIL PROTECTED]> wrote:
>>> On Tue, 09 Oct 2007 05:15:49 +, gnuist006 wrote:
>>
>>>
Can anyone explain:
>>>
(1) its origin
>>>
>>> One of the lambda papers, I t
[EMAIL PROTECTED] wrote in article <[EMAIL PROTECTED]> in comp.lang.functional:
> > One of the most lucid explanations of definitional interpreters --
> > including those that are based on continuation-passing -- are
> > explained in J. Reynolds' famous 1971 "Definitional Interpreters for
> > Highe
On 10/9/07, Andreas Kraemer <[EMAIL PROTECTED]> wrote:
>
> I sometimes find it useful to store meta data on dictionary keys, like in
> the following example:
>
> class Dict(dict):
> def __init__(self,*args,**kw):
> self.key_dict = {}
> super(Dict,self).__init__(*args,**kw)
> def __setit
On 10/9/07, Bruno Barberi Gnecco
<[EMAIL PROTECTED]> wrote:
> I'm getting the following exception when I call an external extension
> (pytst):
>
> /usr/lib/python2.5/threading.py:697: RuntimeWarning: tp_compare didn't return
> -1 or -2 for
> exception
>return _active[_get_ident()]
> Tr
I'm getting the following exception when I call an external extension
(pytst):
/usr/lib/python2.5/threading.py:697: RuntimeWarning: tp_compare didn't return
-1 or -2 for
exception
return _active[_get_ident()]
Traceback (most recent call last):
File "testDataMiner2.py", line 77, in
On Tue, 09 Oct 2007 19:20:06 +, gnuist006 wrote:
> On Oct 8, 11:09 pm, "." <[EMAIL PROTECTED]> wrote:
>> On Tue, 09 Oct 2007 05:15:49 +, gnuist006 wrote:
>
>>
>> > Can anyone explain:
>>
>> > (1) its origin
>>
>> One of the lambda papers, I think. I don't remember which.
>
> Hey no-name
On Oct 9, 3:35 pm, Istvan Albert <[EMAIL PROTECTED]> wrote:
>
> why would it be late? is the future of you own work not worth the time
> it takes to rename it? Compared to all the other work it took ... it
> is just a mere inconvenience.
>From a sourceforge perspective I think it's more than in
in
Steven D'Aprano schrieb:
> On Tue, 09 Oct 2007 19:23:37 +0200, Diez B. Roggisch wrote:
>
>> Your believes aside, this is simply wrong. The statement
>>
>> a += x
>>
>> always leads to a rebinding of a to the result of the operation +.
>
> Not true.
Yes, it is.
L = []
id(L)
> 30834967
Marc Christiansen pisze:
>
> I had a (not so quick) look. The code proves its point (i.e. writing a
> very small p2p application is possible), but it is horrible. With only
> one server, the code is broken; maybe it works using multiple servers, I
> didn't test. A quick fix seems to be to change
On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
L = []
id(L)
> 3083496716L
L += [1]
id(L)
> 3083496716L
>
> It's the same L, not rebound at all.
It *is* rebound. To the same object, but it *is* assigned to `L` and not
just mutated in place.
In [107]: class A:
On Oct 9, 5:50 am, Matthias Blume <[EMAIL PROTECTED]> wrote:
> "." <[EMAIL PROTECTED]> writes:
> > On Tue, 09 Oct 2007 05:15:49 +, gnuist006 wrote:
>
> >> Again I am depressed to encounter a fundamentally new concept that I
> >> was all along unheard of. Its not even in paul graham's book where
On Oct 9, 9:14 am, [EMAIL PROTECTED] wrote:
> a great tradition of tounge-in-cheek package names, like
> "Cold fusion", for example.
Cold Fusion is a super cool name. Nobody will every think of it as
representing something odd or silly.
> too late now. sorry again,
why would it be late? is the
Steven D'Aprano wrote:
> On Tue, 09 Oct 2007 19:23:37 +0200, Diez B. Roggisch wrote:
>
>
>> Your believes aside, this is simply wrong. The statement
>>
>> a += x
>>
>> always leads to a rebinding of a to the result of the operation +.
>>
>
> Not true.
>
Hmm. Or you can write __iadd__ to
> (6) any good readable references that explain it lucidly ?
This was something that has been very interesting to me for a while
now, and I'm actually still having a difficult time wrapping my head
around it completely.
The best written explanation that I've come across was in "The Scheme
Progra
Special thanks to many of you for your very decent replies.
On Oct 9, 11:18 am, George Neuner wrote:
> On Tue, 09 Oct 2007 05:15:49 -, [EMAIL PROTECTED] wrote:
> >Again I am depressed to encounter a fundamentally new concept that I
> >was all along unheard of. Its not even in paul graham's bo
On Oct 8, 11:09 pm, "." <[EMAIL PROTECTED]> wrote:
> On Tue, 09 Oct 2007 05:15:49 +, gnuist006 wrote:
>
> > Can anyone explain:
>
> > (1) its origin
>
> One of the lambda papers, I think. I don't remember which.
Hey no-name "dot" you are the only one who says its origin is in
one of the old
On 10/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Oct 9, 8:34 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> > > On Oct 8, 1:03 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> > >> On Mon, 2007-10-08 at 10:41 -0700, [EMAIL PROTECTED] wrote:
> > >> > For
On 10/9/07, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-10-09, Robin Becker <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> >> On Oct 9, 8:46 am, Istvan Albert <[EMAIL PROTECTED]> wrote:
> >>> ps. there is a python project named "The Devil Framework", I cringe
> >>> every time I he
On 10/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Why aren't they separated by 30minutes, or 20, or 10? Or 2 hours?
>
> Why isn't an hour defined to be 30 minutes?
>
> > Or why don't we have a global time?
>
> Like UTC?
>
> >
> > Your 25 timezones are an abstraction the same way
>
> Not
On Tue, Oct 09, 2007 at 11:21:41AM -0700, [EMAIL PROTECTED] wrote regarding Re:
pytz has so many timezones!:
>
> The Earth says. It takes 24 hours to revolve.
>
> > Why aren't they separated by 30minutes, or 20, or 10? Or 2 hours?
>
> Why isn't an hour defined to be 30 minutes?
>
> > Or why do
On 2007-10-09, Robin Becker <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>> On Oct 9, 8:46 am, Istvan Albert <[EMAIL PROTECTED]> wrote:
>>> ps. there is a python project named "The Devil Framework", I cringe
>>> every time I hear about it.Nucularis not as bad, but it is close.
>>
>> Aw sh
On Oct 9, 8:34 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Oct 8, 1:03 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> >> On Mon, 2007-10-08 at 10:41 -0700, [EMAIL PROTECTED] wrote:
> >> > For example, Windows has seperate listings for
>
> >> > Central America
On Tue, 09 Oct 2007 05:15:49 -, [EMAIL PROTECTED] wrote:
>Again I am depressed to encounter a fundamentally new concept that I
>was all along unheard of. Its not even in paul graham's book where i
>learnt part of Lisp. Its in Marc Feeley's video.
>
>Can anyone explain:
>
>(1) its origin
Lambd
I sometimes find it useful to store meta data on dictionary keys, like in the
following example:
class Dict(dict):
def __init__(self,*args,**kw):
self.key_dict = {}
super(Dict,self).__init__(*args,**kw)
def __setitem__(self,k,v):
self.key_dict[k] = k
super(Dict,self).__setitem
Can anyone offer any assistance as to how to convert a basic python
dictionary, list, or even tuple into the SOAP type "ArrayOfKeyValue"?
I am currently using SOAPpy, but would be willing to change to ZSI or
something else if it made this conversion easier.
I have tried with the arrayType and str
On Oct 9, 7:17 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> Kay Schluehr wrote:
> > Originally I came up with the idea of a pure Python implementation for
> > copyable generators as an ActiveState Python Cookbook recipe. Too bad,
> > it was badly broken as Klaus Müller from the SimPy project poi
On Tue, 09 Oct 2007 19:23:37 +0200, Diez B. Roggisch wrote:
> Your believes aside, this is simply wrong. The statement
>
> a += x
>
> always leads to a rebinding of a to the result of the operation +.
Not true.
>>> L = []
>>> id(L)
3083496716L
>>> L += [1]
>>> id(L)
3083496716L
It's the same
Hi everyone,
I know that the subject of mutable objects as dictionary keys has been
discussed a number of times in this forum (see for instance "freezing" of
classes), but I would love to hear the thoughts of the experts on the approach
below.
The use case that I encounter frequently is the c
On Oct 9, 7:54 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On 10/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm running a python program that simulates a wireless network
> > protocol for a certain number of "frames" (measure of time). I've
> > observed the following:
>
> > 1
On Oct 9, 2:58 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Mon, 08 Oct 2007 10:41:03 -0700, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>
>
> > There are only 25 timezones: -12, -11, ... -1, 0 (GMT), +1, ... +11,
> > +12.
>
> Uhm... -12
> In point #3, you really bind a name to a value. As you probably know, in
> Python, there are names and objects. The initial value of the name 'a'
> is 1. It is an immutable object. The "+=" operator usually increments a
> value of an object. However, because the 'int' type is immutable, the +=
On Oct 9, 9:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi.
>
> I've got a question on the differences and how to define static and
> class variables. AFAIK, class methods are the ones which receives the
> class itself as an argument, while static methods are the one which
> runs static
[EMAIL PROTECTED] wrote:
> On Oct 9, 8:46 am, Istvan Albert <[EMAIL PROTECTED]> wrote:
>> ps. there is a python project named "The Devil Framework", I cringe
>> every time I hear about it.Nucularis not as bad, but it is close.
>
> Aw shucks. I thought it was funny. Can't I make fun of
> politici
Kay Schluehr wrote:
> Originally I came up with the idea of a pure Python implementation for
> copyable generators as an ActiveState Python Cookbook recipe. Too bad,
> it was badly broken as Klaus Müller from the SimPy project pointed
> out. Two weeks and lots of tests later I got finally a running
> Your question "is variable a
> static or class variable?" has no real answer. After running the
> increment() method on a descendant class, e.g. Child1 will rebind the
> name Child1.a, creating a new name in the namespace of the class. So the
> variable Foo.a is still there, but you are acce
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Again I am depressed to encounter a fundamentally new concept that I
| was all along unheard of. Its not even in paul graham's book where i
| learnt part of Lisp. Its in Marc Feeley's video.
|
| Can anyone explain:
|
| (1) its origin
|
On Tue, 09 Oct 2007 09:16:12 -0700, [EMAIL PROTECTED] wrote:
> I've got a question on the differences and how to define static and
> class variables.
First you have to define what you mean by "static".
> AFAIK, class methods are the ones which receives the
> class itself as an argument, while st
[EMAIL PROTECTED] wrote:
> Hi.
>
> I've got a question on the differences and how to define static and
> class variables. AFAIK, class methods are the ones which receives the
> class itself as an argument, while static methods are the one which
> runs statically with the defining class.
>
> Hence,
On 09 Oct 2007 17:45:12 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
> "Chris Mellon" <[EMAIL PROTECTED]> writes:
>
> > On 09 Oct 2007 17:20:09 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
> > >
> > > Is there an easy way to implement a specific method of a Python class
> > > in C? Like a nat
Hi.
I've got a question on the differences and how to define static and
class variables. AFAIK, class methods are the ones which receives the
class itself as an argument, while static methods are the one which
runs statically with the defining class.
Hence, my understanding is that static variabl
On 09 Oct 2007 17:45:12 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
>"Chris Mellon" <[EMAIL PROTECTED]> writes:
>
>> On 09 Oct 2007 17:20:09 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
>> >
>> > Is there an easy way to implement a specific method of a Python class
>> > in C? Like a native m
"Chris Mellon" <[EMAIL PROTECTED]> writes:
> On 09 Oct 2007 17:20:09 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
> >
> > Is there an easy way to implement a specific method of a Python class
> > in C? Like a native method in Java? I would really like to do the
> > majority of my class code in
> From: Tommy Grav
>
> Hi everyone,
>
>I have a list of objects where I have want to do two loops.
> I want to loop over the list and inside this loop, work on all
> the elements of the list after the one being handled in the outer
> loop. I can of course do this with indexes:
>
> >>> alist
Stefan Arentz wrote:
>
> Is there an easy way to implement a specific method of a Python class
> in C? Like a native method in Java? I would really like to do the
> majority of my class code in Python and just do one or two methods
> in C.
ctypes or subclassing C-implemented classes.
Diez
--
h
On 09 Oct 2007 17:20:09 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
>
> Is there an easy way to implement a specific method of a Python class
> in C? Like a native method in Java? I would really like to do the
> majority of my class code in Python and just do one or two methods
> in C.
>
> S.
> I want to make a binary file , which would execute on it's own.
First do
$ which python
to get the location of your python binary. The default, i think, is just
/usr/bin/python.
Then add this line to the top of your file:
#!/usr/bin/python (or whatever the `which` command returned)
th
On 10/9/07, Tommy Grav <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
>I have a list of objects where I have want to do two loops.
> I want to loop over the list and inside this loop, work on all
> the elements of the list after the one being handled in the outer
> loop. I can of course do this wi
Is there an easy way to implement a specific method of a Python class
in C? Like a native method in Java? I would really like to do the
majority of my class code in Python and just do one or two methods
in C.
S.
--
http://mail.python.org/mailman/listinfo/python-list
> >>> alist = range(3)
> >>> for i in xrange(len(alist)):
> ... for j in xrange(i+1,len(alist)):
> ... print i,j,alist[i],alist[j]
> ...
> 0 1 0 1
> 0 2 0 2
> 1 2 1 2
> >>>
>
>
> Is there a way to do this without using indexes?
The following works for me, replicating your code,
>>> al
lgwe wrote:
> I have a python-script: myscript, used to start a program on another
> computer and I use OptionParser in optpars.
> I use it like this: myscript -H host arg1 -x -y zzz
> I would like OptionParser to ignore all arguments after arg1, because
> these are options that should be used by
On Oct 9, 4:56 pm, Stefan Arentz <[EMAIL PROTECTED]> wrote:
> Is it possible to mix classes defined in both Python and C in the same
> module? Ideally I would like to be able to do:
>
> from some.module import MyPythonClass, MyCClass
>
> I guess that would mean that this would look like this on di
On 09 Oct 2007 16:56:30 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
>
> Is it possible to mix classes defined in both Python and C in the same
> module? Ideally I would like to be able to do:
>
> from some.module import MyPythonClass, MyCClass
>
> I guess that would mean that this would look l
On Oct 7, 1:01 pm, Michael Torrie <[EMAIL PROTECTED]> wrote:
> timw.google wrote:
> > Hi
>
> > I want to write a python script that runs rsync on a given directory
> > and host. I build the command line string, but when I try to run
> > subprocess.call(cmd), or p=subprocess.Popen(cmd, shell=True),o
Is it possible to mix classes defined in both Python and C in the same
module? Ideally I would like to be able to do:
from some.module import MyPythonClass, MyCClass
I guess that would mean that this would look like this on disk:
some/
__init__.py
module.py (contains MyPythonClass)
On 2007-10-09, Thomas W <[EMAIL PROTECTED]> wrote:
> I want to create a virtual filesystem based on a relational
> database. [...]
http://en.wikipedia.org/wiki/Filesystem_in_Userspace
http://fuse.sourceforge.net/
--
Grant Edwards grante Yow! I'm a nuclear
On 10/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm running a python program that simulates a wireless network
> protocol for a certain number of "frames" (measure of time). I've
> observed the following:
>
> 1. The memory consumption of the program grows as the number of frames
> I sim
Hi everyone,
I have a list of objects where I have want to do two loops.
I want to loop over the list and inside this loop, work on all
the elements of the list after the one being handled in the outer
loop. I can of course do this with indexes:
>>> alist = range(3)
>>> for i in xrange(len(a
On 2007-10-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Comparing apples with apples, how do you compare the scheme
> gui library with wxpython ? Isnt it better than Tkinter ?
I haven't used the newer Scheme GUI bindings. I switched from
STk to tkinter, and then from tkinter to PyGTK and w
1 - 100 of 153 matches
Mail list logo