Robert Kern wrote:
from numpy import *
y = [116, 114, 121, 32, 116, 104, 105, 115]
a = array(y, dtype=uint8)
z = a.tostring()
z
'try this'
Very nice! Thanks also to Paul and Travis!
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Instances of MyClass have a method that
returns another instance. Ignoring the details
of why I might wish to do this, I could
return MyClass()
or
return self.__class__()
I like that latter better. Should I?
Should I do something else altogether?
Thanks,
Alan Isaac
--
Bruno wrote:
This is usually known as a 'factory method'. You do realise that both
solutions are *not* strictky equilavent, do you?
Your point I believe is that after inheritance the factory method
in the subclass will still
return MyClass()
but will return an instance of the subclass if I
y
[116, 114, 121, 32, 116, 104, 105, 115]
z=''.join(chr(yi) for yi in y)
z
'try this'
What is an efficient way to do this if y is much longer?
(A numpy solution is fine.)
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Is it expected for access to set elements to be much
slower than access to list elements? Explanation?
Thanks,
Alan Isaac
t1=timeit.Timer(for i in set(xrange(1)):pass,)
t2=timeit.Timer(for i in list(xrange(1)):pass,)
t1.timeit(1000)
9.806250235714316
t2.timeit(1000)
Alan Isaac wrote:
The current situation is: use a loop because the obvious generator
approach is not efficient.
Fredrik Lundh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
not efficient compared to what ?
I already guess that I've missed your point, but to prove it...
I was
Paul M. wrote:
Random access to item in list/set when item exists
set - 0.000241650824337
list - 0.0245168031132
Random access to item in list/set when item does not exist
set - 0.000187733357172
list - 0.522086186932
OK, that's a much better set of answers
including to questions I did
I have not seen this posted and I kind of like it.
Shared for entertainment value only.
Alan Isaac
PS Easily adapted if the residual
group is not desired.
def groupsofsize(iterable,size):
itr = iter(iterable)
c=count()
for k,it in groupby(itr,lambda x:c.next()//size):
yield
Does George's example raise the question:
why do dictionaries not implement efficient creation
for two common cases?
- Making a dict from two sequences of the same length.
- Making a dict from a sequence and a function
(as in George's example in this thread).
The current situation is:
use a
This is important for my move to Python 2.5,
so I thought others might want to know...
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Alan Isaac [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Where does one get the
What's New document for Python 2.5?
http://docs.python.org/dev/whatsnew/whatsnew25.html
pretends to hold it, but the links are corrupt.
OK, here it is:
http://docs.python.org/whatsnew/whatsnew25.html
Suppose x and y are ints in moduleA.
If I put
from __future__ import division
in moduleA then x/y will produce the truediv result.
If I put
from __future__ import division
in moduleB
and
from moduleB import *
in module A
then x/y will NOT produce the truediv result
(in moduleA).
Why?
And is
Alan Isaac wrote:
Suppose x and y are ints in moduleA.
If I put
from __future__ import division
in moduleA then x/y will produce the truediv result.
If I put
from __future__ import division
in moduleB
and
from moduleB import *
in module A
then x/y will NOT produce the
Thanks to all for the suggestions and much else
to think about.
Summarizing:
Those who were willing to consider a database suggested:
anydbm
Gadfly
SQLite (included with Python 2.5)
Schevo
Some preferred using the file system.
The core suggestion was to choose a directory structure
along with
I have no experience with database applications.
This database will likely hold only a few hundred items,
including both textfiles and binary files.
I would like a pure Python solution to the extent reasonable.
Suggestions?
Thank you,
Alan Isaac
--
Suppose a class has properties and I want to change the
setter in a derived class. If the base class is mine, I can do this:
http://www.kylev.com/2004/10/13/fun-with-python-properties/
Should I? (I.e., is that a good solution?)
And what if I cannot change the base class?
How to proceed then?
Le mercredi 06 septembre 2006 16:33, Alan Isaac a écrit :
Suppose a class has properties and I want to change the
setter in a derived class. If the base class is mine, I can do this:
http://www.kylev.com/2004/10/13/fun-with-python-properties/
Should I? (I.e., is that a good solution?)
Maric
When I create an instance of a class,
are the class's functions *copied* to create the methods?
Or are method calls actually calls of the class's functions?
I am sure this is both obvious and FAQ,
but I did not find a clear answer
(e.g. here
I have a list of lists, N+1 deep.
Like this (for N=2):
[[['r00','g00','b00'],['r01','g01','b01']],[['r10','g10','b10'],['r11','g11'
,'b11']]]
I want to efficiently produce the same structure
except that the utlimate lists are replaced by a chosen (by index) item.
E.g.,
Alan Isaac wrote:
When I create an instance of a class,
are the class's functions *copied* to create the methods?
Or are method calls actually calls of the class's functions?
Diez B. Roggisch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On the class functions. You can make
Thanks to both Roberto and George.
I had considered the recursive solution
but was worried about its efficiency.
I had not seen how to implement the numpy
solution, which looks pretty nice.
Thanks!
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Alan Isaac wrote:
are method calls actually calls of the class's functions?
Bruno Desthuilliers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Depends on how the method was associated to the instance (you can set
methods on a per-instance property), but in the general case
I'm aware of
http://cheeseshop.python.org/pypi/pytnef/
but it uses the tnef utility, and I'd like a pure Python solution
(along the lines of http://www.freeutils.net/source/jtnef/ ).
Is there one?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Somewhat OT:
Just wondering if anyone is doing something cool
with the Python support in Mahogany mail.
If so, please describe it or post some code.
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Mark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I want to draw some shapes, such as lines, circles on an image.
http://www.pythonware.com/library/pil/handbook/psdraw.htm
hth,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
http://www.american.edu/econ/notes/soft.htm#EDITORS
has some relevant discussion and suggestions.
Cheers,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
I have a subclass of dict where __getitem__ returns None rather than
raising KeyError for missing keys. (The why of that is not important for
this question.)
I was delighted to find that __contains__ still works as before
after overriding __getitem__.So even though instance['key']
does not
Alan Isaac wrote:
I have a subclass of dict where __getitem__ returns None rather than
raising KeyError for missing keys. (The why of that is not important
for
this question.)
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Well, actually it may be important... What's so wrong with
Suppose I have inherited the structure
PackageFolder/
__init__.py
mod1.py
mod2.py
SubPackageFolder/
__init__.py
mod3.py
and mod3.py should really use a function in mod2.py.
*Prior* to Python 2.5, what is the best way to access that?
(Please
Simon Forman wrote:
I would assume (but I haven't checked) that this should work as long as
delmepy (in your case PackageFolder) was somewhere on sys.path.
Sorry that was not clear:
I do not want to make any assumptions about
this particular package being on sys.path.
(I want a relative import,
Alan wrote:
I do not want to make any assumptions about
this particular package being on sys.path.
(I want a relative import, but cannot assume 2.5.)
I should mention that to get around this I have
been using
sys.path.append(os.path.split(sys.argv[0])[0])
in the script I care most about. It
Suppose I have inherited the structure
PackageFolder/
__init__.py
mod1.py
SubPackageFolder/
__init__.py
mod2.py
mod3.py
When mod1 is run as a script,
I desire to import either mod2 or mod3 but not both
conditional on an option detected
To access the doc string of a property,
I have to use the class not an instance.
Why?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
(I was using *small* integers).
Fredrik Lundh [EMAIL PROTECTED] wrote:
small integers is what the phrase small integers in the small
integers and small integers parts of my reply referred too, of course.
But aren't *small* integers likely to be smaller than small integers?
Alan Isaac
--
Em Sex, 2006-06-09 às 12:30 -0400, Alan Isaac escreveu:
It's your code, so you get to license it.
But if you wish to solicit patches,
a more Pythonic license is IMHO more likely
to prove fruitful.
Felipe Almeida Lessa [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Pythonic
Johann C. Rocholl [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
What license would you suggest?
I recommend that you choose the license that will best achieve
your long run goals for the code. As I understand them, and
as I understand your application and software development,
this
Rob Cowie [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
alpha = ['a','b','c','d'] #shortened for brevity
alpha2 = ['a','b','c','d']
alpha3 = ['a','b','c','d']
def generator():
for char in alpha:
for char2 in alpha2:
for char3 in alpha3:
yield char + char2
alpha = string.lowercase
x=(a+b+c for a in alpha for b in alpha for c in alpha)
--
http://mail.python.org/mailman/listinfo/python-list
vasudevram [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
http://sourceforge.net/projects/xtopdf
Serendipity:
I was just looking for this functionality.
Thanks!
So here is an idea for a great enhancement:
rst - PDF
The good news: the project is all Python,
so you will only have to
Boris Borcic [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
after a while trying to find the legal manner to file numpy bug reports,
since it's a simple one, I thought maybe a first step is to describe the
bug
here. Then maybe someone will direct me to the right channel.
So, numpy
I am just starting to think about image processing.
What are the overlaps and differences in intended
functionality between FreeImagePy and PIL?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
1. Why is there no argmax built-in?
(This would return the index of the largest element in a sequence.)
2. Is this a good argmax (as long as I know the iterable is finite)?
def argmax(iterable): return max(izip( iterable, count() ))[1]
3. If this is the only place in a module where I need count
Thanks for all the replies.
A couple of comments.
1. I think the usefulness of an argmax built-in can be assessed
by looking at other languages (and e.g. at numpy). So I do not
buy the not needed argument as presented. More like haven't
got around to it, I'm thinking.
2. The particular use
Andy Sy wrote:
Don't be evil - always configure your editor to
convert tabs to true spaces.
achates [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Yet another space-indenter demonstrates that problem actually lies with
people who think that tab == some spaces.
Exactly.
John Salerno [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Is there a way to assign multiple variables to the same value, but so
that an identity test still evaluates to False?
Make sure the value is not a singleton.
Assign them one at a time.
w=1000
x=1000
w==x
True
w is x
RonnyM [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
e.g. y = [ 1, 2, 3, 4, 5, 6 ,7 ,8, 9 ]
ybar = [ 1, (1 + 3)*.5,(2 + 4)*.5,(3 + 5)*.5,..., (n-1 + n+1)*.5 ], n =
1,...len(y) -1
How do I make a vectorized version of this, I will prefer not to
utilize Map or similar functions,
Diez B. Roggisch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
it's considered bad style to use range if all you want is a
enumeration of indices, as it will actually create a list of the size you
specified. Use xrange in such cases.
I'm pretty sure this distinction goes away in
Ralph H. Stoos Jr. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
HELP PLEASE: What is wrong with this?File autotp.py, line 21
ready = raw_input(Ready to proceed ? TYPE (y)es or (n)o: )
^
Probably the parenthesis you forgot to close on the preceding line ...
Cheers,
Donn Cave, [EMAIL PROTECTED]
I suppose it isn't supported by the mailbox module basically because
it isn't all that commonly encountered. It may be more common on mail
servers, but there it's email net protocol data, POP or IMAP. If
Mahogany has been using this format for `local' folders
Alan asked:
2. If I really want a value True will I ever go astray with the test:
if a is True:
a = True
b = 1.
c = 1
a is True, b is True, c is True
(True, False, False)
Ziga Seilnacht [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I think that True and False,
Should I be able to access mail messages in Mahogany mail's mbx
format using the Python mailbox module? If so, can someone
please post a working example? If not, can you please
point me to documentation of the file format or better yet
Python code to parse it?
Thanks,
Alan Isaac
--
Alan Isaac [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Should I be able to access mail messages in Mahogany mail's mbx
format using the Python mailbox module? If so, can someone
please post a working example? If not, can you please
point me to documentation of the file format or
Aahz [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Because __slots__ breaks with inheritance.
I believe that was the point of Ziga's example,
which I acknowledged as a good one in my reply.
So there still appears to be this single reason, which
applies if your class may be
Ziga Seilnacht [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
a = 1
b = 1
a == b
True
a is b
False
Two follow up questions:
1. I wondered about your example,
and noticed
a = 10
b = 10
a is b
True
Why the difference?
2. If I really want a value True will I ever
Ziga Seilnacht [EMAIL PROTECTED] wrote:
If you want to restrict attribute asignment, you should use the
__setattr__ special method, see:
http://docs.python.org/ref/attribute-access.html
That should is what I am asking about. If I understand,
in the simplest case, you want me to say something
1. Without a __dict__ variable,
instances cannot be assigned new variables not listed in the __slots__
definition.
So this seemed an interesting restriction to impose in some instances,
but I've noticed that this behavior is being called by some a side effect
the reliance on which is considered
Laszlo Zsolt Nagy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I would like to use a numerical solver for a specific problem.
Another possibility:
http://nlpy.sourceforge.net/
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Benji York [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Here's a flagrant hack:
Admiration wins out over revulsion. ;-)
Thanks,
Alan Isaac
PS Here's the motivation. Python closely resembles pseudocode. With
a very little LaTeX hacking, it is often possible to write algorithms
Alan Isaac wrote:
I would like to be able to define a loop statement
(nevermind why) so that I can write something like
loop 10:
do_something
instead of
for i in range(10):
do_something
Possible? If so, how?
Jeffrey Schwab [EMAIL PROTECTED] wrote in message
I would like to be able to define a loop statement
(nevermind why) so that I can write something like
loop 10:
do_something
instead of
for i in range(10):
do_something
Possible? If so, how?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Alan Isaac wrote:
#evaluate polynomial (coefs) at x using Horner's rule
def horner(coefs,x): return reduce(lambda a1,a2: a1*x+a2,coefs)
It just cannot get simpler or more expressive.
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
But is it correct?
Yes.
Are we
Chris Mellon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
As someone who does a tremendous amount of event-driven GUI
programming, I'd like to take a moment to speak out against people
using us as a testament to the virtues of lamda. Event handlers are
the most important part of
Jibes against the lambda-clingers lead eventually to serious
questions of style in regard to variable namespacing,
lifespan, cleanup, and so on:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/ad0e15cb6b8f2c32/
Alan Isaac [EMAIL PROTECTED] wrote:
#evaluate
Cameron Laird [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Jibes against the lambda-clingers lead eventually to serious
questions of style in regard to variable namespacing,
lifespan, cleanup, and so on:
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
sufficiently similar
I think I understand your points now.
But I wanted to match these cases:
import operator
reduce(operator.add,[],42)
42
reduce(operator.add,[1],42)
43
The idea is that the i-th yield of i-reduce shd
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I think that the test for an empty iterator makes ireduce() unintuitive.
OK.
I misunderstood you point.
But that is needed to match the behavior of reduce.
reduce(operator.add,[],42)
42
Thanks,
Alan
--
Carl Waldbieser [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Does anyone know of any good examples for writing client side code to
upload
files over a secure FTP connection?
http://trevp.net/tlslite/
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'd rather have a second look whether the test is really needed.
That's too obscure of a hint.
Can you be a bit more explicit?
Here's an example (below).
You're saying I think that most of it is unnecessary.
Thanks,
Alan
def
Michael Spencer wrote:
This can be written more concisely as a generator:
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If iterable has no elements, I believe the behaviour should be [init],
there is also the case of init=None that needs to be handled.
Right. So it is more
Michael Spencer [EMAIL PROTECTED] wrote in message
news:mailman.1054.1132707811.18701.python- This can be written more
concisely as a generator:
import operator
def ireduce(func, iterable, init):
... for i in iterable:
... init = func(init, i)
... yield init
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
- allows arbitrary iterables, not sequences only
- smaller memory footprint if sequential access to the items is sufficient
Sure; I meant aside from that.
- fewer special cases, therefore
- less error prone, e. g.
+
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Of course nothing can beat a plain old for loop in terms of readability
and
-- most likely -- speed.
Here are two versions, meant to be comparable.
Thanks,
Alan Isaac
def cumreduce(func, seq, init = None):
cr = seq[:]
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
You are in for a surprise here:
You got that right!
def empty():
... for item in []:
... yield item
...
bool(empty())
True
Ouch.
bool(iter([]))
True # python 2.3 and probably 2.5
Duncan Booth [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
aList = ['a', 1, 'b', 2, 'c', 3]
it = iter(aList)
zip(it, it)
[('a', 1), ('b', 2), ('c', 3)]
That behavior is currently an accident.
http://sourceforge.net/tracker/?group_id=5470atid=105470func=detailaid=1121416
Alan
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
He seems to want scanl
Yes. But it's not in Python, right?
(I know about Keller's version.)
Robert Kern wrote:
Define better. More accurate? Less code?
Good point.
As Bonono (?) suggested: I'd most like a solution that
relies on a
Alan Isaac wrote:
Like SciPy's cumsum.
Colin J. Williams [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Doesn't numarray handle this?
Sure.
One might say that numarray is in the process of becoming scipy.
But I was looking for a solution when these are available.
Something like:
What's the good way to produce a cumulative sum?
E.g., given the list x,
cumx = x[:]
for i in range(1,len(x)):
cumx[i] = cumx[i]+cumx[i-1]
What's the better way?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
What's the standard replacement for the obsolete grep module?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
hrh1818 [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
There is a module named pymat avvailable from
http://sourceforge.net/projects/pymat that provides a limited set of
functions for intertfacing Python to Matlab.
I think that pymat was superceded by mlabwrap
Fredrik Lundh [EMAIL PROTECTED] wrote::
def grep(pattern, *files):
search = re.compile(pattern).search
for file in files:
for index, line in enumerate(open(file)):
if search(line):
print :.join((file, str(index+1), line[:-1]))
While pdftk is awesome
http://www.accesspdf.com/pdftk/
I am looking for a Python solution.
Just for PDF page extraction.
Any hope?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Casey Hawthorne [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
It's hard to make complete permutation generators, Knuth has a whole
fascicle on it - The Art of Computer Programming - Volume 4 Fascicle
2 - Generating All Tuples and Permutations - 2005
Can you elaborate a bit on
Eric Nieuwland [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a look at FTP/S right now. That's a little
more complicated, but it seems doable.
If I succeed, I guess I'll donate the stuff as an extension to ftplib.
Just found this:
http://trevp.net/tlslite/
I haven't
http://www.lag.net/paramiko/
Alan Isaac [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(20)
sock.connect((hostname, port))
my_t = paramiko.Transport(sock)
my_t.connect(hostkey=None ,username=username,
Talin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I wanted to share
this: a generator which returns all permutations of a list:
Try this instead:
def permuteg(lst): return ([lst[i]]+x
for i in range(len(lst))
for x in permute(lst[:i]+lst[i+1:])) \
or [[]]
David Isaac wrote:
I am looking for a pure Python secure ftp solution.
Does it exist?
Andrew MacIntyre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I recall coming across an extension package (pretty sure it wasn't pure
Python anyway, certainly not for the SSL bits) with SFTP
I am looking for a pure Python secure ftp solution.
Does it exist?
I would have thought that the existence of OpenSSL
would imply yes but I cannot find anything.
ftplib does not seem to provide any secure services.
I know about fptutil
http://codespeak.net/mailman/listinfo/ftputil
but that does
Eric Nieuwland [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Do you want SFTP or FTP/S?
The latter.
I'm having a look at FTP/S right now. That's a little
more complicated, but it seems doable.
If I succeed, I guess I'll donate the stuff as an extension to ftplib.
Great!
Please
Why is a MultiFile object not an iterator?
For example if
mfp = multifile.MultiFile(fp)I cannot dofor line in mfp:
do_somethingRelated:MultiFile.next seems badly named.(Something like
next_section would be better.)Is this just historical accident or am I
missing the point?Thanks,Alan Isaac
--
Newbie question:
I have been generally open to the proposal that list comprehensions
should replace 'map', but I ran into a need for something like
map(None,x,y)
when len(x)len(y). I cannot it seems use 'zip' because I'll lose
info from x. How do I do this as a list comprehension? (Or,
more
Ric Deez [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a list:
L1 = [1,1,1,2,2,3]
How can I easily turn this into a list of tuples where the first element
is the list element and the second is the number of times it occurs in
the list (I think that this is referred to as a
niXin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Can anyone direct me to where I can find free software to do the
following:
Document Management Software
---
1. Written in PHP or Python
2. scanning feature - where I can scan a document
Why don't tuples support an index method?
It seems natural enough ...
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Alan Isaac wrote:
Default parameter values are
evaluated once when the function definition is
executed. Where are they stored? ... Where is this documented?
Forgive any poor phrasing: I'm not a computer science type.
At http://www.network-theory.co.uk/docs/pytut/tut_26.html we read:
The
Alan Isaac wrote:
Default parameter values are evaluated once when the function definition
is
executed. Where are they stored? ... Where is this documented?
Forgive any poor phrasing: I'm not a computer science type.
At http://www.network-theory.co.uk/docs/pytut/tut_26.html we read:
The
Default parameter values are evaluated once when the function definition is
executed.
Where are they stored? (A guess: in a dictionary local to the function.)
Where is this documented?
As a Python newbie I found this behavior quite surprising.
Is it common in many other languages?
Is it
I'm looking for the Python equivalent of the perl script and module
described at
http://comments.gmane.org/gmane.mail.imap.uw.c-client/707
Any hope?
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
Donn Cave [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
All mbx files start with a 2048 byte
header, and a valid header can be copied to another
file and still be valid. For example, if the damaged
file still has 2048 bytes of header,
1. Find or create another mbx file
phil [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Using Tkinter Canvas to teach High School Geometry
with A LOT of success.
Can you post a link to your code.
I'd like to see what you are doing.
Thx,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
I'm looking for a Python script to repair the mbx header
for a mail file where only the header is corrupted.
Thanks,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 110 matches
Mail list logo