http://www.joelonsoftware.com/items/2003/10/13.html
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis wrote:
> "Jacob Page" <[EMAIL PROTECTED]> wrote:
>
>>I selected option one; Intervals are immutable. However, this doesn't
>>mean that __add__ has to go, as that function has no side-effects. The
>>reason I chose option one was because it's uncommon for a mathematical
>>operation o
Daniel Bickett wrote:
> I neglected to mention an important fact, and that is the fact that I
> am limited to Apache, which elminates several suggestions (that are
> appreciated none-the-less).
Do you have access to mod_python, mod_rewrite, FastCGI, or SCGI? Then
CherryPy 2.1 is still a great opti
"Jacob Page" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > As I see it, there are two main options you have:
> >
> > 1. Keep Intervals immutable and pass all the responsibility of
> > combining them to IntervalSet. In this case Interval.__add__ would have
> > to go. This is simple to imple
Bengt Richter wrote:
> ;-)
> We have
Have we?
Looks like not a lot of interested takers so far.
But I'll bite. ;-)
> So why not
>
> @deco
> foo = lambda:pass
> equivalent to
> foo = deco(lambda:pass)
>
> and from there,
> @deco
> =
> being equivalent to
> = deco(
> I stripped your code down to the essence. See attachment.
> For the user your approach then becomes:
>
> class grouping:
> __metaclass__ = autoattr
> def __init__(self, x, y, z):
> pass
No. This is clearly NOT what I had in mind. I translated your original
proposal which introdu
I have python2.4.1 installed on two machines:
-- one is Fedora core 1, where the bsddb module works fine
-- one is Redhat ES 3.0, and I installed mysql 4.1 (and
mysql-python2.1) after putting the newer python on the machine.
python2.2, which came with Redhat ES, works fine, so I suppose I
messed
I neglected to mention an important fact, and that is the fact that I
am limited to Apache, which elminates several suggestions (that are
appreciated none-the-less).
--
Daniel Bickett
dbickett at gmail.com
http://heureusement.org/
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger wrote:
> [Steven Bethard]
>
>>I would hope that in Python 3.0 list comprehensions and generator
>>expressions would be able to share a large amount of implementation, and
>>thus that the speed differences would be much smaller. But maybe not...
>
> Looking under the hood, you w
Steve Juranich <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> I was wondering how true this holds for Python, where exceptions are
> such an integral part of the execution model. It seems to me, that if
> I'm executing a loop over a bunch of items, and I expect some
> condition to hold f
I see a total of 12 posts and 8 users.
--
http://mail.python.org/mailman/listinfo/python-list
Throne Software has opened up a Python Forum at:
http://www.thronesoftware.com/forum/
Join us!
--
http://mail.python.org/mailman/listinfo/python-list
I'm a total Python newbie, so bear with me here...
I'm writing a program that has a user-configurable, module-based
architecture. it's got a directory where modules are stored (.py files)
which subclass one of several master classes.
My plan is to have the program go into the folder called "Modul
[Raymond Hettinger]
> > It is darned inconvenient to get an iterator when you really
> > need a list, when you want to slice the result, when you want to see a
> > few elements through repr(), and when you need to loop over the
> > contents more than once.
[George Sakkis]
> Similar arguments can b
[Steven Bethard]
> I would hope that in Python 3.0 list comprehensions and generator
> expressions would be able to share a large amount of implementation, and
> thus that the speed differences would be much smaller. But maybe not...
Looking under the hood, you would see that the implementations
On Sat, 09 Jul 2005 23:10:49 +0200, Thomas Lotze wrote:
> Steve Juranich wrote:
>
>> I was wondering how true this holds for Python, where exceptions are such
>> an integral part of the execution model. It seems to me, that if I'm
>> executing a loop over a bunch of items, and I expect some cond
Alex Gittens wrote:
> I would like my program to accept a list of range values on the
> command line, like
> -a 1
> -a 1-10
> -a 4,5,2
>
> In the interest of avoiding reinventing the wheel, is there already
> available code for a callback that would enable optparse to parse
> these as arguments?
Daniel Bickett wrote:
> Python using CGI, for example, was enough for him until he started
> getting 500 errors that he wasn't sure how to fix.
Every time you mention web applications on this list, there will
necessarily be a flood of My Favourite Framework Is X posts.
But you* sound like you do
Raymond Hettinger wrote:
> The root of this discussion has been the observation that a list
> comprehension can be expressed in terms of list() and a generator
> expression.
As George Sakkis already noted, the root of the discussion was actually
the rejection of the dict comprehensions PEP.
> Ho
Devan L wrote:
import timeit
t1 = timeit.Timer('list(i for i in xrange(10))')
t1.timeit()
>
> 27.267753024476576
>
t2 = timeit.Timer('[i for i in xrange(10)]')
t2.timeit()
>
> 15.050426800054197
>
t3 = timeit.Timer('list(i for i in xrange(100))')
t3.timeit()
>
> 117
After some feedback from this newsgroup, I've updated and renamed the
iset module to the interval module. Many of the names within the module
have also changed, and I've refactored a lot of the code. The updated
version can be found at http://members.cox.net/apoco/interval/, as well
as a chan
Scott David Daniels wrote:
> Ron Adam wrote:
>
>> George Sakkis wrote:
>>
>>> I get:
>>>
>>> None: 0.54952316
>>> String: 0.498000144958
>>> is None: 0.45047684
>>
>>
>>
>> What do yo get for "name is 'string'" expressions?
>
>
> >>> 'abc' is 'abcd'[:3]
> False
Well of course it
George Sakkis wrote:
> "Jacob Page" <[EMAIL PROTECTED]> wrote:
>
>>I think I will keep Interval exposed. It sort of raises a bunch of
>>hard-to-answer design questions having two class interfaces, though.
>>For example, would Interval.between(2, 3) + Interval.between(5, 7) raise
>>an error (as it
Roy Smith wrote:
> Well, you've now got a failure. I used to write Fortran on punch cards,
which were then fed into an OCR gadget? That's an efficient approach --
where I was, we had to write the FORTRAN [*] on coding sheets; KPOs
would then produce the punched cards.
[snip]
>
> 3) In some
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Grant Edwards a écrit :
>> On 2005-07-09, Brian <[EMAIL PROTECTED]> wrote:
>>
>>
folks as an easily acquired extra skill.
>>>
>>>I agree 100% with your statement above. Python may not be sufficient
>>>for being the
--- Scott David Daniels <[EMAIL PROTECTED]> wrote:
> Should be:
> class autoinit(object):
> def __init__(self, *args, **keyword_args):
> for name, value in zip(self.__autoinit__.im_func.func_code.
> co_varnames[1:], args):
>
Ralf W. Grosse-Kunstleve wrote:
> My initial proposal
> (http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't
> exactly get a warm welcome...
>
> And Now for Something Completely Different:
>
> class autoinit(object):
>
> def __init__(self, *args, **keyword_args):
> self
Sorry, I forgot the attachment.
Sell on Yahoo! Auctions no fees. Bid on great items.
http://auctions.yahoo.com/import sys, os
class plain_grouping:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z =
--- Kay Schluehr <[EMAIL PROTECTED]> wrote:
> Ralf, if you want to modify the class instantiation behaviour you
I don't. I simply want to give the user a choice:
__init__(self, ...) # same as always (no modification)
or
__autoinit__(self, ...) # self.x=x job done automatically and efficie
Try Karrigell ( http://karrigell.sourceforge.net ).
And let me know what you think...
Cheers,
Luis
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Bickett wrote:
> He would read the documentation of Nevow, Zope, and Quixote, and would
> find none of them to his liking because:
>
> * They had a learning curve, and he was not at all interested, being
> eager to fulfill his new idea for the web app. It was his opinion that
> web programmi
Ron Adam wrote:
> George Sakkis wrote:
>
>> I get:
>>
>> None: 0.54952316
>> String: 0.498000144958
>> is None: 0.45047684
>
>
> What do yo get for "name is 'string'" expressions?
>>> 'abc' is 'abcd'[:3]
False
You need to test for equality (==), not identity (is) when
equal t
Daniel Bickett wrote:
> He would read the documentation of Nevow, Zope, and Quixote, and would
> find none of them to his liking because:
>
> * They had a learning curve, and he was not at all interested, being
> eager to fulfill his new idea for the web app. It was his opinion that
> web programm
I would like my program to accept a list of range values on the
command line, like
-a 1
-a 1-10
-a 4,5,2
In the interest of avoiding reinventing the wheel, is there already
available code for a callback that would enable optparse to parse
these as arguments?
Thanks,
Alex
--
ChapterZero: http://t
enas khalil wrote:
> dear all
> could you tell me how can i fix this error appears when i try to import
> modules from nltk
> as follows
>
> from nltk.probability import ConditionalFreqDist
> Traceback (most recent call last):
> File "", line 1, in -toplevel-
> from nltk.probability impor
Thomas Lotze wrote:
> Steve Juranich wrote:
>>What do I mean by "cheaper"? I'm basically talking about the number of
>>instructions that are necessary to set up and execute a try block as
>>opposed to an if block.
>
> I don't know about the implementation of exceptions but I suspect most
> of wha
Take some time to learn one of the web frameworks. If your host doesn't
already have it, ask your host if they would consider adding it.
--
http://mail.python.org/mailman/listinfo/python-list
Steve Juranich wrote:
> I was wondering how true this holds for Python, where exceptions are such
> an integral part of the execution model. It seems to me, that if I'm
> executing a loop over a bunch of items, and I expect some condition to
> hold for a majority of the cases, then a "try" block
;-)
We have
@deco
def foo(): pass
as sugar (unless there's an uncaught exception in the decorator) for
def foo(): pass
foo = deco(foo)
The binding of a class name is similar, and class decorators would seem
natural, i.e.,
@cdeco
class Foo: pass
for
class Foo: pass
dear all
could you tell me how can i fix this error appears when i try to import modules from nltk
as follows
from nltk.probability import ConditionalFreqDist
Traceback (most recent call last): File "", line 1, in -toplevel- from nltk.probability import ConditionalFreqDist File "C:\Python
"Thorsten Kampe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>* Steve Juranich (2005-07-09 19:21 +0100)
>> I know that this topic has the potential for blowing up in my face,
>> but I can't help asking. I've been using Python since 1.5.1, so I'm
>> not what you'd call a "n00b". I
This post started as an incredibly long winded essay, but halfway
through I decided that was a terribly bad idea, so I've trimmed it
down dramatically, and put it in the third person (for humor's sake).
Once upon a time a boy named Hypothetical programmed in PHP and made
many a web application.
I
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> My shot would be to test it like this on your platform like this:
>
> #!/usr/bin/env python
> import datetime, time
> t1 = datetime.datetime.now()
> for i in [str(x) for x in range(100)]:
> if int(i) == i:
> i + 1
>
* Steve Juranich (2005-07-09 19:21 +0100)
> I know that this topic has the potential for blowing up in my face,
> but I can't help asking. I've been using Python since 1.5.1, so I'm
> not what you'd call a "n00b". I dutifully evangelize on the goodness
> of Python whenever I talk with fellow deve
"Steve Juranich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Without fail, when I start talking with some of the "old-timers"
> (people who have written code in ADA or Fortran), I hear the same
> arguments that using "if" is "better" than using "try". I think that
> the argumen
Grant Edwards a écrit :
> On 2005-07-09, Brian <[EMAIL PROTECTED]> wrote:
>
>
>>>folks as an easily acquired extra skill.
>>
>>I agree 100% with your statement above. Python may not be sufficient
>>for being the only programming language that one needs to know -- yet,
>>it does come in VERY ha
[EMAIL PROTECTED] a écrit :
> My shot would be to test it like this on your platform like this:
>
> #!/usr/bin/env python
> import datetime, time
Why not use the timeit module instead ?
> t1 = datetime.datetime.now()
> for i in [str(x) for x in range(100)]:
A bigger range (at least 10/100x mor
"Tim Peters" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [Donn Cave]
>> I ran into a phenomenon that seemed odd to me, while testing a
>> build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
>>
>> test_builtin.py, for example, fails a couple of tests with errors
>> claiming that
Hi all,
How do I make Python get a def? Is it the "get" function, or something
else? I need to know so that I can get a def for that computer
MasterMind(tm) game that I'm writing.
BTW, I took your advice, and wrote some definitions for my Giant
Calculator program. Might make the code eas
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> My shot would be to test it like this on your platform like this:
>
> #!/usr/bin/env python
> import datetime, time
> t1 = datetime.datetime.now()
> for i in [str(x) for x in range(100)]:
> if int(i) == i:
> i + 1
> t2 = datetime.
Steve Juranich <[EMAIL PROTECTED]> wrote:
> Without fail, when I start talking with some of the "old-timers"
> (people who have written code in ADA or Fortran), I hear the same
> arguments that using "if" is "better" than using "try".
Well, you've now got a failure. I used to write Fortran on pun
My shot would be to test it like this on your platform like this:
#!/usr/bin/env python
import datetime, time
t1 = datetime.datetime.now()
for i in [str(x) for x in range(100)]:
if int(i) == i:
i + 1
t2 = datetime.datetime.now()
print t2 - t1
for i in [str(x) for x in range
I'm working on my monthly column for Software Test & Performance
magazine, and I'd like your input. The topic, this time around, is unit
testing (using python or anything else). Care to share some of your
hard-won knowledge with your peers?
In particular, what I'm looking for are experiences and a
Python is compiling the files with absolute paths because it is much
faster to load a file when you know where it is, than to have to find
it and then load it.
I'm guessing you're wondering this so you can distribute it compiled or
such? If so, I wouldn't do that in the first place. Python's compi
"Jacob Page" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > There are several possible use cases where dealing directly with
> > intervals would be appropriate or necessary, so it's good to have them
> > supported directly by the module.
>
> I think I will keep Interval exposed. It sort of
Honestly, I'm rather new to python, but my best bet would be to create
some test code and time it.
--
http://mail.python.org/mailman/listinfo/python-list
You provided far too little information for us to be able to help.
If you are using smtplib, it doesn't even look at message's headers to
find the recipient list; you must use the rcpt() method to specify each
one. If you are using the sendmail method, the "to_addrs" list has no
relationship to t
George Sakkis wrote:
> "Jacob Page" <[EMAIL PROTECTED]> wrote:
>
>>George Sakkis wrote:
>>
>>>1. As already noted, ISet is not really descriptive of what the class
>>>does. How about RangeSet ? It's not that long and I find it pretty
>>>descriptive. In this case, it would be a good idea to change
On Fri, 08 Jul 2005 22:43:55 +0300, Elmo Mäntynen <[EMAIL PROTECTED]>
wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>> Import Error: no module named PP2E.launchmodes
>>
>> However if I copy launchmodes.py into my work directory, it imports
>> successfully.
>>
>> Both "Examples" abov
"Kay Schluehr" <[EMAIL PROTECTED]> writes:
> Kirk Job Sluder schrieb:
> > In what way do lisp macros prevent the creation of modular libraries?
> > Common Lisp does does have mechanisms for library namespaces, and in
> > practice a macro contained within a library is not that much different
> > fr
I know that this topic has the potential for blowing up in my face,
but I can't help asking. I've been using Python since 1.5.1, so I'm
not what you'd call a "n00b". I dutifully evangelize on the goodness
of Python whenever I talk with fellow developers, but I always hit a
snag when it comes to d
[EMAIL PROTECTED] wrote:
> Hi all, Any one got idea about how to set undisclosed recipient? I put
> all recipient in BCC field while the To field don't want to leave
> blank. but neither fail to place an empty email address nor i don't
> want to put my own email address inside. www.bartekrr.info
J
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's funny how one of the
> arguments for removing lambda -- you can do the same by defining a
> named function -- does not apply for list comprehensions.
Which is a point a number of people have made many times,
with
Jeff Hobbs wrote:
> chand wrote:
> > can anyone help me how to provide the info about the python file
> > procedure in the tcl script which uses tclpython i.e., is there a way
> > to import that .py file procedure in the tcl script
>
> >>>currently I have wriiten this tcl code which is not working
On Sat, 09 Jul 2005 06:17:20 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
>On Fri, 8 Jul 2005 21:21:36 -0500, Alex Gittens <[EMAIL PROTECTED]> wrote:
>
>>I'm trying to define a function that prints fields of given widths
>>with specified alignments; to do so, I wrote some helper functions
>>neste
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote:
> In all probability, both list comprehensions and generator expressions
> will be around in perpetuity. List comps have been a very successful
> language feature.
>
> The root of this discussion has been the observation that a list
> comprehension c
Hi all, Any one got idea about how to set undisclosed recipient? I put
all recipient in BCC field while the To field don't want to leave
blank. but neither fail to place an empty email address nor i don't
want to put my own email address inside. www.bartekrr.info
--
http://mail.python.org/mailman
On 2005-07-09, Brian <[EMAIL PROTECTED]> wrote:
> > folks as an easily acquired extra skill.
>
> I agree 100% with your statement above. Python may not be sufficient
> for being the only programming language that one needs to know -- yet,
> it does come in VERY handy for projects that need to p
"Jacob Page" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > 1. As already noted, ISet is not really descriptive of what the class
> > does. How about RangeSet ? It's not that long and I find it pretty
> > descriptive. In this case, it would be a good idea to change Interval
> > to Range to
Raymond Hettinger wrote:
> So, I would recommend Python to these
> folks as an easily acquired extra skill.
I agree 100% with your statement above. Python may not be sufficient
for being the only programming language that one needs to know -- yet,
it does come in VERY handy for projects that
Quoth Dave Cook <[EMAIL PROTECTED]>:
| On 2005-07-08, Charlie Calvert <[EMAIL PROTECTED]> wrote:
|
|> I perhaps rather foolishly wrote two article that mentioned Python as a
|> good alternative language to more popular tools such as C# or Java. I
|
| Sounds like a really hidebound bunch over ther
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In all probability, both list comprehensions and generator expressions
> will be around in perpetuity. List comps have been a very successful
> language feature.
>
> The root of this discussion has been the observat
[Donn Cave]
> I ran into a phenomenon that seemed odd to me, while testing a
> build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
>
> test_builtin.py, for example, fails a couple of tests with errors
> claiming that apparently identical floating point values aren't equal.
> But it only does that
On 9 Jul 2005 05:26:46 -0700, [EMAIL PROTECTED] wrote:
>Alex Gittens wrote:
>
>> I'm getting an UnboundLocalError
>
>> def fieldprint(widths,align,fields): [...]
>> def cutbits(): [...]
>> fields = fields[widths[i]:]
>
>There's your problem. You are assigning 'fields' a completely new
On Sat, 09 Jul 2005 10:16:17 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote:
>Bengt Richter wrote:
>> On Fri, 08 Jul 2005 22:29:30 -0600, Steven Bethard <[EMAIL PROTECTED]> wrote:
>>>(1) There's no reason to get uncomfortable even if they're removed.
>>>You'd just replace [] with list().
>>
>> So
The posts do share an erroneous, implied assumption that the investment
in learning each language is equal. Python has a strong competitive
advantage over Java and C++ in terms of learnability. A person can get
up to speed in a few days with Python. That certainly is not true for
C++ which is mo
Dennis Lee Bieber wrote:
> > On 7/8/05, Einstein, Daniel R <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hi,
> > >
> > > Sorry for this, but I need to write ASCII from my Python to be read by
> > > FORTRAN and the formatting is very important. Is there any way of doing
> > > anything like:
> > >
>
Ok, dennis, your solution may be better, but is quite dangerous:
Python can't handle if there is exactly 3 arguments passed to the
function. The created code is correct but the error will appear when
your run Fortran.
Cyril
On 7/9/05, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Fri, 8 Jul 2
In all probability, both list comprehensions and generator expressions
will be around in perpetuity. List comps have been a very successful
language feature.
The root of this discussion has been the observation that a list
comprehension can be expressed in terms of list() and a generator
expressi
David Siroky wrote:
> When I "compile" my python files with "python -OO " into pyo files
> then they still contain absolute paths of the source files which is
> undesirable for me. How can I deal with that?
Don't do that?
Delete the pyo files?
Stop using Python?
I could guess at a few more
Bengt Richter wrote:
> On Fri, 08 Jul 2005 22:29:30 -0600, Steven Bethard <[EMAIL PROTECTED]> wrote:
>>(1) There's no reason to get uncomfortable even if they're removed.
>>You'd just replace [] with list().
>
> So list(1, 2, 3) will be the same as [1, 2, 3] ??
No, the discussion is about list c
Hi!
When I "compile" my python files with "python -OO " into pyo files
then they still contain absolute paths of the source files which is
undesirable for me. How can I deal with that?
Thank you.
David
--
http://mail.python.org/mailman/listinfo/python-list
Donn Cave wrote:
> I ran into a phenomenon that seemed odd to me, while testing a
> build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
>
> test_builtin.py, for example, fails a couple of tests with errors
> claiming that apparently identical floating point values aren't equal.
> But it only does
Ralf W. Grosse-Kunstleve schrieb:
> My initial proposal
> (http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't
> exactly get a warm welcome...
Well ... yes ;)
Ralf, if you want to modify the class instantiation behaviour you
should have a look on metaclasses. That's what they
Florian Lindner wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> Hello,
> I try to compute SHA hashes for different files:
>
>
> for root, dirs, files in os.walk(sys.argv[1]):
> for file in files:
> path = os.path.join(root, file)
> print path
> f = open(path)
Alex Gittens wrote:
> I'm getting an UnboundLocalError
> def fieldprint(widths,align,fields): [...]
> def cutbits(): [...]
> fields = fields[widths[i]:]
There's your problem. You are assigning 'fields' a completely new
value. Python doesn't allow you to rebind a variable from an oute
On 2005-07-08, Thomas Bartkus <[EMAIL PROTECTED]> wrote:
> Why would I want to "import pygtk" with it's single function
> "require(version)"?
> What is it supposed to do? Where does it fit in?
The only reason I can think of is to use pygtk.require, so you can specify
which major version of pygtk
On Sat, 09 Jul 2005 13:49:12 +0200,
Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> I try to compute SHA hashes for different files:
> for root, dirs, files in os.walk(sys.argv[1]):
> for file in files:
> path = os.path.join(root, file)
> print path
> f = open(
Florian Lindner wrote:
> Hello,
> I try to compute SHA hashes for different files:
>
>
> for root, dirs, files in os.walk(sys.argv[1]):
> for file in files:
> path = os.path.join(root, file)
> print path
> f = open(path)
print "sha is", repr(sha) ### self-help !!!
Florian Lindner wrote:
> sha = sha.new(f.read())
> this generates a traceback when sha.new() is called for the second time
You have reassigned the variable 'sha'.
First time around, sha is the sha module object as obtained by 'import
sha'. Second time around, sha is the SHA hashing obje
On 2005-07-08, Charlie Calvert <[EMAIL PROTECTED]> wrote:
> I perhaps rather foolishly wrote two article that mentioned Python as a
> good alternative language to more popular tools such as C# or Java. I
Sounds like a really hidebound bunch over there. Good luck.
Dave Cook
--
http://mail.pyt
Harlin Seritt wrote:
> Hi,
>
> I am using CherryPy to make a very small Blog web app.
>
> Of course I use a textarea input on a page to get some information.
> Most of the time when text is entered into it, there will be carriage
> returns.
>
> When I take the text and then try to re-write it ou
Hello,
I try to compute SHA hashes for different files:
for root, dirs, files in os.walk(sys.argv[1]):
for file in files:
path = os.path.join(root, file)
print path
f = open(path)
sha = sha.new(f.read())
sha.update(f.read())
print sha.hexdigest
Hi,
I am using CherryPy to make a very small Blog web app.
Of course I use a textarea input on a page to get some information.
Most of the time when text is entered into it, there will be carriage
returns.
When I take the text and then try to re-write it out to output (in html
on a web page), I
Florian Lindner wrote:
> Hello,
> IIRC there is a directory traverser for walking recursively through
> subdirectories in the standard library. But I can't remember the name and
> was unable to find in the docs.
Where did you look? How did you look?
> Anyone can point me to it?
Did you try Googl
Hi,
I am proud to announce the availability of eric3 3.7.1. This is a bug fix
release which fixes a severe bug next to some normal ones.
NOTE: Everybody using 3.7.0 or 3.6.x should upgrade.
It is available via http://www.die-offenbachs.de/detlev/eric3.html.
What is it?
---
Eric3 is a Py
Hello,
IIRC there is a directory traverser for walking recursively through
subdirectories in the standard library. But I can't remember the name and
was unable to find in the docs.
Anyone can point me to it?
Thanks,
Florian
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis wrote:
> 1. As already noted, ISet is not really descriptive of what the class
> does. How about RangeSet ? It's not that long and I find it pretty
> descriptive. In this case, it would be a good idea to change Interval
> to Range to make the association easier.
The reason I decided
My initial proposal
(http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't
exactly get a warm welcome...
And Now for Something Completely Different:
class autoinit(object):
def __init__(self, *args, **keyword_args):
self.__dict__.update(
zip(self.__autoinit__.im_fun
Erik Max Francis wrote:
> ... modern versions of
> Python allow iteration over a file, which will read it line by line:
>
> for line in aFile:
> ...
>
Thanks! Just what I need.
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 107 matches
Mail list logo