The second edition of the programming contest TopDev2006 will take
place on January 28th-29th 2006.
This contest is original by its independance from any languages. The
winners will not be the fastest programmer, but the ones who will
propose the greatest technical solution with the most complete
The definitive 2.2 version of Karrigell, a Python web framework, has
been released at http://karrigell.sourceforge.net
The main changes in this version are the support of Virtual Hosts and
the inclusion of the Cheetah templating system
This final release fixes 2 bugs, one in the asynchronous
Tom Anderson wrote:
Incidentally, can we call that the Larosa-Foord ordered mapping?
The implementation, sure.
Then it sounds like some kind of rocket science discrete mathematics stuff
But math folks usually name things after the person(s) who came
up with the idea, not just some random
Alex Martelli schrieb:
Perl hashes now keep track of 'order of keys'? That's new to me, they
sure didn't back when I used Perl!
Maybe I shouldn't have talked about Perl when I'm an ignoramus about
that language... You're right, Perl has unordered arrays. That was new
to me since I associate
Martin v. Löwis wrote:
Simon Burton wrote:
I'm having some trouble linking one extension module to another because
the linker expects a lib prefix and my python modules cannot have
this prefix.
This is a Good Thing (tm) :-) Don't link extension modules to each
other; this is really
Magnus Lycka wrote:
Actually, I guess it's possible that sorted() is done so
that it works like below, but I don't think pre-sorted()
versions of Python support keyword arguments to list.sort()
anyway...
def sorted(l, *p, **kw): s=l[:];s.sort(*p, **kw);return s
One part you missed, sorted
Bengt Richter schrieb:
Ok, so if not in the standard library, what is the problem? Can't find what
you want with google and PyPI etc.? Or haven't really settled on what your
_requirements_ are? That seems to be the primary problem people who complain
with why no sprollificator mode? questions.
Alex Martelli wrote:
What about PHP? Thanks!
according to some random PHP documentation I found on the intarweb:
An array in PHP is actually an ordered map. A map is a type that
maps values to keys.
and later:
A key may be either an integer or a string. If a key is the standard
Bengt Richter wrote:
d = OrderedDict(); d[1]='one'; d[2]='two' = list(d) = [1, 2]
ok, now we do d[1]='ein' and what is the order? list(d) = [2, 1] ??
Or do replacements not count as insertions?
If you simply set a value for a key that already exists, the order
should not be changed. I
Christoph Zwerschke wrote:
That would be also biased (in favour of Python) by the fact that
probably very little people would look for and use the package in the
cheese shop if they were looking for ordered dicts.
Does anyone actually use this site? While the Vaults offered a nice
place and a
Alex Martelli wrote:
Python 2.5 should introduce a 'with' statement that may go partways
towards meeting your qualms; it's an approved PEP, though I do not
recall its number offhand.
http://www.python.org/peps/pep-0343.html
(this is one in a series of PEP:s based on the observation that the
Christoph Zwerschke wrote:
Fredrik Lundh wrote:
[snip..]
You're right; I found creating a Larosa/Foord OrderedDict in this
example to be even 8 times slower than an ordinary dict. However, two
things need to be said here: 1) The dictionary in my exmaple was pretty
small (only 3 items), so you
David Isaac wrote:
[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
Ron,
I'm attempting to develop a plugin framework for an application that I'm
working on. I wish to develop something in which all plugins exist in a
directory tree.
The PIL of the effbot is doing exactly this. (Python Image Library). I
know it, because I had to work around that dynamic
Magnus Lycka wrote:
sorted_l = l.sort()
and while sorted_l would contain what one might expect, it
would in fact just be another name referencing exactly the
same sorted list as l, and it would probably be surprising
that l was also sorted, and that subsequent changes would
show up in both
Dan Lowe wrote
Replace with lt;
Replace with gt;
(where those abbreviations stand for less than and greater than)
Before: if x 5:
After: if x lt; 5:
Another common character in code that you should do similarly is
the double quote (). For that, use quot;
Before: if x == foo:
use (1,2) , (3,4)
Shi Mu [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
I run the following code and got wrong message, but I still want to
make [1,2],[4,3] and [6,9]
to be keys of the dictionary or change the style a little bit. How to do
that?
Thanks!
Kay Schluehr wrote:
Christoph Zwerschke wrote:
That would be also biased (in favour of Python) by the fact that
probably very little people would look for and use the package in the
cheese shop if they were looking for ordered dicts.
Does anyone actually use this site? While the Vaults
Dan Lowe wrote:
On Nov 22, 2005, at 12:30 AM, could ildg wrote:
Thank you~
It works!
but how can paste and , please?
these 2 symbols will also confuse wordpress and I can't publish
what I want.
Replace with lt;
Replace with gt;
(where those abbreviations stand for less than
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
so what would an entry-level Python programmer expect from this
piece of code?
for item in a.reverse():
print item
for item in a.reverse():
print item
I would expect it to first print a in reverse
Fredrik Lundh wrote:
so what would an entry-level Python programmer expect from this
piece of code?
for item in a.reverse():
print item
for item in a.reverse():
print item
I would expect it to first print a in reverse then a as it was.
a=[1,2,3]
I expect it to
[EMAIL PROTECTED] wrote:
so what would an entry-level Python programmer expect from this
piece of code?
for item in a.reverse():
print item
for item in a.reverse():
print item
I would expect it to first print a in reverse then a as it was.
a=[1,2,3]
I
On Tue, 22 Nov 2005 09:20:34 +0100, Fredrik Lundh wrote:
Tom Anderson wrote:
Incidentally, can we call that the Larosa-Foord ordered mapping?
The implementation, sure.
Then it sounds like some kind of rocket science discrete mathematics stuff
But math folks usually name things after
[EMAIL PROTECTED] wrote:
Since python's '=' is just name binding and that most objects(other
than those like int/float/string?) are mutable, I don't quite
understand why this is a gotcha that is so worrying.
a = [1,2,3]
a.sorted()
b = a
even an entry level python programmer can't expect
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
I was thinking of something along the lines of:
for (key,number) in list:
print key, number
but it's not working...
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
Christoph Zwerschke wrote:
But please see my other reply: If the dictionary has more than 3 items
(say 10 or 20), and an effective ordered dict is used, it's not really
a lot slower. At least if we are talking about a situation were on
demand is always. So, on the other side there isn't
Bengt Richter wrote:
Ok, so if not in the standard library, what is the problem? Can't find what
you want with google and PyPI etc.? Or haven't really settled on what your
_requirements_ are? That seems to be the primary problem people who complain
with why no sprollificator mode? questions.
metiu uitem wrote:
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
That's funny, I thought your subject line said 'list of tuples'. I'll
answer the question in the subject rather than the question in the body:
aList = ['a', 1,
Christoph Zwerschke wrote:
Bengt Richter schrieb:
Ok, so if not in the standard library, what is the problem? Can't find what
you want with google and PyPI etc.? Or haven't really settled on what your
_requirements_ are? That seems to be the primary problem people who complain
with why
Christoph Zwerschke wrote:
Fredrik Lundh wrote:
I'll repeat this one last time: for the use cases presented by Zwerschke
and bonono, using a list as the master data structure, and creating the
dictionary on demand, is a lot faster than using a ready-made ordered
dict implementation. if
On Tue, 22 Nov 2005 02:57:14 -0800, metiu uitem wrote:
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
def split_and_combine(L):
newL = []
for i in range(len(L)//2):
newL.append( [L[2*i], L[2*i+1]] )
return
metiu uitem wrote:
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
simplest possible (works in all Python versions):
L = ['a', 1, 'b', 2, 'c', 3]
out = []
for i in range(0, len(L), 2):
out.append(L[i:i+2])
Duncan Booth wrote:
metiu uitem wrote:
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
That's funny, I thought your subject line said 'list of tuples'. I'll
answer the question in the subject rather than the question in
metiu uitem wrote:
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
I was thinking of something along the lines of:
for (key,number) in list:
print key, number
but it's not working...
Thank you
Hi,
newList =
[EMAIL PROTECTED] wrote:
so what would an entry-level Python programmer expect from this
piece of code?
for item in a.reverse():
print item
for item in a.reverse():
print item
I would expect it to first print a in reverse then a as it was.
a=[1,2,3]
I expect it to print
3
2
Thanks for the answer... yes the example was wrong!
--
http://mail.python.org/mailman/listinfo/python-list
Hello All,
say you have some string: ['a', 'b', 1], foobar ['d', 4, ('a', 'e')]
Now i want to extract all substrings for which
isinstance(eval(substr), list) is True .
now one way is to walk through the whole sample string and check the
condition, I
was wondering if there is any smarter way of
David Isaac wrote:
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
Don't know about better, but this is what I came up with:
class PartialSum(object):
On Tue, 22 Nov 2005 11:11:23 +, Duncan Booth wrote:
aList = ['a', 1, 'b', 2, 'c', 3]
it = iter(aList)
zip(it, it)
[('a', 1), ('b', 2), ('c', 3)]
I'm not sure if I should fall to my knees in admiration of a Cool Hack,
or recoil in horror at a Bogus Kludge :-)
The code looks like it
I use Python 2.3 to run the following code:
a=[[1,2],[4,8],[0,3]]
a.sort()
a
[[0, 3], [1, 2], [4, 8]]
I wonder whether the sort function automatically consider the first
element in the list of list as the sorting criteria or it just happens
to be?
Thanks!
--
Thanks all,
I will use alltrue and allclose as Alex and Robert point out..
Cheers,
pujo
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 22 Nov 2005 16:57:41 +0530, Amit Khemka wrote:
Hello All,
say you have some string: ['a', 'b', 1], foobar ['d', 4, ('a', 'e')]
Now i want to extract all substrings for which
isinstance(eval(substr), list) is True .
That's an awfully open-ended question. Is there some sort of
I'm trying to wrap my head around the docs at python.org related to the
gettext-module, but I'm having some problem getting it to work. Is
there any really simple, step-by-step on how to use this module
available?
This is my script so far :
import gettext
gettext.install('test2', '.', unicode=1)
Duncan Booth wrote:
That's funny, I thought your subject line said 'list of tuples'. I'll
answer the question in the subject rather than the question in the body:
aList = ['a', 1, 'b', 2, 'c', 3]
it = iter(aList)
zip(it, it)
[('a', 1), ('b', 2), ('c', 3)]
yesterday, we got
On 22 Nov 2005 01:41:44 -0800,
Kay Schluehr [EMAIL PROTECTED] wrote:
Does anyone actually use this site? While the Vaults offered a nice
place and a nice interface the Cheese Shop has the appeal of a code
slum.
Looking at the Cheese Shop's home page at
Well actually the problem is I have a list of tuples which i cast as
string and then
put in a html page as the value of a hidden variable. And when i get
the string again,
i want to cast it back as list of tuples:
ex:
input: ('foo', 1, 'foobar', (3, 0)), ('foo1', 2, 'foobar1', (3, 1)),
('foo2', 2,
* Duncan Booth [EMAIL PROTECTED] wrote:
metiu uitem wrote:
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
That's funny, I thought your subject line said 'list of tuples'. I'll
answer the question in the subject
Amit Khemka wrote:
Well actually the problem is I have a list of tuples which i cast as
string and then put in a html page as the value of a hidden variable.
And when i get the string again, i want to cast it back as list of tuples:
ex:
input: ('foo', 1, 'foobar', (3, 0)), ('foo1', 2,
André Malo wrote:
* Duncan Booth [EMAIL PROTECTED] wrote:
metiu uitem wrote:
Say you have a flat list:
['a', 1, 'b', 2, 'c', 3]
How do you efficiently get
[['a', 1], ['b', 2], ['c', 3]]
That's funny, I thought your subject line said 'list of tuples'. I'll
answer the
In article [EMAIL PROTECTED],
Piet van Oostrum [EMAIL PROTECTED] wrote:
On http://www.zeroc.com/performance/ they compare it with TAO and it seems
to be faster. It looks also a bit simpler. I don't have experience with Ice
myself but a colleague of mine experimented with it and was
Shi Mu wrote:
I use Python 2.3 to run the following code:
a=[[1,2],[4,8],[0,3]]
a.sort()
a
[[0, 3], [1, 2], [4, 8]]
I wonder whether the sort function automatically consider the first
element in the list of list as the sorting criteria or it just happens
to be?
the documentation has the
Bengt Richter wrote:
On Mon, 21 Nov 2005 10:35:20 +0200, Sinan Nalkaya [EMAIL PROTECTED] wrote:
Dennis Lee Bieber wrote:
On Fri, 18 Nov 2005 22:45:37 -0500, Peter Hansen [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
It's quite unclear whether the last
It seems it doesnt implement ALL of the dictionary interface though.
dir({}) yields many more methods than dir(bsddb185.open(f)).
So bsddb185 is missing many of the methods that I am used
to in bsddb. I mentioned some above that are missing, pop()
in particular would be useful in my situation but
Hi,
here is an information for the people who must develop programs with
geodetic background and who asked me for a Englisch documentation of
the geodetic functions included in GeoDLL. The DLL is present now with
a complete English and German documentation!
In the Dynamic Link Library are
On 11/21/05, Steve Juranich [EMAIL PROTECTED] wrote:
On 11/17/05, Shi Mu [EMAIL PROTECTED] wrote:
why subtract 1 from max_y - original_y?Because in the computer science world we like starting to count at 0.image_size = 1000original_y = 25 # Really the 26th pixel line.new_y = 1000 - 25 - 1 # 26
Thanks I'll take a look.
PS: www.u3.com
Regards,
Philippe
[EMAIL PROTECTED] wrote:
If I found the right U3 when I googled, then maybe this is relevant:
http://www.voidspace.org.uk/python/movpy/
Jeff
--
http://mail.python.org/mailman/listinfo/python-list
If you're using vim [1] as your editor, or even if you have it
installed, you can make use of the 2html.vim script [2] to convert your
python code to HTML complete with syntax highlighting.
In vim, try running:
:run! syntax/2html.vim
If you don't want to run vim as your editor, but just want to
This is more of a shell or env question, but I believe others here have
gone through this.
I want to run an optimized python using the portable /usr/bin/env, but
the obvious ways aren't working.
#!/usr/bin/env python -O
when I run ./test.py I get:
/usr/bin/env: python -O: No such file or
Fredrik, thanks for your suggestion. Though the html page that are
generated are for internal uses and input is verified before
processing.
And more than just a solution in current context, actually I was a
more curious about how can one do so in Python.
cheers,
amit.
On 11/22/05, Fredrik Lundh
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
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
so what would an entry-level Python programmer expect from this
piece of code?
for item in a.reverse():
print item
for item in a.reverse():
print item
I would expect it to first print a in reverse then a as it was.
a=[1,2,3]
Paulo Eduardo Neves schrieb:
I want to run an optimized python using the portable /usr/bin/env, but
the obvious ways aren't working.
Seems to be a Linux problems others also experienced:
http://blog.ianbicking.org/shebang.html
-- Christoph
--
Daniel Schüle [EMAIL PROTECTED] wrote:
lst.sort(lambda x,y: cmp(x[1], y[1]))
Since no-one mentioned it and its a favourite of mine, you can use the
decorate-sort-undecorate method, or Schwartzian Transform
eg
lst = [[1,4],[3,9],[2,5],[3,2]]
# decorate - ie make a copy of each item with the
[EMAIL PROTECTED] (Bengt Richter) writes:
Has anyone found a way besides not deriving from dict?
Shouldn't there be a way?
TIA
(need this for what I hope is an improvement on the Larosa/Foord OrderedDict
;-)
I guess I can just document that you have to spell it dict(d.items()), but I'd
I have a list:
[[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]]
How to remove all the duplicate or same after sorted from the lists?
That is, [1,2] and [2,1] are the same after sorting them.
I want the result to be:
[[1,2],[3,1],[1,4],[3,3]]
--
http://mail.python.org/mailman/listinfo/python-list
A.M. Kuchling wrote:
On 22 Nov 2005 01:41:44 -0800,
Kay Schluehr [EMAIL PROTECTED] wrote:
Does anyone actually use this site? While the Vaults offered a nice
place and a nice interface the Cheese Shop has the appeal of a code
slum.
Looking at the Cheese Shop's home page at
Ben Bush wrote:
I have a lis:
[[1,3],[3,4],[5,6],[8,9],[14,0],[15,8]]
I want a code to test when the difference between the first element in
the list of list is equal to or larger than 6, then move the previous
lists to the end of the list. that is:
[[14,0],[15,8],[1,3],[3,4],[5,6],[8,9]]
Ben Bush wrote:
I have a lis:
[[1,3],[3,4],[5,6],[8,9],[14,0],[15,8]]
I want a code
Then write it.
And when (if) you have problems with it, repost, we'll then be happy to
help you.
to test when the difference between the first element in
the list of list is equal to or larger than 6,
I'm
Ron wrote:
Hello,
I'm attempting to develop a plugin framework for an application that I'm
working on. I wish to develop something in which all plugins exist in a
directory tree. The framework need only be given the root of the tree. The
framework then uses os.path.walk to search all for
Ben Bush schrieb:
I have a lis:
[[1,3],[3,4],[5,6],[8,9],[14,0],[15,8]]
I want a code to test when the difference between the first element in
the list of list is equal to or larger than 6, then move the previous
lists to the end of the list. that is:
[[14,0],[15,8],[1,3],[3,4],[5,6],[8,9]]
On Nov 22, Ben Bush wrote:
I have a list:
[[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]]
How to remove all the duplicate or same after sorted from the lists?
That is, [1,2] and [2,1] are the same after sorting them.
I want the result to be:
[[1,2],[3,1],[1,4],[3,3]]
You've described the code in
ll = [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]]
ls = [frozenset(i) for i in ll]
ss = set(ls)
ss
set([frozenset([1, 3]), frozenset([1, 2]), frozenset([1, 4]), frozenset([3])])
[list(i) for i in ss]
[[1, 3], [1, 2], [1, 4], [3]]
pgphz7iINDVUi.pgp
Description: PGP signature
--
I have a lis:
[[1,3],[3,4],[5,6],[8,9],[14,0],[15,8]]
I want a code to test when the difference between the first element in
the list of list is equal to or larger than 6, then move the previous
lists to the end of the list. that is:
[[14,0],[15,8],[1,3],[3,4],[5,6],[8,9]]
--
On 11/22/05, Ben Bush [EMAIL PROTECTED] wrote:
I have a list:
[[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]]
How to remove all the duplicate or same after sorted from the lists?
That is, [1,2] and [2,1] are the same after sorting them.
I want the result to be:
[[1,2],[3,1],[1,4],[3,3]]
I want to set
Of course ours is ordered *and* orderable ! You can explicitly alter
the sequence attribute to change the ordering.
I think we're looking at improving performance based on some of the
suggestions here - as well as possibly widening it to include some of
the alternative use cases. (Or at least
Still don't see why even you ask it again.
fyi, I'm not [EMAIL PROTECTED] , and I've
never, as far I know, posted from readfreenews.net
/F
--
http://mail.python.org/mailman/listinfo/python-list
Laurent Rahuel wrote:
Hi,
newList = zip(aList[::2], aList[1::2])
newList
[('a', 1), ('b', 2), ('c', 3)]
Regards,
Laurent
Or if aList can get very large and/or the conversion has to be
performed many times:
from itertools import islice
newList = zip(islice(aList,0,None,2),
Hi,
is there any library or some way to parse dictionary string with list,
string and int objects into a real Python dictionary?
For example:
my_dict = dict_parser({'test':'123','hehe':['hooray',1]})
I could use eval() but it's not very fast nor secure.
Thanks, Sebastjan
--
Fredrik Lundh [EMAIL PROTECTED] wrote:
...
But math folks usually name things after the person(s) who came
up with the idea, not just some random implementer. The idea of
Wrong: you're forgetting Stigler's Law of Misonomy (which I imagine must
have NOT been discovered by Stigler...;-). The
Fredrik Lundh wrote:
Still don't see why even you ask it again.
fyi, I'm not [EMAIL PROTECTED] , and I've
never, as far I know, posted from readfreenews.net
I have no idea what you are talking about. I read this list through
Google's group and I saw two of the same post. Google
On 11/22/05, Fredrik Lundh [EMAIL PROTECTED] wrote:
Ben Bush wrote:
I have a lis:
[[1,3],[3,4],[5,6],[8,9],[14,0],[15,8]]
I want a code to test when the difference between the first element in
the list of list is equal to or larger than 6, then move the previous
lists to the end of the
Christoph Zwerschke wrote:
I still believe that the concept of an ordered dictionary (behave
like dict, only keep the order of the keys) is intuitive and doesn't
give you so much scope for ambiguity.
Sure. Others think so too. The problem is that if you and these other
people actually write
Christoph Zwerschke [EMAIL PROTECTED] wrote:
Alex Martelli schrieb:
Perl hashes now keep track of 'order of keys'? That's new to me, they
sure didn't back when I used Perl!
Maybe I shouldn't have talked about Perl when I'm an ignoramus about
that language... You're right, Perl has
Gerard Flanagan wrote:
Hello
I'm sure its basic but I'm confused about the error I get with the
following code. Any help on basic tempfile usage?
ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on
Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)]
on win32
Type
Hi,
I have some python scripts, I need to run a netgear router, i have a
cross compilation
setup that works for c code no problem. the python interpreter doesn't
appear to have
been successfully cross compiled to this netgear router although others
have tried.
what i'd like to do is get these
Hello
I'm sure its basic but I'm confused about the error I get with the
following code. Any help on basic tempfile usage?
ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on
Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)]
on win32
Type help, copyright, credits or
On Tue, 22 Nov 2005, Steven D'Aprano wrote:
Are there practical idioms for solving the metaproblem solve problem X
using the latest features where available, otherwise fall back on older,
less powerful features?
For instance, perhaps I might do this:
try:
built_in_feature
except
A.M. Kuchling [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
[...]
What would improve the Cheese Shop's interface for you?
Getting rid of those damn top level links to old versions.
Seeing a long list of old versions, when 99% of visitors are
only interested in the current version,
Sebastjan Trepca wrote:
is there any library or some way to parse dictionary string with list,
string and int objects into a real Python dictionary?
For example:
my_dict = dict_parser({'test':'123','hehe':['hooray',1]})
I could use eval() but it's not very fast nor secure.
it's
Christoph Zwerschke wrote:
But of course, it will always be slower since it is constructed on top
of the built-in dict. In end effect, you always have to maintain a
sequence *plus* a dictionary, which will be always slower than a sheer
dictionary. The ordered dictionary class just hides this
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
so what would an entry-level Python programmer expect from this
piece of code?
for item in a.reverse():
print item
for item in a.reverse():
print item
I would expect it to first print a in reverse then a as it was.
a=[1,2,3]
On 11/22/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
ll = [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]]
ls = [frozenset(i) for i in ll]
ss = set(ls)
ss
set([frozenset([1, 3]), frozenset([1, 2]), frozenset([1, 4]), frozenset([3])])
[list(i) for i in ss]
[[1, 3], [1, 2], [1, 4], [3]]
why this
Greetings, I have a question I hope some one with more back ground can
give me a little help with.
I want to write a simple internet monitoring script for windows that
watches out bound http traffic and keeps a list of all the site visited.
I am thinking that I might be able to use pywin32 and
Hi,
I'm looking for a standard way to determine where to store a
configuration file for my app, using distutils.
At the moment, I'm using os.geteuid() == 0 to decide whether the
configuration file should be written in /etc/myapp.cfg or in
$HOME/.myapp.cfg (if the user running the setup.py is
Colin J. Williams wrote:
[EMAIL PROTECTED] wrote:
Bruno Desthuilliers wrote:
[EMAIL PROTECTED] a écrit :
Is there a function/class/module/whatever I can use to
look at objects? I want something that will print the object's
value (if any) in pretty-printed form, and list all it's
Stuart McGraw wrote
What would improve the Cheese Shop's interface for you?
Getting rid of those damn top level links to old versions.
Seeing a long list of old versions, when 99% of visitors are
only interested in the current version, is just visual noise,
and really lame. Move the old
Fredrik Lundh wrote:
Ben Sizer wrote:
This is interesting; I would have thought that the tuple is read and a
dictionary created by inserting each pair sequentially. Is this not the
case?
pointers to the members of each pair, yes. but a pointer copy is a
cheap operation (for the given
I had the following code and when I clicked the left mouse button one
time. I got green line and the second click got a purple line and the
green disappeared.
I was confused by two questions:
First, Clicknum increases when every time I click the button. Is it
possible to reset Clicknum to 0?
Ben Bush wrote:
This question just came to my mind and not assigned by anyone.
given that you and Shi Mu are asking identical questions, and that
you've both started to send questions via direct mail, can you please
ask your course instructor to contact me asap.
thanks /F
--
Hi All,
Is there a way to set a timeout interval when executing with a
re.search ? Sometimes (reason being maybe a bad pattern), the search
takes forever and beyond...
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 292 matches
Mail list logo