my question: is it possible to erase a graph, and reuse it?
like in
# x - compute - y
g=Pmw.Blt.Graph(); g.pack()
g.line_create(name,x,y)
# other computing - a better y
# do something to g, erasing the previous plot
#[the above is the part that i cannot understand...]
giacomo boffi [EMAIL PROTECTED] writes:
my question: is it possible to erase a graph, and reuse it?
like in
# x - compute - y
g=Pmw.Blt.Graph(); g.pack()
g.line_create(name,x,y)
# other computing - a better y
# do something to g, erasing the previous plot
#[the above is the part
i have coded some progs that use the Pmw.Blt.Graph widgets, embedded
in a simple Tkinter GUI
,
| from Tkinter import *
| import Pmw
| ...
| frame=Frame(root)
| ...
| graph=Pmw.Blt.Graph(frame,...)
| graph.line_create(...)
| graph.pack(...)
`
now i'd like to port those progs to an
i have this test program (that i already posted on it.comp.lang.python)
[ test.py ]
from Tkinter import *
def output(s):
print s
def doit(fr,lst):
for c1,c2 in zip(lst[::2], lst[1::2]):
subframe=Frame(fr)
Label(subframe,text=c1+' - '+c2).pack(side='left',expand=1,fill='both')
Diez B. Roggisch de...@nospam.web.de writes:
Giacomo Boffi wrote:
def doit(fr,lst):
for c1,c2 in zip(lst[::2], lst[1::2]):
subframe=Frame(fr)
Label(subframe,text=c1+' -
'+c2).pack(side='left',expand=1,fill='both')
Button(subframe,text='',command=lambda: output(c1+'-'+c2
Giacomo Boffi giacomo.bo...@polimi.it writes:
ok, i'll try again following your advice
,[ test.py ]
| from Tkinter import *
|
| def output(s):
| print s
|
| def create_cb(a,b):
| return lambda: output(a+'-'+b)
|
| def doit(fr,lst):
| for c1,c2 in zip(lst[::2], lst[1::2
Scott David Daniels scott.dani...@acm.org writes:
Giacomo Boffi wrote:
Giacomo Boffi giacomo.bo...@polimi.it writes:
...
| def create_cb(a,b):
| return lambda: output(a+'-'+b)
| | def doit(fr,lst):
| for c1,c2 in zip(lst[::2], lst[1::2]):
| subframe=Frame(fr)
| Label
John Posner jjpos...@optimum.net writes:
def output(x,y,op):
if op == :
print x, ---, y
elif op == :
print x, ---, y
else:
print Operation argument error!
uh, nice!, i'll adapt this to my real problem
thank you John,
Terry Reedy tjre...@udel.edu writes:
Reedy's Lambda Rule: [detailed explanation omitted]
i'm beginning to _understand_ what's going on with my code
Terry Jan Reedy
thanks, grazie 1000 Terry,
g
--
Lord, what fools these mortals be!
--
Maggie la.f...@gmail.com writes:
[...]
else:
print 'The loop is finito'
do you know of it.comp.lang.python?
--
Sarebbe essere un atto di pieta'.
Contro i miei principi.-- whip, in IFMdI
--
http://mail.python.org/mailman/listinfo/python-list
Vlastimil Brom vlastimil.b...@gmail.com writes:
As for BLT, there is Pmw.Blt, the original is written in Tcl.
doesn't work (dumps core) on debian linux
bug #525860: python-pmw triggers segmentation fault in blt
not that blt itself is really OK
bug #524149: blt: zooming in a graph
John Nagle na...@animats.com writes:
gerlos wrote:
John Nagle ha scritto:
I'm looking for something that can draw simple bar and pie charts
in Python. I'm trying to find a Python package, not a wrapper for
some C library, as this has to run on both Windows and Linux
and version clashes
Piet van Oostrum p...@cs.uu.nl writes:
Chris Withers ch...@simplistix.co.uk (CW) wrote:
CW John Nagle wrote:
That's a wrapper for Antigrain (http://www.antigrain.com/;),
which is a C++ library. I'm trying hard to avoid dependencies on
binary libraries with limited support. Builds exist
Zooko O'Whielacronx zo...@zooko.com writes:
I'm starting to think that one should use Decimals by default and
reserve floats for special cases.
would you kindly lend me your Decimals ruler? i need to measure the
sides of the triangle whose area i have to compute
--
Martin v. Loewis mar...@v.loewis.de writes:
If you use the bdist_wininst, bdist_msi, or bdist_rpm distutils
commands, you get packages which support uninstallations very well.
bdist_deb?
--
Vorrei andare a lavorare in Sicilia, a max 15 km dal mare. Con chi
devo parlare? Col capomafia
Baba raoul...@gmail.com writes:
Hi Mel,
indeed i thought of generalising the theorem as follows:
If it is possible to buy n, n+1,~, n+(x-1) sets of McNuggets, for some
x, then it is possible to buy any number of McNuggets = x, given that
McNuggets come in x, y and z packs.
so with
Paul Rubin no.em...@nospam.invalid writes:
Baba raoul...@gmail.com writes:
exercise: given that packs of McNuggets can only be bought in 6, 9 or
20 packs, write an exhaustive search to find the largest number of
McNuggets that cannot be bought in exact quantity.
Is that a homework problem?
Grant Edwards inva...@invalid.invalid writes:
If it's 2D data, you don't need to use a 3D graph.
if it's tabular data, you don't need an uber-histogram
--
giampippetto, coso, come si chiama? ah si` MMAX ha scritto:
Tra il trascendente e l'interpretazione prevalente del dato come
assioma ne
Manuel Graune manuel.gra...@koeln.de writes:
Hello everyone,
I am looking for ways to use a python file as a substitute for simple
pen and paper calculations.
search(embedded calc mode) if manuel in emacs_fellows_set or sys.exit(1)
--
http://mail.python.org/mailman/listinfo/python-list
Manuel Graune manuel.gra...@koeln.de writes:
Giacomo Boffi giacomo.bo...@polimi.it writes:
Manuel Graune manuel.gra...@koeln.de writes:
Hello everyone,
I am looking for ways to use a python file as a substitute for simple
pen and paper calculations.
search(embedded calc mode) if manuel
Tobiah t...@rcsreg.com writes:
I'm having a difficult time with this. I want
to display a continuous range of hues using HTML
hex representation (#RRGGBB). How would I go
about scanning through the hues in order to
make a rainbow?
if you mean real rainbows when you say rainbow, as
i have this code
def example(a):
return lambda b: a+b+1
fun = example(10)
k_1 = fun(7)
...
and pylint tells me
[...]
C: 4: Invalid name fun (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 5: Invalid name k_1 (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
[...]
afaict, [A-Z_][A-Z0-9_]*
Jean-Michel Pichavant jeanmic...@sequans.com writes:
Giacomo Boffi wrote:
i have this code
def example(a):
return lambda b: a+b+1
fun = example(10)
k_1 = fun(7)
...
and pylint tells me
[...]
C: 4: Invalid name fun (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 5: Invalid
Giacomo Boffi giacomo.bo...@polimi.it writes:
However, given you example, you should not insert code execution at
you module level, unless it's required only at the module import. I
dont know what is your module
module? this was not well specified in my OP, but i'd rather speak of
a script
HH henri...@gmail.com writes:
if (width == 0 and
height == 0 and
color == 'red' and
emphasis == 'strong' or
highlight 100):
raise ValueError(sorry, you lose)
if (width == 0 and
height == 0 and
color == 'red' and
emphasis ==
Hans Georg Schaathun h.schaat...@surrey.ac.uk writes:
: import matplotlib
: matplotlib.use('agg')
: import pylab
: pylab.plot([1, 3, 5])
: fig = file('foo.png', 'wb')
: pylab.savefig(fig, format='png')
: fig.close()
Raster graphics is not good enough
Giacomo Boffi giacomo.bo...@polimi.it writes:
Hans Georg Schaathun h.schaat...@surrey.ac.uk writes:
: import matplotlib
: matplotlib.use('agg')
: import pylab
: pylab.plot([1, 3, 5])
: fig = file('foo.png', 'wb')
: pylab.savefig(fig, format='png
Terry Reedy tjre...@udel.edu writes:
On 11/28/2010 3:47 PM, pyt...@bdurham.com wrote:
I had planned on subclassing Tkinter.Toplevel() using property() to wrap
access to properties like a window's title.
After much head scratching and a peek at the Tkinter.py source, I
realized that all
Martin P. Hellwig martin.hell...@dcuktec.org writes:
Yep when I started looking much more at other toolkits, I started to
like Tkinter more and more. Maybe its simplicity,
maybe the good design of Tk,
--
BOMBED BY AIRCRAFT. SINKING. U-824.
--
Chris Jones cjns1...@gmail.com writes:
[...] most any software of note appears to have come out of cultures
where English is either the native language, or where the native
language is either relatively close to English...
i do acknowledge your most, but how do you spell Moon in Portuguese?
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes:
A dedicated concatenation operator would have avoided that mess.
I don't quite agree that the mess is as large as you make out, but yes,
more operators would be useful.
am i wrong, or | is still available?
--
l'amore e' un
kjaku...@gmail.com writes:
def temp(T, from_unit, to_unit):
conversion_table = {('c', 'k'):lambda x: x + 273.15,
('c', 'f'):lambda x: (x * (9.0/5)) + 32,
('k', 'c'):lambda x: x - 273.15,
('k', 'f'):lambda x: (x *
Νίκος nikos.gr...@gmail.com writes:
IF it can also be written in one-line
def f(x,n,w):return(lambda
y=f(x[::2],n/2,w[::2]),z=f(x[1::2],n/2,w[::2]):reduce(lambda
x,y:x+y,zip(*[(y[k]+w[k]*z[k],y[k]-w[k]*z[k]) for k in range(n/2)])))()if n1
else x
--
anch'io la penso come me, ma
Joel Goldstick joel.goldst...@gmail.com writes:
On Sun, Sep 29, 2013 at 11:28 AM, giacomo boffi pec...@pascolo.net wrote:
Νίκος nikos.gr...@gmail.com writes:
IF it can also be written in one-line
def f(x,n,w):return(lambda y=f(x[::2],n/2,w[::2]),z=f(x[1::2],n/2,w
[::2
giacomo boffi pec...@pascolo.net writes:
it.comp.python
oops, it.comp.LANG.python
--
I do desire we may be better strangers.
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes:
Ironically, your post was not Unicode. [...] Your post was sent
using a legacy encoding, Windows-1252, also known as CP-1252
i access rusi's post using a NNTP server,
and in his post i see
Content-Type: text/plain; charset=UTF-8
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes:
On Sat, 07 Dec 2013 17:05:34 +0100, giacomo boffi wrote:
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes:
Ironically, your post was not Unicode. [...] Your post was sent using
a legacy encoding, Windows-1252, also
Nac Temha nacctte...@gmail.com writes:
Hi everyone,
I want to do operation with chars in the given string. Actually I want to
grouping the same chars.
For example;
input : 3443331123377
operation- (3)(44)()(333)(11)(2)(33)(77)
output: 34131237
How can I do without
giacomo boffi pec...@pascolo.net writes:
% python a.py
34131237
% cat a.py
i=3443331123377;n=0
while n+1!=len(i):i,n=(i[:n]+i[n+1:],n) if i[n+1]==i[n] else (i,n+1)
print i
% python a.py
34131237
%
--
for Nikos
--
https://mail.python.org/mailman/listinfo/python-list
i executed the following interactions and i remained disappointed
$ python
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
from pylab import *
f1=figure(1)
f2=figure(2)
f1
matplotlib.figure.Figure object at
Blockheads Oi Oi breamore...@yahoo.co.uk writes:
I don't know why but this works fine.
f1=figure(1)
plot(sin(linspace(0,10)),figure=f1)
f2=figure(2)
plot(cos(linspace(0,10)),figure=f2)
show()
it works as well (with a proper t...)
plot(sin(t);figure(2);plot(cos(t));show()
because that's
eryksun () eryk...@gmail.com writes:
figure(fig1.number)
plot(...)
that's already much better than figure(1);...;figure(2);...
Alternatively, you can use the plot methods of a particular axes:
fig1 = figure()
ax1 = axes()
fig2 = figure()
ax2 = axes()
Chris Angelico ros...@gmail.com writes:
def f(x,n,w): return x if n==1 else\
(lambda x0=f(x[::2],n/2,w[::2]),\
x1=f(x[1::2],n/2,w[::2]): reduce(lambda a,b: a+b ,\
zip(*[(x0[k]+w[k]*x1[k],\
J jnr.gonza...@googlemail.com writes:
cat logs/pdu_log_fe.log | awk -F\- '{print $1,$NF}' | awk -F\. '{print
$1,$NF}' | awk '{print $1,$4,$5}' | sort | uniq | while read service command
status; do echo Service: $service, Command: $command, Status: $status,
Occurrences: `grep $service
Rustom Mody rustompm...@gmail.com writes:
For ubuntu you should need nothing for python.
In other words python should run on a basic ubuntu installation.
From the shell just type python and the interpreter should start.
For more specialized work there are dozens (maybe hundreds?) of
on my linux box i have a small python program that draws some 2-d line
graphs in a window aside a graphical interface to change the problem
data
as you may have guessed from the subject line, the gui widgets are
done with help from PMW [1], and the graps are done by the PMW -
BLT[2] interface
L lamlb...@optusnet.com.au writes:
also the PyGeo readme text mentions Numerical python (I think it
means Numeric, but I also have NumPy installed)
afaict, Numerical python is numpy --- if you look at pygeo home page,
the reference to Numerical python is a link to numpy home page
on the
Dennis Lee Bieber wlfr...@ix.netcom.com writes:
FORTRAN just differentiates by having the main file start with
PROGRAM random_name
whereas subfiles are all either (or both)
SUBROUTINE another_name(args)
FUNCTION that_other_name(args)
no
Ben Finney ben+pyt...@benfinney.id.au writes:
Raymond Hettinger pyt...@rcn.com writes:
It doesn't seem to be common knowledge when and how a[x] gets
translated to a[x+len(x)]. So, here's a short info post on how Python
supports negative indices for sequences.
Thanks for this. Could you
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:
In message 8662yfklzu@aiuole.stru.polimi.it, Giacomo Boffi wrote:
Dennis Lee Bieber wlfr...@ix.netcom.com writes:
FORTRAN just differentiates by having the main file start with
PROGRAM random_name
whereas subfiles are all
Dennis Lee Bieber wlfr...@ix.netcom.com writes:
On Fri, 10 Sep 2010 12:25:17 +0200, Giacomo Boffi
giacomo.bo...@polimi.it declaimed the following in
gmane.comp.python.general:
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:
In message 8662yfklzu@aiuole.stru.polimi.it
harryos oswald.ha...@gmail.com writes:
hi
I have 2 lists of numbers,say
x=[2,4,3,1]
y=[5,9,10,6]
I need to create another list containing
z=[2*5, 4*9, 3*10, 1*6] ie =[10,36,30,6]
I did not want to use numpy or any Array types.I tried to implement
this in python .I tried the following
Wiktor look@signature.invalid writes:
I'm not starting from scratch. I'm using packages 'termcolor', 'colorama'
and 'colorconsole'
the 'urwid' package could be useful for similar projects but cite
requires Linux, OSX, Cygwin or other unix-like OS/cite so I guess
it's of no use for you...
Tim Chase python.l...@tim.thechases.com writes:
On 2014-10-12 22:16, Marko Rauhamaa wrote:
is equivalent with
while ans.lower()[0] != 'y':
ans = input('Do you like python?')
And still better improved with
while ans[:1].lower() != 'y':
ans = input('Do you like
duncan smith buzzard@invalid.invalid writes:
[...] It was the top / bottom of the [TV] programme that I didn't
immediately get, because I was thinking of a timeline running left
to right (perhaps rather than the script used by the presenters).
is it just me that thinks of a timeline running
Ryan Shuell ryanshu...@gmail.com writes:
Thanks guys. I just feel frustrated that I can't do something useful.
I had read many of your messages in the recent past, and I'm under the
impression that your frustration has more to do with Python the
Infrastructure rather than Python the Language
Rustom Mody rustompm...@gmail.com writes:
[As best as I can make out the OP is not using the standalone
interpreter
nor idle
nor (the many options like) python-interpreter-inside-emacs
nor ipython
nor ...
but CodeSkulptor http://www.codeskulptor.org/]
CodeSkulptor has been mentioned
Seymore4Head Seymore4Head@Hotmail.invalid writes:
Because most of the practice I am getting is not using Python. I
use Codeskulptor.
Seymore,
it's been months that you're struggling with python, if you happen to
own a computer could you please take the time to install python on it
and
ERRATA CORRIGE:
many different circumstances, by the very, very helpful folks of clp.
many different circumstances, by the very, very helpful folks of clpy
--
sapete contare fino a venticinque?
Olimpia Milano Jugoplastika Split Partizan Beograd
Roberto Premier Duska Ivanovic Zarko Paspalj
--
Rustom Mody rustompm...@gmail.com writes:
What would you say to a person who
- Buys a Lambhorgini
I'd say: Don't buy a Lambhorgini from that nice guy you met at a party,
but buy a Lamborghini by an authorized dealer ;-)
--
I was a kid when Lamborghini launched the Miura!
--
On 11/09/2014 11:44 AM, satishmlm...@gmail.com wrote:
What does zip return in the following piece of code?
To help you understanding what is the `zip` builtin,
please forget about PKZip etc and think about the
_zip fastener_ or _zipper_ in your bag or in your trousers
In the bag you have two
Grant Edwards invalid@invalid.invalid writes:
No, you don't. That's not how a zipper works. Each tooth from side A,
isn't bound with one from side B. It's bound with _two_ of them from
side B. And each of those is in turn bound with an additional tooth
from side A, and so on...
In your
Clayton Kirkwood c...@godblessthe.us writes:
Although I suspect for a price you could bring all of your
professional programming jobs to somebody here, but I think you
would pay out more than you would make.
s/ here/ else/ and your assumption can be falsified
--
Saul Spatz saul.sp...@gmail.com writes:
In tcl/tk an Entry widget can be set to validate its contents with
the validate option. [...] Can one do something like this in
tkinter?
i read the thread and nobody mentioned the python mega widget (Pmw)
toolkit, from whose docs i quote the following
Ana Dionísio anadionisio...@gmail.com writes:
Hello!
I have a CSV file with 20 rows and 12 columns and I need to store it
as a matrix.
array=numpy.array([row for row in csv.reader(open('Cenarios.csv'))])
NB: i used array= as in your sample code, BUT
--
Chris Angelico ros...@gmail.com writes:
On Sat, Feb 14, 2015 at 6:40 AM, John Ladasky
john_lada...@sbcglobal.net wrote:
The default font that the Geany program editor uses on my Ubuntu
system renders everything I've tried. When I look up that font in
Geany's Preferences menu, it is called,
66 matches
Mail list logo