On Jul 30, 1:58 am, "Russ P." <[EMAIL PROTECTED]> wrote:
> On Jul 29, 10:33 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > On Jul 30, 1:15 am, "Russ P." <[EMAIL PROTECTED]> wrote:
> > > Having said that, it would sure be nice to be able to write
>
> > > if myList is not empty:
>
> > > instead of
>
On Jul 30, 2:06 am, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Perhaps in the particular use case you're thinking of (numeric types vs.
> container types), there aren't any good examples. But who cares?
You don't have to. I am trying to set the record straight on just how
much polymophism "if
On Jul 29, 11:36 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Russ P. wrote:
> > Come to think of it, shouldn't the list type have an "isempty" method?
> > Or does it?
>
> Yes. It's written:
>
> if not aList:
> ...
As you know, that is not quite exactly the same thing. An
I note that IronPython and Python's pickle.dumps do not return the
same value. Perhaps this relates to the absence of interpreter loop.
>>> p.dumps( { 'a': True, 'b': set( ) } )
IPy: '(dp0\nVb\np1\nc__builtin__\nset\np3\n((lp4\ntp5\nRp2\nsVa
\np6\nI01\ns.'
CPy: "(dp0\nS'a'\np1\nI01\nsS'b'\np2\nc_
On Jul 29, 11:36 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Russ P. wrote:
> > On Jul 29, 11:09 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
>
> >> I'm getting this sneaking suspicion that you guys are all putting us on.
>
> > As I said in an earlier post, I realize that this would only w
Russ P. wrote:
Come to think of it, shouldn't the list type have an "isempty" method?
Or does it?
Yes. It's written:
if not aList:
...
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfranci
Russ P. wrote:
On Jul 29, 11:09 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
I'm getting this sneaking suspicion that you guys are all putting us on.
As I said in an earlier post, I realize that this would only work if
there were only one copy of "empty" (as there is only one copy of
"Non
On Jul 29, 11:16 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Russ P. wrote:
> > On Jul 29, 10:33 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> >> On Jul 30, 1:15 am, "Russ P." <[EMAIL PROTECTED]> wrote:
>
> >>> Having said that, it would sure be nice to be able to write
> >>> if myList is not e
On Jul 29, 11:09 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> I'm getting this sneaking suspicion that you guys are all putting us on.
As I said in an earlier post, I realize that this would only work if
there were only one copy of "empty" (as there is only one copy of
"None"). I don't know
[EMAIL PROTECTED] wrote:
>
>
>
>
>
>
>
>
>
>
>
>name="Courier">text
>
>
Russ P. wrote:
On Jul 29, 10:33 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
On Jul 30, 1:15 am, "Russ P." <[EMAIL PROTECTED]> wrote:
Having said that, it would sure be nice to be able to write
if myList is not empty:
instead of
if len(myList) != 0:
I can agree with this.
But I guess that co
Carl Banks wrote:
On Jul 30, 1:15 am, "Russ P." <[EMAIL PROTECTED]> wrote:
All this discussion about "if x" has me wondering. I use it all the
time because a fully explicit test just seems redundant. But maybe it
does have some value in terms of readability and type checking. After
all, it is p
Russ P. wrote:
All this discussion about "if x" has me wondering. I use it all the
time because a fully explicit test just seems redundant. But maybe it
does have some value in terms of readability and type checking. After
all, it is possible to forget whether something is a number or a list.
H
Carl Banks wrote:
Bull. This is a request, that, if satisfied, would prove that "if x"
is more polymorphic than a simple explicit test. I posed the question
precisely to see if anyone could come up with a use case that shows
this benefit of "if x".
Except you're the only one who's not convin
With a little hacking, you might be able to do something like this:
@overload("f", (int, int, str))
def f1(x, y, z):
pass
@overload("f", (str, str))
def f2(x, y):
pass
The way I would typically do method overloading would be as follows
(this has been tested):
class Person:
def __in
On Jul 29, 10:33 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jul 30, 1:15 am, "Russ P." <[EMAIL PROTECTED]> wrote:
> > Having said that, it would sure be nice to be able to write
>
> > if myList is not empty:
>
> > instead of
>
> > if len(myList) != 0:
>
> I can agree with this.
But I guess th
On Jul 30, 1:15 am, "Russ P." <[EMAIL PROTECTED]> wrote:
> All this discussion about "if x" has me wondering. I use it all the
> time because a fully explicit test just seems redundant. But maybe it
> does have some value in terms of readability and type checking. After
> all, it is possible to for
On Jul 29, 6:42 pm, Matthew Fitzgibbons <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > Much like in Steven D'Aprano's example, still the only actual code
> > snippet I've seen, it seems that this can easily be done with a simple
> > explicit test by having all no-advance filters return None and
En Wed, 30 Jul 2008 00:56:55 -0300, <[EMAIL PROTECTED]> escribi�:
One other question I had was about rounding floats. I was first looking
at this syntax to round out to 6 decimal places if needed:
f = '508.5'
x = '%.6f' % (float(f)/72)
x
'7.062500'
However, in this instance I don't want t
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
>
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
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
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
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
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
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
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
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.
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 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 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 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
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 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
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: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
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, 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
> >
"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
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
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
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:
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
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
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
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
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)
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
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 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
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 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
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
[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
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
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 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
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 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
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 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 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 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
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 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'
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 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 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
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
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:
> 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
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
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
[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
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
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
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
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
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
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)
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
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
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 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]> 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 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
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
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
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
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
> >>
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
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
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,
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
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
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
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
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
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
[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
1 - 100 of 219 matches
Mail list logo