nformation inside f.func_closure (or f.__closure__ in Python 3).
> The part of the calling environment which is saved is y
Shouldn't it be the (a,b) pair here ? But :
>>> f.__closure__[0].cell_contents# access to what ?
55
Shouldn't cell_contents keep the current (a,b) pair, a part of the snapshot of
the creation environment (private variables of the closure) ?
Instead it seems to returns only a (which is the next production)...
franck
--
https://mail.python.org/mailman/listinfo/python-list
60).
And don't answer with "good programmers don't use recursion", this is bullshit.
2. Lambda-expression body is limited to one expression. Why ?
Why the hell those limitations ? In this aspect, Javascript has a cooler
approach.
franck
--
https://mail.python.org/mailman/listinfo/python-list
then whose result is to be written in another text box.
Simple, pythonistic.
Thanks for the pointer,
franck
--
http://mail.python.org/mailman/listinfo/python-list
)) ; notation a+bi
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
I get this in foo.html (spaces missing) :
> (define z (* 3+2i 1+i)) ; notation a+bi
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
franck
--
http://mail.python.org/mailman/listinfo/python-list
We should be able to distinguish Arial type for usual
text and fixed font for code.
- Should have some colors.
Wadda wadda yadda # blue annotation
Cool and useful software,
franck
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Franck Ditter wrote:
> In article ,
> Franck Ditter wrote:
>
> > In article ,
> > Mitya Sirenef wrote:
> >
> > > On 01/19/2013 04:32 AM, Franck Ditter wrote:
> > > > In article ,
> > > > Mitya Sirenef wrote:
In article ,
Franck Ditter wrote:
> In article ,
> Mitya Sirenef wrote:
>
> > On 01/19/2013 04:32 AM, Franck Ditter wrote:
> > > In article ,
> > > Mitya Sirenef wrote:
> > >
> > >> On 01/14/2013 01:34 AM, Franck Ditter wrote:
In article ,
Mitya Sirenef wrote:
> On 01/19/2013 04:32 AM, Franck Ditter wrote:
> > In article ,
> > Mitya Sirenef wrote:
> >
> >> On 01/14/2013 01:34 AM, Franck Ditter wrote:
> >>> In article ,
> >>>Jason Friedman wrote:
> &
In article ,
Mitya Sirenef wrote:
> On 01/14/2013 01:34 AM, Franck Ditter wrote:
> > In article ,
> > Jason Friedman wrote:
> >
> >>> That is right; I would also add that it may be overwhelming for a newbie
> >>> to be reading through a large &quo
nd the reference to the text displayed. Only "text"...
How may we use the software which generates the Javascript ?
Thanks, it's cool.
franck
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
marduk wrote:
> On Sun, Jan 6, 2013, at 11:43 AM, Franck Ditter wrote:
> > Hi !
> > I work on MacOS-X Lion and IDLE/Python 3.3.0
> > I can't get the treble key (U1D11E) !
> >
> > >>> "\U1D11E"
> > SyntaxError: (
Hi !
I work on MacOS-X Lion and IDLE/Python 3.3.0
I can't get the treble key (U1D11E) !
>>> "\U1D11E"
SyntaxError: (unicode error) 'unicodeescape' codec can't
decode bytes in position 0-6: end of string in escape sequence
How can I display musi
order...
Thanks a lot,
franck
--
http://mail.python.org/mailman/listinfo/python-list
Question 2 : After importing math, why can't I consider log as
an instance method, after all ?
>>> (4).__log__()
AttributeError: 'float' object has no attribute '__log__'
Thanks for your answers.
franck
--
http://mail.python.org/mailman/listinfo/python-list
Hi !
Here is Python 3.3
Is it better in any way to use print(x,x,x,file='out')
or out.write(x) ? Any reason to prefer any of them ?
There should be a printlines, like readlines ?
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
In article <505ccdc5$0$6919$e4fe5...@news2.news.xs4all.nl>,
Hans Mulder wrote:
> On 21/09/12 16:29:55, Franck Ditter wrote:
> > I create a text file utf-8 encoded in Python 3 with IDLE (Mac Lion).
> > It runs fine and creates the disk file, visible with
> > TextWra
e tip,
franck
--
http://mail.python.org/mailman/listinfo/python-list
27;abc') would expand to 'a'+'b'+'c'
And the error message is somewhat cryptic...
franck
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to all, but :
- I should have said that I work with Python 3. Does that matter ?
- May I reformulate the queston : "a is b" and "id(a) == id(b)"
both mean : "a et b share the same physical address". Is that True ?
Thanks,
franck
In article ,
Benjamin K
Hi !
a is b <==> id(a) == id(b) in builtin classes.
Is that true ?
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
ces at the toplevel :
? foo(5)
x = 5
--> 6
I know I could put the expression e within a string, but
is it possible to avoid the string, like a Lisp macro ?
Thanks.
franck
--
http://mail.python.org/mailman/listinfo/python-list
x27;)
$$$ for x in i : print(x,end=' ')
1 2 3
$$$ for x in i : print(x,end=' ')# i is exhausted
$$$
IMHO, this should not happen in Py3k.
What is the rationale of this (bad ?) design, which forces the programmer
to memorize which one is exhaustable and which one is
), they seem to know lambdas :
#lang racket
;;; quick and dirty list comprehension syntax as a macro, for fun :
(define-syntax-rule (list-of expr for x in L)
(map (lambda (x) expr) L))
(list-of (sqr x) for x in (range 5)) --> (0 1 4 9 16)
(define funcs (list-of (lambda (x) (expt x i)) f
I have some problems with Python 3.2 on Windows.
I want to use the turtle package, works fine,
but I can't close the turtle windows.
On MacOS-X, I launch idle -n and it's fine.
How can I do that on Windows ?
Thanks,
fd
--
http://mail.python.org/mailman/listinfo/python-list
I can't get it working : "No pygame module"...
Tried without success :
pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip
pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg
I am using Python 3 last version on MacOS-X Lion.
Where is a step-by-step installation procedure ?
Than
s nothing except
displaying a
strange character inside a square), but that was refused "already in use"...
franck
P.S. There is no "configuration panel (Options -> Configure IDLE)",
only a Preferences menu with a "Key" tab on MacOS-X. May I suggest to the
P
How may I get a fresh Python shell with Idle 3.2 ?
I have to run the same modules several times with all
variables cleared.
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Ned Deily wrote:
> http://www.activestate.com/activetcl/downloads
GREAT ! It seems to work.
At least, I can now get the ~ char in France from within IDLE.
A big step for manking :-)
Thanks folks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
== sdiv(n)
def primes(n) : # n >= 2
"""Returns the list of primes in [2,n]"""
res = []
for k in range(2,n+1) :
if isPrime(k) : res.append(k)# cost O(1) ?
return res
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
How do you stop a looping computation with IDLE 3.2.x on MacOS-X Lion ?
It hangs with the colored wheel...
Ctl-C does not work.
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
??
I would prefer to use IDLE but as we are in France, the Python team
does not seem to be aware that the ~ and others are not available
on MacOS-X here (probably the same in Europe)...
franck
--
http://mail.python.org/mailman/listinfo/python-list
Nope, "space" followed by "Shift-Option-N" gives a greek iota...
I tried other combinations, unsuccessfully.
IDLE 3 (French) seems to be unusable as we use many ~ in web applications :-(
Should we hope a fix soon, or leave IDLE ?
Thanks,
franck
In article ,
Ned Deily
ual behavior is to merge lines of a
paragraph.
Thanks for help !
franck
--
http://mail.python.org/mailman/listinfo/python-list
Any Python 3 planned ?
franck
In article
,
AlienBaby wrote:
> On Jun 23, 2:07 pm, Jon Dowdall
> wrote:
> > Hi All,
> >
> > I'm pleased to announce that PyPad (Python environment for iOS) 2.7.1
> > Update 4 is now available in the iTunes App Store. New
get a pointer to something
inside L ? Is the above function length O(n) or probably O(n^2) ?
Where are such implementation things (well) said ?
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
Except at MIT, who knows some good CS1 references for teaching Python ?
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
your explanations...
franck
--
http://mail.python.org/mailman/listinfo/python-list
Just an advice as I see that "old" Python is maintained.
When starting with Python (simple programs and GUIs) should I start
with Python 3.x ? If it has a decent implementation on Mac/Linux/Windows of
course...
Thanks,
franck
--
http://mail.python.org/mailman/listinfo/python-list
> File "", line 1
> SyntaxError: keyword can't be an expression
Sure! So my surprise.
But Martin did provide a very good explanation that this form in the
grammar actually allows to avoid an ambiguity.
Cheers,
Franck
--
http://mail.python.org/mailman/listinfo/python-list
Thank you for this very clear (and quick) explanation! :-)
Cheers,
Franck
On 19 avr, 08:58, "Martin v. Loewis" wrote:
> # The reason that keywords are test nodes instead of NAME is that using
> # NAME results in an ambiguity. ast.c makes sure it's a NAME.
> argument
an an identifier. Moreover, in the Python language reference (see
http://docs.python.org/reference/expressions.html#grammar-token-keyword_item)
one can read:
keyword_item ::= identifier "=" expression
which is what I was expecting.
Does any one knows why the grammar is so coded? A
g a pathological regular expression, but rather a problem of
the RE engine that is not optimized to use the faster approach when
possible.
This is well known problem very well explained on:
http://swtch.com/~rsc/regexp/regexp1.html
Cheers,
Franck
--
http://mail.python.org/mailman/listinfo/python-list
> I would like to parse arbitrary insecure text string containing nested
> Python data structures in eval-compatible form:
Python 2.6 has ast.literal_eval to do exactly this. It handle lists,
tuples, dict, numbers, strings, bool and None, with arbitrary nesting.
Cheers,
Franck
-
> They aren't used by the current implementation.
OK, thanks!
Franck
--
http://mail.python.org/mailman/listinfo/python-list
Dear all,
I'm experimenting with new ast module.
I'd like to have pieces of code that can generate AugLoad and AugStore
AST nodes.
Indeed, I actually do not know what they correspond to.
Thanks for any help!
Franck
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have a text file where there is
xxx=value
yyy=value
zzz=value
etc...
I would like use the from myfile import
Since it has not the extension py how can i read it ?
I know the way to do it with the open file but i think this one is
easier...
Thansk
Franck
--
http://mail.python.org
Hello Folks,
I am facing a problem where i need to parse around 200 files, i have a
bit of knowledge in PHP/Perl/Python (the magic P :-P)
Which one would you suggest me since i have to generate a web
interface ?
And each one has his area of 'work'
Thanks for your help !
--
http://mail.python
Hello Folks,
I am facing a problem where i need to parse around 200 files, i have a
bit of knowledge in PHP/Perl/Python (the magic P :-P)
Which one would you suggest me since i have to generate a web
interface ?
And each one has his area of 'work'
Thanks for your help !
--
http://mail.python
since it is the same logic for me.
Thanks very much in advance for your advice.
Franck
--
http://mail.python.org/mailman/listinfo/python-list
rg.freedesktop.Hal.Manager')
for udi in hal_manager.FindDeviceByCapability("net") :
obj = system_bus.get_object("org.freedesktop.Hal", udi)
dev = dbus.Interface(obj, 'org.freedesktop.Hal.Device')
print dev.GetProperty("net.interface"),
t/reference/linux/loopback_linux.html
Franck
--
http://mail.python.org/mailman/listinfo/python-list
> maybe you will find it easyer to use GladeGen to generate the
> skeleton of your application rather then coding it yourself. Take a
> look here: http://www.linuxjournal.com/article/7421
You may also use my PyGG module: http://freshmeat.net/projects/pygg
Cheers,
Franck
Alex, Michele and Skip,
Many thanks for your help, I should find my way by putting all these
information together.
Best regards,
Franck
--
http://mail.python.org/mailman/listinfo/python-list
essfully, to rename functions with:
import new
def rename (fun, name) :
return new.function(fun.func_code, {}, name)
So, my questions:
- can I change a function name so that it affects the traceback when an
exception is raised in the function?
- is there some special trick to r
On 2/3/06, Kirk McDonald <[EMAIL PROTECTED]> wrote:
> Franck PEREZ wrote:
> > Hello all,
> >
> > Considering the following code :
> >
> > class C(object):
> >...: observers = []
> >...:
> >...: @classmethod
> >
y mean :
"for each child class, automatically bind a new list attribute called
observers" ?
Are metaclasses a way ? Is it possible to avoid them ?
Thanks a lot,
Franck
--
http://mail.python.org/mailman/listinfo/python-list
which
are dumped, and the constructor values. In simple cases, the module
finds out the constructor attributes by itself.
You may download the module here, and see documentation and examples :
http://eleves.ec-lille.fr/~perezf/python/
Any comment welcomed !
Franck
--
http://mail.python.org/ma
On 11/25/05, Sebastien Douche <[EMAIL PROTECTED]> wrote:
> On 11/25/05, Franz Mueller <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> Hi Franz! :)
>
> > which of the following books would you recommend:
> > "Dive into Python" or "Beginning Python: From Novice to Professional"?
>
> Both are very good books b
On 11/18/05, Mike Meyer <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Alex Martelli) writes:
> > Mike Meyer <[EMAIL PROTECTED]> wrote:
> >...
> >> >> >> How about adding Foo.__file__ to the serialized data?
> >...
> >> >> depends on somewhere on it. You can use the module name if you have
I thought about it, but it would make the XML file depend on the
machine... no more portability...
On 11/18/05, Mike Meyer <[EMAIL PROTECTED]> wrote:
> Franck PEREZ <[EMAIL PROTECTED]> writes:
> > ### My test application
> > class Foo(object):
&
in the "loads" method, but it was heavy and unsuccessful.
Thanks a lot for your help !
Franck
--
http://mail.python.org/mailman/listinfo/python-list
ck_start(hbox, False, False, 2)
self.box.pack_start(self.output, False, False, 2)
self.window.show_all()
def main(self):
gtk.main()
a = Greeter()
a.main()
Cheers,
Franck
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I'm using PyGTK-2.0.0, when I detach a HandleBox, the resizing of the
newly created window is broken: it can be resized but it's content (the
HandleBox and its child) is not affected at all and is not resized.
Does any one have a solytion to this problem?
Thanks in advan
et but I could
not find it anywhere (and neither could win.forall).
I'm using PyGTK-2.0.0 and cannot use another version.
Thanks in advance for any idea!
Franck
--
http://mail.python.org/mailman/listinfo/python-list
64 matches
Mail list logo