gene tani wrote:
> Russ wrote:
>
>>Does it ever make sense to derive a class from a basic type such as
>>float or int? Suppose, for example, that I want to create a class for
>>physical scalars with units. I thought about deriving from float, then
>>adding the units. I played around with it a bit,
This third release of an improved debugger also probably about as
great as the last release.
Download from
http://sourceforge.net/project/showfiles.php?group_id=61395&package_id=175827
On-line documentation is at
http://bashdb.sourceforge.net/pydb/pydb/lib/index.html
Along with this release is a
Thanks everyone for your insight.
I'm coming from C++ - I'm used to formatting code with {} instead of
whitespaces.
@Larry - this isn't my homework :P I'm actually taking a VB.NET class
in school.
I was teaching myself C++ but decided to scale back to Python. I've
heard it was a bit easier to
Chris Mellon wrote:
[snip]
> I don't think it does, though. Firstly, as a definition it relies on
> the environment the application will be running under and therefore
> can't be considered to describe just a language. Secondly, by that
> definition Java is an interpreted language which is at odds
Alex Martelli wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>...
>
>>>Reread the part I quoted above: at least some of the proponents of this
>>>syntax appear to be totally ignorant of 30 years of literature and
>>>practice of programming, "it will be tough to convince" them that closed
Katja Suess wrote:
> Hi
> Cause Google didn't find the Info I was trying to find her my post.
> Is PyUNO still _the_ Tool to create PDFs out of OpenOffice docs (odt,
> not swx) ?
> Do other tools exist?
> Do you prefer generatingp PDFs using the XML-Strukture of odt files?
> Regards,
> Katja
>
Op
John Salerno wrote:
> I contacted my domain host about how Python is implemented on their
> server, and got this response:
>
> ---
> Hello John,
>
> Please be informed that the implementation of python in our server is
> through mod_python integration with the apache.
>
> These are
wes weston wrote:
>Looping is easier with:
> for x in range(100):
>if random.randint(0,1) == 0:
> heads += 1
>else:
> tails += 1
Also, with the functional programming tools of map, filter, and lambda,
this code can be reduced to just six lines:
import random
flips = map(
Torsten Bronger wrote:
>
> My definiton would be that an interpreted language has in its
> typical implementation an interpreting layer necessary for typical
> hardware. Of couse, now we could discuss what is "typical",
> however, in practice one would know it, I think. In case of Python:
> CPyt
Patch / Bug Summary
___
Patches : 385 open (-14) / 3067 closed (+25) / 3452 total (+11)
Bugs: 864 open (-59) / 5621 closed (+68) / 6485 total ( +9)
RFE : 211 open ( +2) / 200 closed ( +2) / 411 total ( +4)
New / Reopened Patches
__
GNU uses
Hi,all
as we know, we can override the operator of one object(for example __eq__).
my question is, how to override the basic operator?
for example,
for any object comparison operator(including litterals),
for example,
a = "123"
b = "321"
the boolean equation a == b,
i need override "==" operator
As the subject of this post suggests, I have one question; what are
COM-enabled applications? I believe Microsoft Word is one of these
apps, but what else? Is a web browser, Paint, Solitare, games, etc? I'm
not sure if it varies from operating system to operating system, but I
am talking about COM
John Salerno wrote:
> I contacted my domain host about how Python is implemented on their
> server, and got this response:
>
> ---
> Hello John,
>
> Please be informed that the implementation of python in our server is
> through mod_python integration with the apache.
>
> These
I believe you are asking for a side effect from the "==" operator.
Add print statements to the __eq__ method.
"kanchy kang" <[EMAIL PROTECTED]> wrote:
>Hi,all
>as we know, we can override the operator of one object(for example __eq__).
>my question is, how to override the basic operator?
>for ex
Casey Hawthorne wrote:
> I believe you are asking for a side effect from the "==" operator.
>
> Add print statements to the __eq__ method.
The things is, he wants to make those modifications to builtin types, which he
can't do.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the
Ben Cartwright wrote:
>> The script can be given a executable mode, or permission, using the
>> chmod command:
>>
>> $ chmod +x myscript.py
>
> And this answers your second. Your host needs to know the path to your
> script so they can use chmod to make it executable.
Where does this line go?
Steve Holden wrote:
> Fortunately they've given you the information you need to run CGI
> scripts. Try installing this script in your cgi-bin directory as test.py
> (you may have to set it executable):
Thank you! I desperately needed to test it, and that seemed to work. I
didn't have to make it
John Salerno wrote:
> Ben Cartwright wrote:
>
>
>>>The script can be given a executable mode, or permission, using the
>>>chmod command:
>>>
>>> $ chmod +x myscript.py
>>
>>And this answers your second. Your host needs to know the path to your
>>script so they can use chmod to make it executabl
kanchy kang wrote:
> Hi,all
> as we know, we can override the operator of one object(for example __eq__).
> my question is, how to override the basic operator?
> for example,
>
> for any object comparison operator(including litterals),
> for example,
> a = "123"
> b = "321"
>
> the boolean equati
John Zenger wrote:
> Also, with the functional programming tools of map, filter, and lambda,
> this code can be reduced to just six lines:
>
> import random
>
> flips = map(lambda x: random.randrange(2), xrange(100))
> heads = len(filter(lambda x: x is 0, flips))
> tails = len(filter(lambda x: x i
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> John Zenger wrote:
> > Also, with the functional programming tools of map, filter, and lambda,
> > this code can be reduced to just six lines:
> >
> > import random
> >
> > flips = map(lambda x: random.randrange(2), xrange(100))
> > he
COM is Windows only. (Actually there is DCOM for Linux, but that's
another story).
Read about it here.
http://en.wikipedia.org/wiki/Component_object_model
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> Steve Holden wrote:
>
>
>>Fortunately they've given you the information you need to run CGI
>>scripts. Try installing this script in your cgi-bin directory as test.py
>>(you may have to set it executable):
>
>
> Thank you! I desperately needed to test it, and that seemed
Steve Holden wrote:
>> Where does this line go? Just at the top as well?
>
> Nope. I presume you can log in to your web server using ssh or telnet or
> similar. In which case you do so. Then use the commands
>
> cd {wherever}/cgi-bin
> chmod +x test.py
>
> to make the script executable, and th
Steve Holden wrote:
> If the script ran, you will now know waht version of Apaceh you're
> running with!
Well, the script did seem to run, but I'm still not sure if this is what
I'm ultimately after. This allows me to run Python script files, which
is good, but what I really want to do is writ
John Salerno wrote:
> Steve Holden wrote:
>
>
>>If the script ran, you will now know waht version of Apaceh you're
>>running with!
>
>
> Well, the script did seem to run, but I'm still not sure if this is what
> I'm ultimately after. This allows me to run Python script files, which
> is good
many people write test cases with python scripts.
in these test scripts, there are many validation statements,
for example, in unittest, failUnless(a == b),(a/b may be stringType or
intType...)
during running test scripts, if there is one exception raised from
failUnless, i still do not know a
Peter Hansen <[EMAIL PROTECTED]> wrote:
> Nick Craig-Wood wrote:
> > luca72 <[EMAIL PROTECTED]> wrote:
> >
> >> Thanks for your help, but it don't solve the problem.
> >> I receive only the echo and full stop.
> >
> > Try swapping pins 2 and 3 in the lead.
>
> Anything's possible, but given th
kanchy kang wrote:
> many people write test cases with python scripts.
> in these test scripts, there are many validation statements,
> for example, in unittest, failUnless(a == b),(a/b may be stringType or
> intType...)
>
> during running test scripts, if there is one exception raised from
> fail
__eq__ method can resolve this problem only for class object.
what can i do in the following case?
a = somefuction(...) #a is stringType
a == "1234"?
my simple requirement is:
in some validation statments, such as, failUnless(a == "1234")
if the result is true, it's OK. otherwise, it prints a au
Thank you for your suggestions!
From: Steve Holden <[EMAIL PROTECTED]>
To: kanchy kang <[EMAIL PROTECTED]>
CC: python-list@python.org
Subject: Re: May i customize basic operator (such as 1==3)?
Date: Wed, 22 Feb 2006 01:44:26 -0500
kanchy kang wrote:
many people write test cases with python s
You may get a significant boost by replacing the line:
w=w+ eta * (y*x - y**2*w)
with
w *= 1.0 - eta*y*y
w += eta*y*x
I ran a test on a similar expression and got 5 fold speed increase.
The dot() function runs faster if you compile with dotblas.
Nadav.
-Original Message-
From:
kanchy kang wrote:
> many people write test cases with python scripts.
> in these test scripts, there are many validation statements,
> for example, in unittest, failUnless(a == b),(a/b may be stringType or
> intType...)
>
> during running test scripts, if there is one exception raised from
> fa
201 - 233 of 233 matches
Mail list logo