On Tue, 29 Jul 2008 20:12:14 +0200, Nikolaus Rath <[EMAIL PROTECTED]> wrote:
Jean-Paul Calderone <[EMAIL PROTECTED]> writes:
On Tue, 29 Jul 2008 19:26:09 +0200, Nikolaus Rath <[EMAIL PROTECTED]> wrote:
Jean-Paul Calderone <[EMAIL PROTECTED]> writes:
On Tue, 29 Jul 2008 16:35:55 +0200, Nikolaus
In using PAMIE 2.0 specifically the "scripWrite" function I'm getting
the following error...
File "C:\Python23\Lib\site-packages\win32com\client\dynamic.py", line
489, in _getattr_
further states...
raise AttributeError, "%s.%s" % (self._username_, attr)
Help... :)
--
http://mail.python.org/m
On Jul 29, 1:26 pm, frankrentef <[EMAIL PROTECTED]> wrote:
> In using PAMIE 2.0 specifically the "scripWrite" function I'm getting
> the following error...
>
> File "C:\Python23\Lib\site-packages\win32com\client\dynamic.py", line
> 489, in _getattr_
>
> further states...
>
> raise AttributeError, "
On Jul 29, 1:36 pm, kj <[EMAIL PROTECTED]> wrote:
> Is there a special pythonic idiom for iterating over a list (or
> tuple) two elements at a time?
I use this one a lot:
for x, y in zip(a, a[1:]):
frob(x, y)
Geoff G-T
--
http://mail.python.org/mailman/listinfo/python-list
I need someone who is able to install SPREE an open source program
see: http://www.askspree.de/
HOWEVER, here is the catch: It is on WINDOWS, but my server has
PYTHON..is there a miracle out there? If so please let me know what I
can do? Thank you.
--
http://mail.python.org/mailman/listinfo/pyt
iu2 wrote:
On Jul 29, 9:36 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
Your example becomes:
def dotimes(n, callable):
for i in range(n): callable(i)
def block(i):
for j in range(i):
print j,
print
dotimes(5, block)
0
0 1
0 1 2
0 1 2 3
The on
In article <[EMAIL PROTECTED]>,
William McBrine <[EMAIL PROTECTED]> wrote:
> On Sun, 13 Jul 2008 00:58:59 +0200, Python.Arno wrote:
>
> > http://undefined.org/python/py2app.html
>
> py2app bundles Python itself into the app, right? I wonder, is there no
> way to create an app bundle that relie
Nikolaus Rath wrote:
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
Nikolaus Rath a écrit :
Thats true. But out of curiosity: why is changing the interpreter such
a bad thing? (If we suppose for now that the change itself is a good
idea).
Because it would very seriously break a *lot* of c
In article <[EMAIL PROTECTED]>,
Tommy Nordgren <[EMAIL PROTECTED]> wrote:
> On 28 jul 2008, at 03.59, William McBrine wrote:
>
> > On Sun, 13 Jul 2008 00:58:59 +0200, Python.Arno wrote:
> >
> >> http://undefined.org/python/py2app.html
> >
> > py2app bundles Python itself into the app, right? I w
kj <[EMAIL PROTECTED]> wrote:
> Hi. I can't find any documentation for psycopg2.
>
> I'm a noob, so I'm sure I'm just not looking in the right place...
>
> Anybody know where it is?
For basic use, psycopg2 follows the dbapi, which is described in
http://www.python.org/dev/peps/pep-0249/
Additi
Robert LaMarca wrote:
Hi,
I am using numpy and wish to create very large arrays. My system is AMD 64 x 2 Ubuntu 8.04. Ubuntu should be 64 bit. I have 3gb RAM and a 15 GB swap drive.
The command I have been trying to use is;
g=numpy.ones([1000,1000,1000],numpy.int32)
This returns a mem
kj <[EMAIL PROTECTED]> wrote:
> Is there a special pythonic idiom for iterating over a list (or
> tuple) two elements at a time?
I don't know of one, and I shouldn't be answering, but the following
should work:
def gulp_two(items):
for i,j in zip(items[0::2], items[1::2]):
yield (i,j)
Let'
On Jul 29, 2:36 pm, [EMAIL PROTECTED] wrote:
> On Jul 29, 1:36 pm, kj <[EMAIL PROTECTED]> wrote:
>
> > Is there a special pythonic idiom for iterating over a list (or
> > tuple) two elements at a time?
>
> I use this one a lot:
>
> for x, y in zip(a, a[1:]):
> frob(x, y)
>
> Geoff G-T
The OO overheads for C++ are almost non-existent.
http://www.informit.com/articles/article.aspx?p=1192024&ns=15058
On Mon, Jul 21, 2008 at 2:05 PM, Dan Upton <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 21, 2008 at 1:21 PM, Marc 'BlackJack' Rintsch
> <[EMAIL PROTECTED]> wrote:
>> On Mon, 21 Jul 2008 1
Tim Golden wrote:
Victor Subervi wrote:
def a():
chars = ['\\i0', '\\u0', '\\qc', '\\b0', '\\ql', '\\i', '\\u',
'\\b', '\\yz']
rtf_markup = 'viewkind4\uc1\pard\nowidctlpar\qc\i\f0\fs36 Who is
like the Beast? Who can wage war against him?\par'
for char in chars:
c = '(?<=' + char +
On Jul 26, 8:02 pm, Rob Williscroft <[EMAIL PROTECTED]> wrote:
> Martin v. Löwis wrote innews:[EMAIL PROTECTED]
> comp.lang.python:
>
> >> I just tested, I built a default C# forms app using the "AnyCPU"
> >> option and it ran as a 64 bit app (no *32 in Task Manager), this is
> >> on XP64.
>
> >> I
Hussein B wrote:
Hi.
Apache Ant is the de facto building tool for Java (whether JSE, JEE
and JME) application.
With Ant you can do what ever you want: compile, generate docs,
generate code, packing, deploy, connecting to remote servers and every
thing.
Do we have such a tool for Python projects
Carl Banks wrote:
On Jul 29, 1:30 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
On Jul 29, 5:15 am, Heiko Wundram <[EMAIL PROTECTED]> wrote:
I can't dig up a simple example from code I wrote quickly, but because of the
fact that explicit comparisons always hamper polymorphism
I'm not going to tak
[EMAIL PROTECTED] wrote:
On Jul 29, 1:36 pm, kj <[EMAIL PROTECTED]> wrote:
Is there a special pythonic idiom for iterating over a list (or
tuple) two elements at a time?
I use this one a lot:
for x, y in zip(a, a[1:]):
frob(x, y)
It doesn't work:
>>> a = range(10)
>>> [(x, y) for
[EMAIL PROTECTED] wrote:
Whoops, I misread the original post. That would be:
for x, y in zip(a[::2], a[1::2]):
frob(x, y)
... which I don't use a lot.
Sorry, posted before I saw your reply. Still, you're building three
sublists in order to just iterate over them.
--
Erik Max Fr
Thanks for all the replies. I learned a lot!
kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> "if x" is completely type agnostic. You can pass an object of any type to
> it, and it will work. (Excluding objects with buggy methods, naturally.)
There are many circumstances where if a parameter is None I'd rather
get an exception than have the co
code_berzerker wrote:
> Hi i'm relatively new to Python and my C/C++ knowledge is near to
> None. Having said that I feel justified to ask stupid questions :)
Have you considered using Cython? It's almost Python, but it compiles to C
code for a Python extension module and even lets you call C func
Ben Finney <[EMAIL PROTECTED]> wrote:
> No, he retracted the *insult* and restated the *advice* as a distinct
> statement. I think it's quite worthwhile to help people see the
> difference.
Ben, it was quite clear from Anders' post that he knows about
__nonzero__ . That's why the so-called advice
kj wrote:
Is there a special pythonic idiom for iterating over a list (or
tuple) two elements at a time?
I mean, other than
for i in range(0, len(a), 2):
frobnicate(a[i], a[i+1])
There have been requests to add a grouper function to itertools, but its
author has resisted because there
Am 29.07.2008, 18:30 Uhr, schrieb Carl Banks <[EMAIL PROTECTED]>:
On Jul 29, 5:15 am, Heiko Wundram <[EMAIL PROTECTED]> wrote:
I can't dig up a simple example from code I wrote quickly, but because
of the
fact that explicit comparisons always hamper polymorphism
I'm not going to take your w
Yet another noob question...
Is there a way to mimic C's static variables in Python? Or something
like it? The idea is to equip a given function with a set of
constants that belong only to it, so as not to clutter the global
namespace with variables that are not needed elsewhere.
For example,
TGD101 wrote:
I need someone who is able to install SPREE an open source program
see: http://www.askspree.de/
HOWEVER, here is the catch: It is on WINDOWS, but my server has
PYTHON..is there a miracle out there? If so please let me know what I
can do? Thank you.
Since the site's 'Open Sou
Paul Boddie <[EMAIL PROTECTED]> wrote:
> I do understand that it can be awkward to work out which object files
> need recompiling due to changes in source files, for example, and
> that one doesn't want to see the logic involved reproduced all over
> the place, but I do wonder whether the machiner
On Jul 29, 4:08 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > On Jul 29, 1:30 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> >> On Jul 29, 5:15 am, Heiko Wundram <[EMAIL PROTECTED]> wrote:
>
> >>> I can't dig up a simple example from code I wrote quickly, but because of
> >>
kj wrote:
Yet another noob question...
Is there a way to mimic C's static variables in Python? Or something
like it? The idea is to equip a given function with a set of
constants that belong only to it, so as not to clutter the global
namespace with variables that are not needed elsewhere.
Fo
In <[EMAIL PROTECTED]> Matthew Woodcraft <[EMAIL PROTECTED]> writes:
>kj <[EMAIL PROTECTED]> wrote:
>> Hi. I can't find any documentation for psycopg2.
>>
>> I'm a noob, so I'm sure I'm just not looking in the right place...
>>
>> Anybody know where it is?
>For basic use, psycopg2 follows the
Diez B. Roggisch wrote:
>> For sets, I presume they are built on top of or like dicts, and
>> there is nothing crazy in the low level implementation so that I can
>> be guaranteed that if I don't alter the set, then the order,
>> although arbitrary, will be maintained in successive iterations over
On Jul 29, 3:43 pm, "Heiko Wundram" <[EMAIL PROTECTED]> wrote:
> Am 29.07.2008, 18:30 Uhr, schrieb Carl Banks <[EMAIL PROTECTED]>:
>
> > On Jul 29, 5:15 am, Heiko Wundram <[EMAIL PROTECTED]> wrote:
> >> I can't dig up a simple example from code I wrote quickly, but because
> >> of the
> >> fact tha
In <[EMAIL PROTECTED]> Larry Bates <[EMAIL PROTECTED]> writes:
>kj wrote:
>> Yet another noob question...
>>
>> Is there a way to mimic C's static variables in Python? Or something
>> like it? The idea is to equip a given function with a set of
>> constants that belong only to it, so as not to
On Jul 21, 12:09 pm, Svenn Are Bjerkem <[EMAIL PROTECTED]>
wrote:
> Hi,
> I am in the need to write an application for PyQt to visualise the
> structure of a VHDL project I am working on. Looking for a sensible
> way to parse VHDL files and putting them into a data structure that
> PyQt can represe
In <[EMAIL PROTECTED]> Terry Reedy <[EMAIL PROTECTED]> writes:
>kj wrote:
>> Is there a special pythonic idiom for iterating over a list (or
>> tuple) two elements at a time?
>>
>> I mean, other than
>>
>> for i in range(0, len(a), 2):
>> frobnicate(a[i], a[i+1])
>There have been request
On Jul 29, 1:30 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jul 29, 5:15 am, Heiko Wundram <[EMAIL PROTECTED]> wrote:
>
> > I can't dig up a simple example from code I wrote quickly, but because of
> > the
> > fact that explicit comparisons always hamper polymorphism
>
> I'm not going to take y
Hi all
Hudson supports arbitrary ant/shell/batch commands so it basically supports
any development environment (as long as it can run java). I use(d) it to
build, test, package, pylint my XBMC python script
(http://hudson.ramfelt.se/job/XBMC%20TV). If you would like a guide on how
to get going, c
Terry Reedy wrote:
Robert LaMarca wrote:
Hi,
I am using numpy and wish to create very large arrays. My system is
AMD 64 x 2 Ubuntu 8.04. Ubuntu should be 64 bit. I have 3gb RAM and a
15 GB swap drive.
The command I have been trying to use is;
g=numpy.ones([1000,1000,1000],numpy.int32)
Also, just a couple of points:
Am 29.07.2008, 22:27 Uhr, schrieb Carl Banks <[EMAIL PROTECTED]>:
1. Any container type that returns a length that isn't exactly the
number of elements in it is broken.
I agree, but how do you ever expect to return an infinite element count?
The direction I too
kj wrote:
In <[EMAIL PROTECTED]> Larry Bates <[EMAIL PROTECTED]> writes:
kj wrote:
Yet another noob question...
Is there a way to mimic C's static variables in Python? Or something
like it? The idea is to equip a given function with a set of
constants that belong only to it, so as not to cl
Re!
Pywin32 can use dynamic COM server (without tlb).
Therefore, I prefer to wait the return from birdprince...
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
On Jul 29, 11:12 am, Matthew Fitzgibbons <[EMAIL PROTECTED]> wrote:
Carl Banks wrote:
On Jul 28, 8:15 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven D'Aprano <[EMAIL PROTECTE
I cannot help but wonder if this is spam meant to drive traffic to the
site.
If yes, you just managed to increase its visibility by quoting the whole
post including the post.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I have implemented a COM in C++,buy i don't know how to use this COM
in python.
For example: the COM's ProgID is "MyCOM1.AdvMethod".this COM have two
interfaces,the default interface's name is IAdvMethod,the second
interface's name is IBasicMethod.
How do i use those inte
How can I check how many cores my computer has?
Is it possible to do this in a Python-app?
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 29, 2008 at 12:53 PM, defn noob <[EMAIL PROTECTED]> wrote:
> How can I check how many cores my computer has?
> Is it possible to do this in a Python-app?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You can use the HAL interface from the DBUS module. See also the
gnome
kj:
> OK, I guess that in Python the only way to do what I want to do
> is with objects...
There are other ways, like assigning the value out of the function,
because Python functions too are objects:
def iamslow():
return 100
def foo(x):
return x + foo.y
foo.y = iamslow() # slow computat
kj <[EMAIL PROTECTED]> writes:
> The word on the street is to use something like SQLAlchemy for
> database access in Python, but my experience in the past with
> packages that perform automated SQL generation has been awful, so I
> always return to lighter-weight solutions that allow me to write m
kj <[EMAIL PROTECTED]> writes:
> Is there a way to mimic C's static variables in Python? Or something
> like it?
A "static variable" in C is one that has access limited to the scope
in which it is declared.
Python approaches the same issue through namespaces: a name binding
made at a class or mo
On Tue, 29 Jul 2008 10:30:43 -0700, Carl Banks wrote:
> On Jul 29, 5:15 am, Heiko Wundram <[EMAIL PROTECTED]> wrote:
>> I can't dig up a simple example from code I wrote quickly, but because
>> of the fact that explicit comparisons always hamper polymorphism
>
> I'm not going to take your word fo
On Tue, 29 Jul 2008 10:42:50 -0700, Carl Banks wrote:
> On Jul 29, 11:12 am, Matthew Fitzgibbons <[EMAIL PROTECTED]> wrote:
...
>> My use case involves a DAG of filters that pass data (of a variety of
>> types--filters just pass on data types they don't understand) between
>> them. I can also drop
On Tue, 29 Jul 2008 21:15:12 +0100, Matthew Woodcraft wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> "if x" is completely type agnostic. You can pass an object of any type
>> to it, and it will work. (Excluding objects with buggy methods,
>> naturally.)
>
> There are many circumstances w
On Tue, 29 Jul 2008 21:25:44 +0100, Matthew Woodcraft wrote:
> Ben Finney <[EMAIL PROTECTED]> wrote:
>> No, he retracted the *insult* and restated the *advice* as a distinct
>> statement. I think it's quite worthwhile to help people see the
>> difference.
>
> Ben, it was quite clear from Anders'
Matthew Woodcraft wrote:
Ben Finney <[EMAIL PROTECTED]> wrote:
No, he retracted the *insult* and restated the *advice* as a distinct
statement. I think it's quite worthwhile to help people see the
difference.
Ben, it was quite clear from Anders' post that he knows about
__nonzero__ . That's
On Jul 30, 3:53 am, william tanksley <[EMAIL PROTECTED]> wrote:
> To ask another way: how do I convert from a file:// URL to a local
> path in a standard way, so that filepaths from two different sources
> will work the same way in a dictionary?
>
> Right now I'm using the following source:
>
> tra
On Tue, 29 Jul 2008 13:53:07 -0700, Carl Banks wrote:
> Bzzt. "if len(x)!=0" is a simple explicit that would work for this
> class and all built-in containers. (Or should--Steven D'Aprano's
> objections notwithstanding, any reasonable container type should support
> this invariant.
What's the le
On Jul 25, 6:07 pm, MRAB <[EMAIL PROTECTED]> wrote:
> On Jul 25, 1:18 pm, SteveC <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I am trying to use POP3_SSL class of thepoplibmodule to read email
> > from my gmail account. I can connect just fine using the example
> > herehttp://www.python.org/doc/
On Tue, 29 Jul 2008 15:53:47 -0700, defn noob wrote:
> How can I check how many cores my computer has? Is it possible to do
> this in a Python-app?
Well you can try the functions in the 'platform' module, although in my
box(debian) nothing useful comes out. I don't think there's a simple &
port
On Jul 29, 5:53 pm, defn noob <[EMAIL PROTECTED]> wrote:
> How can I check how many cores my computer has?
> Is it possible to do this in a Python-app?
If you're using Windows, get PyWin32:
win32api.GetSystemInfo
tuple = GetSystemInfo()
Retrieves information about the current system.
Win32 API
In article <[EMAIL PROTECTED]>,
Nikolaus Rath <[EMAIL PROTECTED]> wrote:
> But at least this variation doesn't work, because unittest apparently
> also creates two separate TwoTests instances for the two tests. Isn't
> there some way to convince unittest to reuse the same instance instead
> of tr
On Tue, 29 Jul 2008 21:31:01 +, kj wrote:
> In <[EMAIL PROTECTED]> Larry Bates <[EMAIL PROTECTED]> writes:
>
> [snip]
>
> Maybe it's easier to see what I mean with JavaScript:
>
> function foo() {
> if (foo.x === undefined) foo.x = expensive_call();
> return do_stuff_with(foo.x);
> }
de
http://www.google.com/notebook/public/16705304140696498535/BDQxBQwoQm_aljLcj
http://www.google.com/notebook/public/12366932363888735542/BDQV_QgoQlOK7jLcj
http://www.google.com/notebook/public/02454303184762488307/BDRE-QwoQoaWWjLcj
http://www.google.com/notebook/public/16705304140696498535/BDR96QgoQ
On Jul 29, 1:40 pm, kj <[EMAIL PROTECTED]> wrote:
> Yet another noob question...
>
> Is there a way to mimic C's static variables in Python? Or something
> like it? The idea is to equip a given function with a set of
> constants that belong only to it, so as not to clutter the global
> namespace
[EMAIL PROTECTED] wrote:
kj:
OK, I guess that in Python the only way to do what I want to do
is with objects...
There are other ways, like assigning the value out of the function,
because Python functions too are objects:
...
But I suggest you to use a class in this situation, it's often th
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>Anders wrote:
>> "But then you decide to name the method "__nonzero__", instead of some
>> nice descriptive name?"
> That suggests to me that Anders imagined that __nonzero__ is something I
> just made up, instead of a standard Python method. What do
On Jul 29, 6:33 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
> On Jul 29, 1:40 pm, kj <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yet another noob question...
>
> > Is there a way to mimic C's static variables in Python? Or something
> > like it? The idea is to equip a given function with a set of
> > const
On Jul 29, 7:44 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Jul 29, 5:53 pm, defn noob <[EMAIL PROTECTED]> wrote:
>
> > How can I check how many cores my computer has?
> > Is it possible to do this in a Python-app?
>
> If you're using Windows, get PyWin32:
>
> win32api.GetSystemInfo
> tuple = Ge
On Jul 30, 11:57 am, "Russ P." <[EMAIL PROTECTED]> wrote:
> On Jul 29, 6:33 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jul 29, 1:40 pm, kj <[EMAIL PROTECTED]> wrote:
>
> > > Yet another noob question...
>
> > > Is there a way to mimic C's static variables in Python? Or something
> > > l
Carl Banks wrote:
Bzzt. "if len(x)!=0" is a simple explicit that would work for this
class and all built-in containers. (Or should--Steven D'Aprano's
objections notwithstanding, any reasonable container type should
support this invariant. From a language design standpoint, an "empty"
builtin c
On Jul 28, 6:49 pm, Svenn Are Bjerkem <[EMAIL PROTECTED]>
wrote:
> Hi again,
>
> when I get far enough to parse the VHDL (which is not currently the
> fact, but I have to look at the work coming up downstream) I will have
> to put it into an internal data structure and then write some classes
> to
On Jul 29, 11:23 pm, Henrique Dante de Almeida <[EMAIL PROTECTED]>
wrote:
> On Jul 28, 6:49 pm, Svenn Are Bjerkem <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hi again,
>
> > when I get far enough to parse the VHDL (which is not currently the
> > fact, but I have to look at the work coming up downstream)
En Tue, 29 Jul 2008 14:56:08 -0300, qvx <[EMAIL PROTECTED]> escribi�:
I don't have server listening on port 8084 but I can open socket to it
(and to many other ports, tested for all<8000)
Your example fails -as expected- on my PC running Python 2.5.2 + Windows
XP SP2. It may be something spe
Carl Banks wrote:
As I wrote in the second reply email I sent, check out my integer set
recipe on ASPN (and to save you the search:
http://code.activestate.com/recipes/466286/).
Couple points:
1. Any container type that returns a length that isn't exactly the
number of elements in it is b
On Jul 29, 8:38 pm, pigmartian <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > kj:
> >> OK, I guess that in Python the only way to do what I want to do
> >> is with objects...
>
> > There are other ways, like assigning the value out of the function,
> > because Python functions too are ob
Well, others have answered the question, but I thought I'd throw in
that it would be more pythonic to do something like:
def Get_Relative_Path(target, base = None):
if base is None:
base = os.curdir
...
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Hoping that some of you won't mind taking a peek at my code and sharing your
thoughts. I just started using the elementtree module yesterday to work
with xml files. Here's an example of some xml code I might be parsing:
Ruby has been getting pummeled for the last year or more on the
performance subject. They've been working hard at improving it. From
my arm chair perspective Python is sitting on it's laurels and not
taking this as seriously as it probably should. In general it's
possible to make many comments t
En Tue, 29 Jul 2008 08:45:02 -0300, Themis Bourdenas <[EMAIL PROTECTED]>
escribi�:
On Mon, Jul 28, 2008 at 11:12 AM, Gabriel Genellina
<[EMAIL PROTECTED]>wrote:
En Sun, 27 Jul 2008 15:26:39 -0300, Themistoklis Bourdenas <
[EMAIL PROTECTED]> escribió:
> On a related note, as the actual insta
"fred.haab" <[EMAIL PROTECTED]> writes:
> Well, others have answered the question, but I thought I'd throw in
> that it would be more pythonic to do something like:
>
> def Get_Relative_Path(target, base = None):
> if base is None:
> base = os.curdir
> ...
Even more Pythonic woul
On Jul 29, 10:23 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > Bzzt. "if len(x)!=0" is a simple explicit that would work for this
> > class and all built-in containers. (Or should--Steven D'Aprano's
> > objections notwithstanding, any reasonable container type should
> >
En Tue, 29 Jul 2008 13:13:51 -0300, Magnus Schuster
<[EMAIL PROTECTED]> escribi�:
Hello,
I have written the following small proxy class which I expect to pass all
function calls to the 'original' object:
--- BEGIN ---
class proxy(object):
def __init__( self, subject ):
self.__subj
On Jul 29, 7:39 am, alex23 <[EMAIL PROTECTED]> wrote:
> On Jul 29, 2:21 pm, castironpi <[EMAIL PROTECTED]> wrote:
>
> > On Jul 28, 5:58 pm, Fuzzyman <[EMAIL PROTECTED]> wrote:
> > > Well - in IronPython user code gets compiled to in memory assemblies
> > > which can be JIT'ed.
>
> > I don't believe
Carl Banks wrote:
That's not what I was asking for. I was asking for a use case for "if
x" that can't be replaced by a simple explicit test. Your example
didn't satisfy that.
It's a completely artificial request. "if x" _is_ a completely simple
test. Simpler, in fact, than the ones you we
On Jul 29, 7:30 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Tue, 29 Jul 2008 10:30:43 -0700, Carl Banks wrote:
> > On Jul 29, 5:15 am, Heiko Wundram <[EMAIL PROTECTED]> wrote:
> >> I can't dig up a simple example from code I wrote quickly, but because
> >> of the fact tha
This is the solution I suggest. It is fairly trivial, and works by
introducing the "self.static" namespace for a class's static
variables, in contrast to "self" for the class's instance variables.
---
class Static(object): pass
personStatic = Static()
class Pers
On Jul 30, 1:56 pm, koblas <[EMAIL PROTECTED]> wrote:
> Ruby has been getting pummeled for the last year or more on the
> performance subject. They've been working hard at improving it. From
> my arm chair perspective Python is sitting on it's laurels and not
> taking this as seriously as it prob
En Tue, 29 Jul 2008 10:08:21 -0300, Victor Subervi
<[EMAIL PROTECTED]> escribi�:
Hi;
I have this code:
def a():
chars = ['\\i0', '\\u0', '\\qc', '\\b0', '\\ql', '\\i', '\\u', '\\b',
'\\yz']
rtf_markup = 'viewkind4\uc1\pard\nowidctlpar\qc\i\f0\fs36 Who is like the
Beast? Who can wage war agains
On Jul 29, 2:27 am, Iain King <[EMAIL PROTECTED]> wrote:
> On Jul 29, 5:33 am, "Russ P." <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jul 28, 8:44 pm, alex23 <[EMAIL PROTECTED]> wrote:
>
> > > On Jul 29, 4:46 am, "Russ P." <[EMAIL PROTECTED]> wrote:
>
> > > > As I said, I could write a pre-processor mys
En Tue, 29 Jul 2008 17:00:40 -0300, Terry Reedy <[EMAIL PROTECTED]>
escribi�:
I just found the QuickEdit option. While in an administrator account
(if Python is installed for all users), bring up the menu as specified
above, select Properties instead, then the Options tab, then select
Qu
On Jul 30, 12:22 am, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > That's not what I was asking for. I was asking for a use case for "if
> > x" that can't be replaced by a simple explicit test. Your example
> > didn't satisfy that.
>
> It's a completely artificial request.
On Jul 29, 1:46 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
> castironpi <[EMAIL PROTECTED]> wrote:
>
> >In CPython yes. In IronPython yes: the parts that are compiled into
> >machine code are the interpreter, *not user's code*.
>
> WRONG! You are WRONG. At "compile" time, the Python code is com
En Tue, 29 Jul 2008 10:04:46 -0300, Gordon Maria
<[EMAIL PROTECTED]> escribi�:
I'm running a GUI in python which is able to launch a separate python
process
that will run forever. In rare cases I will want to kill the launched
process.
Every time I do so, I end up with the process as defunc
The following method is similar to the others provided, but yields an
index value as well (similar to the enumerate(iterable) function).
This is useful in some (but not all) situations.
If the iterable object's iterator returns an even number of items then
you're fine; otherwise it will throw away
On Jul 29, 11:17 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> >> As I wrote in the second reply email I sent, check out my integer set
> >> recipe on ASPN (and to save you the search:
> >> http://code.activestate.com/recipes/466286/).
>
> > Couple points:
>
> > 1. Any containe
En Tue, 29 Jul 2008 01:17:13 -0300, Piyush Anonymous
<[EMAIL PROTECTED]> escribi�:
class MyObject:
def __init__(self, name):
self.name = name
def do_this_default(self):
print "default do_this implementation for %s" % self.name
def custom_do_this(): #method to be added
pri
IronPython doesn't have an interpreter loop and therefore has no POP / TOP /
etc... Instead what IronPython has is a method call Int32Ops.Add which looks
like:
public static object Add(Int32 x, Int32 y) {
long result = (long) x + y;
if (Int32.MinValue <= result
On Jul 29, 9:52 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jul 29, 11:17 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
>
>
> > Carl Banks wrote:
> > >> As I wrote in the second reply email I sent, check out my integer set
> > >> recipe on ASPN (and to save you the search:
> > >> http://code.ac
On Tue, Jul 29, 2008 at 12:17 AM, Piyush Anonymous
<[EMAIL PROTECTED]> wrote:
> class MyObject:
>def __init__(self, name):
> self.name = name
>
>def do_this_default(self):
> print "default do_this implementation for %s" % self.name
>
> def custom_do_this(): #method to be added
>
101 - 200 of 219 matches
Mail list logo