I'm frequently using Py2.4 sets, I find them quite useful, and I like
them, even if they seem a little slower than dicts. Sets also need the
same memory of dicts (can they be made to use less memory, not storing
values? Maybe this requires too much code rewriting).
I presume such sets are like
You are really gentle Raymond Hettinger, but surely I'm not asking
you/anyone to write some code just for me; I don't have real
applications, I'm just learning/playing.
Your words are quite good answers to most of my questions.
The only left small topic is about the group/set-like
Leif K-Brooks:
They look exactly the same speed-wise to me:
There's a little overhead, you can see it with a bigger test:
.from time import clock
.n = 1*10**6
.
.t1 = clock()
.d = set()
.for i in xrange(n):
. d.add(i)
.t2 = clock()
.for i in xrange(n):
. d.remove(i)
.t3 = clock()
.d =
r = {}
for x in a: if x not in b: r[x] = r[a]
for x in b: if x not in a: r[x] = r[b]
I know, this is wrong :-]
This looks better:
r = {}
for x in a: if x not in b: r[x] = a[x]
for x in b: if x not in a: r[x] = b[x]
Bearophile
--
http://mail.python.org/mailman/listinfo/python-list
This isn't a visualisation routine, but it contains some of them, and
with few mod you can adapt them for your needs:
http://gato.sourceforge.net/
Gato - the Graph Animation Toolbox - is a software which visualizes
algorithms on graphs.
Bearophile
--
Nick Coghlan wrote:
Anyway, check out AlternateLambdaSyntax on the python.org Wiki
It's an interesting page:
http://www.python.org/moin/AlternateLambdaSyntax
Some days ago I suggested something different: maybe def can become a
function, then it can work as lambda (and still as the old def) too.
In Python there are so many ways to do things...
This looks like another one, I haven't tested it:
not False in imap(pred, iterable)
As usual tests are required to measure the faster one.
I agree with Roose, there are are some primitive operations (like
this, and flatten, partition, mass removal
This post comes from a boring morning, if you are busy ignore this.
This post is only for relaxed people.
I've found this page, Syntax Across Languages, it contains many
errors and omissions, but it's interesting.
http://merd.sourceforge.net/pixel/language-study/syntax-across-languages.html
Thank you for the comments, Fredrik Lundh.
(that's (mostly) CPython-dependent, and should be avoided)
Then a non CPython-dependent way of doing it can be even more useful.
sure looks like four possible outcomes.
Right (but to me four explicit answers seem better than three answers
and an
Thank you Fredrik Lundh for showing everybody that indeed lot of people
feel the need of such function in Python too.
to create a generic version, you have to decide which sequences to treat like
sequences
In my version I give the function some parameter(s) to define what I
want to flatten.
Questo non e' sufficiente, ma puo' essere un punto di partenza:
http://www.pycode.com/modules/?id=2tab=download
Bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Thank you for all the answers, some people have already answered for me
about most details I don't agree :-)
Mike MeyerRexx has a global control that lets you set the number of
digits to be considered significant in doing an FP equality test.
Mathematica too, I think.
Tom AndersonThere are all
This can be of little interest of some people here, but I think it can
be interesting enough to justify a post.
An article on the Microsoft Command Shell:
http://arstechnica.com/guides/other/msh.ars
(Its syntax is rather Python-like, but Py syntax seems better to me,
even taking into account that
This is a possible solution, using exceptions:
fileName = data
out = file(fileName + _filt.txt, w)
for line in file(fileName + .txt):
try:
nline = float(line)
except ValueError:
pass
else:
out.write(str(nline) + \n)
out.close()
If the file is small enough this
# This can be a solution:
from operator import itemgetter
seq1a = ([2] * 4) + ([1] * 4)
seq2a = [complex(3-el,7-el) for el in range(1, 9)]
assert len(seq1a) == len(seq2a)
print seq1a, seq2a, \n
mix = zip(seq1a, seq2a)
# mix.sort() # Not possible
mix.sort(key=itemgetter(0))
# If you need tuples
Grant Edwards wrote:
May God save us from professional looking web sites.
I like the Python web site. It's simple, easy to read, and easy to
use.
I strongly agree with you, the web is full of web sites that are nice
looking but have microscopic fixed fonts (against the very spirit of
Html),
CppNewBand maybe a readable default font is in order.
That font looks fine to me, maybe there's a problem in the default font
of your browser, you can probably fix your problem...
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Michael J. Fromberger:
I can send you
a Python implementation I wrote, if you like; but if you're interested
in better understanding how the transform works, I would recommend you
try writing your own implementation.
I'd like to see it, if you want you can put it somewhere or send it
This can be faster, it avoids doing the same things more times:
from string import maketrans, ascii_lowercase, ascii_uppercase
def create_words(afile):
stripper = '[,;{}_?!():[]\.=+-*\t\n\r^%0123456789/
mapper = maketrans(stripper + ascii_uppercase,
*len(stripper)
Thank you Bengt Richter and Sybren Stuvel for your comments, my little
procedure can be improved a bit in many ways, it was just a first
quickly written version (but it can be enough for a basic usage).
Bengt Richter:
good way to prepare for split
Maybe there is a better way, that is putting in
Tom Anderson:
And we're halfway to looking like perl already! Perhaps a more pythonic
thing would be to define a then operator:
all_lines = file1 then file2 then file3
Or a chain one:
all_lines = file1 chain file2 chain file3
Bearophile
--
The Digital Mars D compiler is a kind of improved c++, it contains a
foreach statement:
http://www.digitalmars.com/d/statement.html#foreach
Usage example:
foreach(int i, inout int p; v1) p = i;
Is equal to Python:
for i in xrange(len(v)): v[i] = i
That is: v1 = range(len(v1))
(Some people use
Steven D'Aprano:
Perhaps Python should concatenate numeric literals at compile time:
123 456 is the same as 123456.
I think using the underscore it is more explicit:
n = 123_456
Alternatively the underscore syntax may be used to separate the number
from its base:
22875 == 22875_10 == 595b_16
Roy SmithWe already have a perfectly good syntax for entering octal
and hex integers,
There is this syntax:
1536 == int(600, 16)
that accepts strings only, up to a base of 36.
There are the hex() and oct() functions.
There is the %x and %o sintax, that isn't easy to remember.
There are the 0x600
Peter HansenOr maybe one should instead interpret this as numeric
literals need more bells and whistles, and I don't care which of these
two we add, but we have to do *something*!. :-)
The purpose of my words was: when you think about adding a new
syntax/functionality to a language, you have to
Notes:
- This email is about Mark Dufour's Shed Skin (SS)
(http://shed-skin.blogspot.com), but the errors/ingenuousness it
contains are mine. My experience with C++ is limited still.
- The following code comes from a discussion with Mark.
One of the purposes of SS is to produce fast-running
This is a direct translation of the D code, maybe it's not the faster
Python implementation, and surely it's not the shorter one. But Psyco
makes it much faster (Psyco likes low level style code).
ShedSkink is (almost) able to compile it too, producing a really fast
executable (with some smart
malv:
Hi bearophileH,
bearophile is enough :-)
Could you post some more information about ShedSkink?
ShedSkin (SS) is a Python - C++ compiler (or translator) written in
Python, created by Mark Dufour. Its development was initially
financed by the summer of code by Google. It contains some
(This is a repost from another python newsgroup).
While using some nested data structures, I've seen that I'd like to
have a function that tells me if a given data structure contains one or
more cyclic references (a way to recognise a cycle in a graph is to do
a depth-first search, marking
Leif K-Brooks:
http://python.org/doc/current/lib/module-pprint.html#l2h-749
Thank you very much, I see that the function is already there, even
with the same name :-)
I've seen that it doesn't work for all my tests, like this one with n =
3000:
from pprint import isrecursive
from time import
Adding Optional Static Typing to Python looks like a quite complex
thing, but useful too:
http://www.artima.com/weblogs/viewpost.jsp?thread=85551
I have just a couple of notes:
Boo (http://boo.codehaus.org/) is a different language, but I like its
as instead of : and -, to have:
def min(a as
Doug Holton:
And there are some disadvantages to doing it this way.
It means Python is more flexible to use than Boo,
I've just suggested the *syntax* that I like more.
Bye,
Bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Thank you to all the gentle people that has given me some comments, and
sorry for bothering you...
Doug Holton:
This will also likely never appear in Python.
I know, that's why I've defined it wild.
Also, you might request the NetLogo and StarLogo developers to support
Jython (in addition to
From An Introduction to Dao:
So I realized the goodness of scripting languages, and spent about two weeks
to write some Perl scripts to retrieve informa- tion from GO and construct the
DAG. But that experience with Perl was not very nice, because of its
complicated syntax. Then I started to
If the elements of mylist can be compared (es. not complex values),
then this can be a solution for you:
from math import sin as f
mylist = [float(2*i)/10 for i in xrange(10)]
pairs = [(f(x), x) for x in mylist]
ymax = max(pairs)[1]
print pairs, \n
print ymax
You can also try this, for Py2.4:
I don't know if this was already discussed. I think that maybe Python
2.5 can add some attributes to the str object:
str.ascii_letters
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
str.hexdigits
'0123456789abcdefABCDEF'
etc.
And maybe this too:
str.maketrans(from, to)
(I think
ShedSkin (http://shed-skin.blogspot.com) has taught me something:
simple syntax and high speed can often go together, in a computer
language.
This means two things:
1) A fast language can have a simple (python-like) syntax. For
example a language fast as C++ can allow:
d = {hello:1}
as a syntax
Maybe a page like this for Python exists already, or it can be useful
to create it:
http://tryruby.hobix.com/
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
kenny NguyenDoes anyone know the operator =+?
It isn't an operator, it's equivalent to = (assignment) only.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
This is interesting. With more Python time in Guido's hands maybe Py
3.0 is a bit closer... :-)
I don't know if this is a silly idea:
A small part of the wealth of a modern state is probably determined by
the software it uses/produces, and a small part of this software is
open source or free.
This topic is discussed on Slashdot too:
http://slashdot.org/articles/05/12/22/1832226.shtml?tid=217
There are some interesting comments, for example from curious Java or
Perl programmers, etc.
Some of them can probably appreciate this:
http://cheeseshop.python.org/pypi/typecheck
Among the noise
Maybe this graph library can be useful to you:
http://sourceforge.net/projects/pynetwork/
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Psyco is finished now, and it works on the x86, for Win, the new macs,
many linux boxes, etc, and it's quite useful, so maybe it can be added
to the standard Python distribution.
PyChecker (and the other similar ones that work differently) is very
useful too, and it's pure Python, so maybe it too
Paul McGuire wrote:
I don't find 'Interval' to be very easy on the eyes. In this case, I
stole^H^H^H^H^H borrowed the re form of [A-Za-z0-9], providing a
method named srange (s is for string) such that srange(a-fA-F)
would return the string abcdefABCDEF.
Thank you for your answers Paul.
Peter Hansenbut I'd be happy to see a real-world case where Psyco gave
a much bigger boost.)
Psyco can be very fast, but:
- the program has to be the right one;
- you have to use low level programming, programming more like in C,
avoiding most of the nice things Python has, like list generators,
I haven't examined the code very well, but generally I don't suggest to
use exceptions inside tight loops that that have to go fast.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
With your input this returns:
[200, 20, 0, 13050]
so it's not what you want, but maybe it can be a starting point for
you:
from re import findall
txt = \
test test test description (100-10-0, 6700 test)
test test test description (100-10-0, 6350 test)
lines = txt.split(\n)
res =
It seems that Java JDK 1.4 (-server) HotSpot compiler sometimes (in
this test, on this computer, etc.) can produce programs faster than C
and Fortran ones in n-body simulations and similar stuff:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=nbodylang=all
A dict can be useful:
byte1, byte2 = 32, 1
conv1 = {(32, 32):0, (36,32):natural, (32,1):5, (66,32):0.167}
print conv1[byte1, byte2]
If you use Psyco maybe something like this can be faster:
conv2 = dict((k1*256+k2,v) for (k1,k2),v in conv1.items())
print conv2[(byte18) + byte2]
conv1/conv2
This post is about a programming language that I've never used, called
Pliant. Sometimes knowing something about other languages can be useful
for our language, so I think this is not a fully off topic post. Time
ago I have found Python (that now I am using a lot) because I like to
explore less
Juho Schultz
NIR_mean_l only from lines 1, 4, 7, ...
R_mean_l only from lines 2, 5, 8, ...
G_mean_l only from lines 3, 6, 9, ...
This can be the problem, but it can be right too.
The following code is shorter and I hope cleaner, with it maybe
Kriston-Vizi Janos can fix his problem.
class
Well, maybe it's time to add a n-levels flatten() function to the
language (or to add it to itertools). Python is open source, but I am
not able to modify its C sources yet... Maybe Raymond Hettinger can
find some time to do it for Py 2.5.
Bye,
bearophile
--
Most of my ideas seem usless or stupid, but I think expressing them
here doesn't harm much.
This is an idea for Py 3.0, because it's not backward compatible.
Dicts and sets require immutable keys, like tuples or frozensets, but
to me they look like a duplication. So the idea is to remove tuples
The first line of that example has to be:
s = |set([1, 3, 5])|
But I don't know/remember why set() can't accept many values like
max/min:
max([1,2,5])
max((1,2,5))
max(1,2,3)
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger:
I'm curious whether you've had an actual use for dictionaries as keys.
I've never had this need (probably because it's an unsupported thing to
do too).
Likewise, how about frozensets? Have you had occasion to use them as keys?
They were created to support sets of sets,
The array module allows you to specify a single type of elements.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber:
Yes, but only when ref-counts go to 0... it may be that this tight loop never
allowed stuff to go to 0 ref-counts. It definitely never returned control, so
besides eating memory that way, any events for the GUI framework were also not
being handled and had to be queued.
BearophileThis can be fixed with a different dictionary that doesn't
contain the leading 0s,
No other dict is necessary:
! _nibbles = {0:, 1:0001, 2:0010, 3:0011,
! 4:0100, 5:0101, 6:0110, 7:0111,
! 8:1000, 9:1001, A:1010, B:1011,
! C:1100, D:1101, E:1110,
Uhm, if the file is clean you can use something like this:
data = \
200501221530
John
*** long string here ***
200504151625
Clyde
*** clyde's long string here ***
200503130935
Jeremy
*** jeremy string here
records = [rec.split(\n) for rec in data.split(\n\n)]
records.sort()
print records
On Slashdot there is a discussion about the future C#3.0:
http://developers.slashdot.org/developers/05/09/18/0545217.shtml?tid=109tid=8
http://msdn.microsoft.com/vcsharp/future/
There are many differences, but it looks a bit more like Python:
Nufox seems a really interesting thing (probably it can even be used to
design GUIs for local desktop apps), but the site seems down at the
moment.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
It doesn't work yet, to me...
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
The current version of ShedSkin (http://shedskin.sourceforge.net/
experimental Python to C++ compiler) is rather alpha, and the
development work is focused on debugging and implementing some more
basic Python functionality. But hopefully in future versions more work
will be spent to make the
Thank you George Sakkis for your fast and accurate answer. In my life I
am encountering lot of graph-based solutions to my problems. I'll try
to implement your solution as soon as possible.
Fredrik Lundhworking on a Python to C/C++ translator without knowing
what kind of optimizations a C/C++
This isn't code of mine, it's probably from the cookbook, maybe with
little changes:
| def addMethod(object, method, name=None):
| if name is None: name = method.func_name
| class newclass(object.__class__):
| pass
| setattr(newclass, name, method)
| object.__class__ =
Sometimes I suggest to add things to the language (like adding some set
methods to dicts), but I've seen that I tend to forget the meaning of
six set/frozenset operators:
s t s = t
s | t s |= t
s ^ t s ^= t
My suggestion is to remove them, and keep them only as explicit
non-operator versions
Erik Max Francis:
result = [sqrt(x**2 + y**2) for x, y in zip(xs, ys)]
Another possibility:
from math import hypot
result = [hypot(*xy) for xy in zip(xs, ys)]
Or better:
from math import hypot
result = map(hypot, xs, ys)
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Hello, I know this topic was discussed a *lot* in the past, sorry if it
bores you...
From the Daily Python-URL I've seen this interesting Floating Point
Benchmark:
http://www.fourmilab.ch/fourmilog/archives/2005-08/000567.html
This is the source pack:
http://www.fourmilab.ch/fbench/fbench.zip
Two versions of mine, one of the fastest (not using Psyco) and one of
the shortest:
. from itertools import groupby
.
. def audioactiveFast(n):
. strl = {(1,1,1): 31, (1,1): 21, (1,): 11,
. (2,2,2): 32, (2,2): 22, (2,): 12,
. (3,3,3): 33, (3,3): 23, (3,): 13 }
.
I agree with Bryan Olson.
I think it's a kind of bug, and it has to be fixed, like few other
things.
But I understand that this change can give little problems to the
already written code...
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Hello, I have four things to ask or to suggest, sorry if they seem
basic or already discussed.
---
I am still ignorant about Tkinter. This little program, after pressing
the Go eats more and more RAM, is it normal? Can it be avoided? (In
normal programs this is isn't a real
Witn your suggestions and with some tests and work I've solved most of
the problems, thank you all for the comments.
Peter Hansen:
What did you expect to happen with the infinite loop inside dogo()?
I expected that the same memory used by the b.config(command=...) can
be used by the successive
This isn't much tested, so don't trust it much, and I hope it's not
overkill.
You can find Graph here:
http://sourceforge.net/projects/pynetwork/
With this you can plot the tree, if you want:
g.springCoords(); g.plot2d()
Bear hugs,
bearophile
def scan(g, parent):
subs = [scan(g, sub) for
Ranges of letters are quite useful, they are used a lot in Delphi/Ada
languages:
a, b, c, d, e...
I like the syntax [1..n], it looks natural enough to me, but I think
the Ruby syntax with ... isn't much natural.
To avoid bugs the following two lines must have the same meaning:
[1..n-1]
[1..(n-1)]
This is yet another memoize decorator, it's meant to be resilient (and
fast enough):
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466320
Like most memoize decorators it stores the pairs of data-result in
cache dictionary, but Garrett Rooney says:
it could be better if it used the new
I have a file of lines that contains some extraneous chars, this the
basic version of code to process it:
IDtable = .join(map(chr, xrange(256)))
text = file(..., rb).read().translate(IDtable, toRemove)
for raw_line in file(file_name):
line = raw_line.translate(IDtable, toRemove)
...
A
Because L.index() and L[x:x] both take O(N) time in the worst case.
Why do you think L[x:x] can be O(N)?
This looks O-linear enough to me:
from random import choice
L = [choice(ab) for i in xrange(10)]
L
['b', 'b', 'b', 'a', 'b', 'a', 'b', 'a', 'a', 'a']
for x in xrange(len(L)):
... if
But how is L[x] = Y an O(1) operation. Given x finding L[x] would require to
traverse x nodes in the list.
Python list is a deceptive name, because they are 1D arrays of
pointers. Maybe they are called lists because array(...) is shorter
than list(...).
Bye,
bearophile
--
Diez B. Roggisch:
The reason is that l = [] just rebinds a new object (a list, but it could be
anything) to a name, while l[:] = [] will alter the object _referred_ to by
l. That is a HUGE difference!
In my programs I have seen that there is another practical difference
between version 1 and
The idea looks interesting, but you can also design a couple of
functions that scan the docstrings of a given class and its methods to
produce what you need:
doctestAll(C)
toHtml(C)
This is probably simpler and gives similar results.
Bye,
bearophile
--
Robert KernAnd several others if you google a bit.
Yes:
http://sourceforge.net/projects/pynetwork/
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Hello, this time I have a question about PIL usage, maybe if Lundh has
some time he can answer me.
I am experimenting different color quantization algorithms, so having
computed the palette with a clustering function, I use the code below
to quantize the original image to produce an image without
py:
Thanks, itertools.izip and just zip work great. However, I should have
mentioned this, is that I need to keep the new dictionary sorted.
A Python dictionary is an unsorted data structure, so you cannot have
it sorted as you please.
(I have seen that lot of people ask for a sorted
This is a little shorter :-)
[2]+[x for x in range(2,99)if 2**x%x==2]
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Yes this language is very slow, but frequently this isn't a problem,
because you are using fast functions/libraries written in C, or you are
doing I/O bound operations. And Psyco, numeric/numarray, ShedSkin can
help in some other cases (Pyrex and other solutions allow you to mix in
lower level
Steven D'ApranoVery slow to do what, compared to what? The decay time
of the tau meson?
Probably every answer I can give you is wrong for you, so answering is
almost useless... In this thread we have already given the most
pertinent answers to the original question from Diffuse.
I can show you
Using CPython or GMPY with a smarter algorithm in acceptable time you
can find that:
12345678987654 == 2 * 3 * 2057613164609
It's a very big number to factorize with that naive algorithm, so the
program hangs... (I have used an online factoring service).
Bye,
bearophile
--
Steven D'ApranoThat's a completely different question, so of course it
has a completely different answer. Here is one way:
Other versions without the creation of a list:
for i in (2**n for n in xrange(6)):
do_something(i)
for i in (1n for n in xrange(6)):
do_something(i)
for i in
David Isaac:
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?
It seems that you are looking for macros; maybe Logix language
The question about the speed is interesting. Generally the more dynamic
and flexible your language is, the slower are the programs it produces.
Lisp is almost unique in such matters (and in this regard it's maybe
better than CPython) because it allows the programmer to mix and blend
different
Luis M. González[Shed-Skin] ... but so far it looks great (only one
developer though..).
Two developers, I am there too :-)
I think people aren't much interested so far because there aren't good
ways to link/join/use SSPython compied code from CPython code. A good
solution is probably to:
-
Probably this is interesting for you:
http://home.tiscali.be/be052320/Unum.html
I think its API can be improved, but it can be used.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
This time it seems that using itertools gives slower results, this is
the test code:
import itertools as it
from operator import __not__
def trim_leading_zeros(seq):
if not seq:
return seq
for pos, el in enumerate(seq):
if el != 0:
break
if seq[pos] == 0:
To use Pyrex, SWIG and the like on a Win2K I have followed this way:
http://jove.prohosting.com/iwave/ipython/pyMinGW.html
I already had MinGW 3.4.2, so I have decompressed the Python 2.4.2
sources, I have merged in the pyMinGW patch, and I have run the global
compilation with:
make -f
Thank you for your answers, Khalid.
It seems you may be using an old version of pyMinGW,
I have downloaded it yesterday from your site.
the relevant part dealing with include directories in zlib.mak
should read now as follows:
I have checked, and that relevant part is the same in my
Carl Friedrich Bolz:
Indeed, there are similarities to pyrex. Of course in pyrex you have to
give the types yourself, but since the type inference engine of PyPy can
sometimes be hard to understand this is maybe not the worst trade-off.
A nice advantage of the PyPy approach would be that you
Gregory Petrosyan:
coefs.extend(it.chain(rcoefs1, rcoefs2)) #? -- here is magic
Can't you just do a couple of extend? Something like:
coefs.extend(rcoefs1)
coefs.extend(rcoefs2)
This looks simpler and probably faster too.
Bye,
bearophile
--
Sorry for the late reply, I have some ideas about a possible GUI
toolkit design (that works with one already done like GTK), I'll
probably show them here. In the meantime I can show this one:
http://thinlet.sourceforge.net/home.html
I like it because the way GUIs are defined is quite short.
bye,
Bo Yang:
to get an instance of the class 'classname' from a
string , in python , how do I do that ?
This is a possibile way:
class C: pass
c = locals()[C]()
print c
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Maybe you can create your class using an array of 'L' with the array
standard module.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 1178 matches
Mail list logo