Hi all,
My name is André. I'm working in a research prototype that tries to
cluster web pages by tracking the interests of users (by recording the
users' searches and accepted links) and relates that with an adaptive
crawling mechanism.
All system is implemented in zope, with python scripts
, pointers, sketches or outline of solution would be greatly
appreciated.
André
--
http://mail.python.org/mailman/listinfo/python-list
}
### we are always one behind in the dict content
instance alpha called not so simple
===
Note that instance beta was never recognized when it called apparently
simple method.
I'm sure there must be a way to do this
André
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
André wrote:
Using the method suggested by Steven Bethard, I *almost* got it
working
the way I would like.
[snip]
It looks like you want PrivateClass.dict updated every time that
globals() is updated.
yes, that is what I would like to do.
You can just use globals
Steven Bethard wrote:
André Roberge wrote:
Behind the scene, I have something like:
robot_dict = { 'robot' = CreateRobot( ..., name = 'robot') }
and have mapped move() to correspond to
robot_dict['robot'].move()
(which does lots of stuff behind the scene.)
I have tested robot_dict
Jeremy Bowers wrote:
On Fri, 21 Jan 2005 21:01:00 -0400, André Roberge wrote:
etc. Since I want the user to learn Python's syntax, I don't want
to
require him/her to write
alex = CreateRobot(name = 'alex')
to then be able to do
alex.move()
This is just my opinion, but I've been
.
I have tried this exact example (using Python 2.3 if it makes any
difference) and what I got was:
robot None moved
robot None moved
I checked what I wrote, used cut paste on your code, removing the
leading junk, tried it again ... to no avail. :-(
André
--
http://mail.python.org/mailman/listinfo
Nick Coghlan wrote:
André wrote:
So, students will be able to write:
pete = CreateRobot(2, 3)
pete.move()
learning about objects and methods.
As for things like
for robot in robots:
do stuff
that will be for my use only: drawing robots on the screen,
updating
the 'world
Scott David Daniels wrote:
André Roberge wrote:
Craig Ringer wrote:
On Fri, 2005-01-21 at 16:13 -0800, André wrote:
Short version of what I am looking for:
Given a class public_class which is instantiated a few times
e.g.
a = public_class()
b = public_class()
c
, ...), and then have students
name their own robots through declarations like:
cleese = Robot(name=Cleese)
or
cleese = Robot()
cleese.name = Cleese
=
André
-- SegPhault
--
http://mail.python.org/mailman/listinfo/python-list
At the risk of generating controversy, here's another type of example:
def gcd(a, b):
where:
a: int, b: int
return c where:
c: int
while a:
a, b = b%a, a
return b
More can be found at http://aroberge.blogspot.com
Andre
--
http://mail.python.org/mailman/listinfo/python-list
Darn space-eater google groups :-( Here is it again, at teh risk of
generating controversy
.def gcd(a, b):
.where:
.a: int, b: int
.return c where:
.c: int
.while a:
.a, b = b%a, a
.return b
more examples can be found at aroberge.blogspot.com
André
or maybe some faint gridlines at each
indentation stop.
Has anyone ever experimented with that?
Check spe (Stani's Python Editor). It does allow one to put
gridlines.
André
--
http://mail.python.org/mailman/listinfo/python-list
Neat idea!
I'm far from being a decent Python programmer but I managed (for fun)
to do it in a one-liner; however, it was definitely longer (in term of
number of characters) than the more readable multi-line solution.
André
--
http://mail.python.org/mailman/listinfo/python-list
For the few that might be interested, I will be posting the details of
a 117 character long solution to the challenge on my blog
http://aroberge.blogspot.com/.
Enjoy!
André
--
http://mail.python.org/mailman/listinfo/python-list
been surrounded
by a pre tag, it would have rendered correctly.
Shane
Thanks, I hadn't noticed that. It should be fixed now.
André
--
http://mail.python.org/mailman/listinfo/python-list
and paste the result
in my python file).
André
--
http://mail.python.org/mailman/listinfo/python-list
Christian Tismer wrote:
André wrote:
For the few that might be interested, I will be posting the details of
a 117 character long solution to the challenge on my blog
http://aroberge.blogspot.com/.
...
It seems to be very hard to improve. No idea if this is
possible: One might try to re
Hans Nowak wrote:
André wrote:
I don't know if this suggestion has been made already, but it seems to
me that the end of the expression
... for u in(3,14,10))
can be written as:
... for u in 3,14,10)
which would shave off a character. Tuples don't always need parentheses
()
Parent.advise() #inherited from Parent
Child.critique()
Now, does the output make sense?
André
--
http://mail.python.org/mailman/listinfo/python-list
would be appreciated...
André
--
http://mail.python.org/mailman/listinfo/python-list
KraftDiner wrote:
try this:
class x(object):
def __init__(self):
self.someName = hello
def someMethod(self):
self.sumName = bye
find that bug.
Write a test for each method before writing the method.
Write the code once; read it critically (at least) twice.
If you find
in that regard.
As far as I know, it is near impossible to ensure that you can restrict
a determined user from doing nasty stuff.
Thanks,
VJ
André
--
http://mail.python.org/mailman/listinfo/python-list
(by themselves) to learn about
programming.
Check it out ... and let me know what appeals to you (if anything) and
what doesn't.
It's free :-)
André
--
http://mail.python.org/mailman/listinfo/python-list
as to best Tablet PC/accessory for a nice Python
programming environment?
Thanks to all in advance,
André
--
http://mail.python.org/mailman/listinfo/python-list
and journalists will... and they are probably the target
audience ;-)
André
--
http://mail.python.org/mailman/listinfo/python-list
a = list(x for x in range(1)) ...}
*Now*, I prefer [], as I have been trained that way... but, thinking
back, and thinking about teaching Python, I'd have to agree with Alex's
point (not that anyone would care about *my* opinion ;-)
André
--
http://mail.python.org/mailman/listinfo/python-list
() # or whatever you use to create
a canvas
Then, to put a value in a given cell, you simply to
cell[(row, column)].create_text(...)
André
--
http://mail.python.org/mailman/listinfo/python-list
. I might be able to figure that one on my own, if I can get
enough information to get the basic redirection to a window working.
André
--
http://mail.python.org/mailman/listinfo/python-list
message.
Suggestions anyone?
André
--
http://mail.python.org/mailman/listinfo/python-list
Sorry about the single-author thread; I have been googling for answers
and trying out for 3 nights... I just want to record to save others the
trouble.
Earlier this evening, I wrote:
Short description: Using a wxPython based app, I would like to take a
python script in an editor window,
Announcing RUR-PLE lessons 0.36
RUR-PLE stands for Roberge's Used Robot: a Python Learning Environment.
This is the first official release of the lessons, separately
from the application. The lessons are intended as a somewhat
non-typical introduction to programming using Python, that has
been
09:34 PM96 triple2.py
30/01/2006 09:35 PM 358 triple2.pyc
André
--
http://mail.python.org/mailman/listinfo/python-list
RUR-PLE 0.95 has been released.
A link to the download page can be found at
http://rur-ple.sourceforge.net
(The site is slightly out of date, and there is no plan to update it
in the future as it provides an excellent idea of what RUR-PLE is
about.)
This new version contains a few bug fixes and
of html tags
(but no styles).
André
--
http://mail.python.org/mailman/listinfo/python-list
Bonjour !
Je n'ai pas d'objections à ce que tu le fasse. La seule chose qui
m'embête, c'est que les leçons ne sont qu'en anglais. C'est un peu
pour moi une question de fierté ; au moins l'interface de rur-ple est
traduite en français.
André Roberge
Méta-MCI wrote:
Bonjour !
Il me
as soon as possible, before attempting to
write complicated programs. The same probably goes for built-in
functions.
André
[1] Because I have none.
--
http://mail.python.org/mailman/listinfo/python-list
Kent Johnson wrote:
LittlePython wrote:
Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
would like to call this instead of print (to the screen) . I would like
to write a simple script that is not an event drive gui but calls input
boxes, message boxes, or maybe
:
print Error '%s' happened on line %d % (info[0], info[1][1])
output:
Error 'invalid syntax' happened on line 3
=== somefile.py is =
print 3
print 3
prnt 5
print 6
=
André
--
http://mail.python.org/mailman/listinfo/python-list
of zen and tao in computer related disciplines.
Personally, I would say that Python is a zen language, not so much in
the sense that it transforms the way of thinking, but rather as it
doesn't get in the way of thinking.
André
--
http://mail.python.org/mailman/listinfo/python-list
-- More --
However, please note that your (Original Poster) time would probably be
better invested by looking at the very comprehensive wxPython demo (it
may require a separate download).
André
--
http://mail.python.org/mailman/listinfo/python-list
for
python non-programmers
and find things like
http://en.wikibooks.org/wiki/Non-Programmer's_Tutorial_for_Python
André
--
http://mail.python.org/mailman/listinfo/python-list
connection seems fine, so has anyone got
any ideas as to what the problem might be?
Nope, but it's not Leopard related. Just checked here and it loaded
in about 1 sec.
André
--
http://mail.python.org/mailman/listinfo/python-list
and principles.
Thank you.
Yes.
You'll probably get 100 positive answers!
Check out the edu-sig mailing list for discussions on the topic. And
you may want to check out rur-ple.sourceforge.net, where ple stands
for Python Learning Environment.
André
--
http://mail.python.org/mailman/listinfo/python-list
://www.sagemath.org/
Sage is great. However, I think it is much too advanced for 9th/12th
grade. Furthermore, the OP was looking for suggestion teaching
*programming*, not math.
André
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list
,
André
--
http://mail.python.org/mailman/listinfo/python-list
...
self.utilities = Utilities(self)
...
plugin.do(msg,self.utilities)
I would bypass the step of creating a new instance and write instead
plugin.do(msg, self)
thus having access to all properties/methods of the calling object.
Why restrict it?...
André
--
http://mail.python.org/mailman/listinfo
programming, you may want to have a look at pygame:
http://www.pygame.org/news.html
I want to believe. Evangelize away.
Then I saw Pygame, now I'm a believer !-)
There is also pyglet which is quite impressive and easy to use.
André
--
http://mail.python.org/mailman/listinfo/python-list
: join an open source project.
André
Thanks for any help you can provide.
Coko
--
http://mail.python.org/mailman/listinfo/python-list
as a global variable and initialize it
outside of the function.
Warning: avoid global variables if at all possible.
;-)
André
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 8, 10:25 pm, André [EMAIL PROTECTED] wrote:
On Apr 8, 10:01 pm, [EMAIL PROTECTED] wrote:
okay, I'm having this one problem with a text adventure game. It's
kind of hard to explain, but I'll do my best.
[code]
def prompt_kitchen():
global gold
gold_taken = False
On Apr 8, 10:44 pm, [EMAIL PROTECTED] wrote:
On Apr 8, 9:25 pm, André [EMAIL PROTECTED] wrote:
On Apr 8, 10:01 pm, [EMAIL PROTECTED] wrote:
okay, I'm having this one problem with a text adventure game. It's
kind of hard to explain, but I'll do my best.
[code]
def prompt_kitchen
condition). Thus, I would replace
output_lessons = filtered lessons
by
return self.output_random(filtered_lessons)
André
--
http://mail.python.org/mailman/listinfo/python-list
=143;fromSeriesID=143
http://showmedo.com/videos/video?name=1430020;fromSeriesID=143
André
--
http://mail.python.org/mailman/listinfo/python-list
that people have mentioned.
André
--
http://mail.python.org/mailman/listinfo/python-list
direction.
Cheers,
André
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 4, 4:38 am, Peter Otten __pete...@web.de wrote:
André wrote:
Hi everyone,
In the hope of perhaps contributing some additional unit tests for
Python (thus contributing back to the community), I dove in the code
and found something that should be simple but that I can not wrap my
makes use of jQuery and various plugins.
As usual, suggestions for improvements, bug reports and other comments
are welcome.
Cheers,
André
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 14, 10:58 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Tue, 14 Oct 2008 06:12:59 -0700, Scott David Daniels wrote:
Steven D'Aprano wrote:
And if not, it's no big deal. Your help string has a clearly labeled
few lines of hex:
Help on function spam:
On Oct 14, 1:56 pm, [EMAIL PROTECTED] wrote:
André:
Ok, the following is my first attempt at implementing this idea.
I suggest you to change the program you use to encode your images,
because it's 1000 bytes, while with my program the same 256 colors
image needs just 278 bytes
Would anyone have a quick and dirty code sample to create an svg
output of a sample math equation using matplotlib?
André
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 29, 6:34 pm, kib2 [EMAIL PROTECTED] wrote:
André a écrit :
Would anyone have a quick and dirty code sample to create an svg
output of a sample math equation using matplotlib?
André
Hi André,
maybe that's not what you want be there's something like this here (a
converter from
more so. ;-)
André Roberge
--
http://mail.python.org/mailman/listinfo/python-list
like the following (untested)
done = False
while not done:
try:
some_function()
done = True
except:
some_function2()
some_function3()
André
Thanks.
--
___Karlo Lozovina - Mosor
| | |.-.-. web:http
hope not!
I totally agree.
I can't relate to anyone that want to oppose a change that would give
more freedom to a programmer.
André
--
http://mail.python.org/mailman/listinfo/python-list
suggestions?
This is because the entire program runs ... and ends quickly.
Try to add the following line:
raw_input(Done. Press the enter key to quit.)
André
--
http://mail.python.org/mailman/listinfo/python-list
to do Z which is the current behaviour and is found to
be useful by others?
André
--
http://mail.python.org/mailman/listinfo/python-list
the
variables defined as a property (say by printing their docstring and/
or their value), and only those variables?
André
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 25, 2:09 pm, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-06-25, André [EMAIL PROTECTED] wrote:
Suppose I define a class with a number of variables defined as
properties. Something like:
class MyClass(object):
def __init__(self):
self.some_variable = 42
at the
interpreter prompt.
André
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 26, 3:56 pm, Peter Otten [EMAIL PROTECTED] wrote:
André wrote:
I've encountered a problem using gettext with properties while using a
Python interpreter.
Here's a simple program that illustrate the problem.
==
# i18n_test.py: test of gettext properties
import
On Jun 26, 4:17 pm, André [EMAIL PROTECTED] wrote:
On Jun 26, 3:56 pm, Peter Otten [EMAIL PROTECTED] wrote:
André wrote:
I've encountered a problem using gettext with properties while using a
Python interpreter.
Here's a simple program that illustrate the problem
that want to make their
tutorials crunchy-friendlier.
11. As a security feature, crunchy strips all pre-existing javascript
code from an html page before displaying it inside the browser window.
Bug reports, comments and suggestions are always welcome.
André Roberge, for the Crunchy team.
--
http
= or ta.text = \n instead of ta.text = ''.
For my application, it did the right thing; your mileage may vary.
André
--
http://mail.python.org/mailman/listinfo/python-list
reports, comments and suggestions are always welcome.
André, for the Crunchy team.
==
What is Crunchy?
Crunchy is a an application that transforms html Python tutorials into
interactive session viewed within a browser. We are not aware of any
other application (in any
=AWSECommerceServiceAWSAccessKeyId=189P5TE3VP7N9MN0G302Operation=ItemLookupItemId=1400079179ResponseGroup=ReviewsReviewPage=166'
root = ElementTree.parse(urlopen(query))
How about trying
root = ElementTree.parse(urlopen(query), encoding ='utf-8')
André
--
http://mail.python.org/mailman/listinfo/python-list
help would be appreciated.
André
==
The code below defines the class I used. The interpreter is started
via
#--
exec user_code in symbols
#--
where user_code is
#--
interp = SingleConsole()
interp.interact()
#--
# InteractiveConsole is very similar to the class of the same name
On Jul 27, 6:01 pm, Carsten Haese [EMAIL PROTECTED] wrote:
On Fri, 2007-07-27 at 20:46 +, André wrote:
I want to give a user the possibility of restarting an interactive
session, by removing all the objects defined by her since the
beginning. The way I make this possible is by having
.
André
-
The security problem is as follows:
In theory, a web page could contain some javascript code (or link to
such code) that would bypass Crunchy's filter to be executed by the
browser. If that is the case, the javascript code could be designed
to send some
Python code directly
(viewable from Crunchy's left menu).
André
Crunchy is an application that transforms an otherwise static
html page into an interactive Python session.
On Jul 28, 8:13 pm, André [EMAIL PROTECTED] wrote:
A security hole has been uncovered in Crunchy (version 0.9.1.1 and
earlier).
Anyone using
done. (the example given with the division operator is a good one).
André
--
Neil Cerutti
Will the highways on the Internet become more few? --George W. Bush
--
http://mail.python.org/mailman/listinfo/python-list
think it would indeed be lame. Of course, it
isn't true, right?
Yes, it was my mistake; I replied too quicly from a faulty memory
bank...
(extract foot from mouth ... inhale deeply to resupply oxygen to the
brain ...)
André
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python
On Aug 2, 11:14 am, André [EMAIL PROTECTED] wrote:
Other than installing PIL, is there a simple way using Python only
to determine if a file is a valid image file?
I'd be happy if I could at least identify valid images files for gif,
jpeg and png. Pointers to existing modules or examples
On Aug 2, 11:34 am, Jarek Zgoda [EMAIL PROTECTED] wrote:
André napisa³(a):
Other than installing PIL, is there a simple way using Python only
to determine if a file is a valid image file?
I'd be happy if I could at least identify valid images files for gif,
jpeg and png. Pointers
not using PIL is that I'd like to bundle
such a function/module in my app.
André
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 2, 11:38 am, [EMAIL PROTECTED] wrote:
On Aug 2, 9:35 am, Thomas Jollans [EMAIL PROTECTED] wrote:
On Thursday 02 August 2007, André wrote:
On Aug 2, 11:14 am, André [EMAIL PROTECTED] wrote:
Other than installing PIL, is there a simple way using Python only
to determine
On Aug 2, 4:25 pm, Jarek Zgoda [EMAIL PROTECTED] wrote:
André napisa³(a):
Other than installing PIL, is there a simple way using Python only
to determine if a file is a valid image file?
I'd be happy if I could at least identify valid images files for gif,
jpeg and png. Pointers
As mentioned, I have not succeeded in narrowing it down further.
However, has anyone observed such a behaviour of doctests before?
André
--
http://mail.python.org/mailman/listinfo/python-list
Oops, sorry, I made an error in the original description of the
problem (test 4 5 below)
On Dec 17, 8:25 pm, André [EMAIL PROTECTED] wrote:
Hi everyone,
I've run into a very puzzling doctest behaviour - I'm trying to narrow
down the case of it but I'm dealing with multiple files being
On Dec 17, 11:53 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Mon, 17 Dec 2007 21:29:55 -0300, André [EMAIL PROTECTED]
escribió:
I am using the doctest.testfile() interface to load up tests that
resides in a text file. Here's a description of the puzzling feature.
The second
in Italian,
Polish, Macedonian, Brazilian Portuguese, German, Hungarian, Spanish,
Estonian, French and English.
Note that the the bulk of the improvements in the last three releases
is due to the work of many students that participated in Google's
Highly Open Participation contest.
André
--
http
determine if it was indeed a bug - and file a
bug report/write a patch. The same code is present in Python 3.0a2 -
but I have not tested it under this new version.
André
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 26, 7:30 pm, Martin v. Löwis [EMAIL PROTECTED] wrote:
André wrote:
In trying to parse html files using ElementTree running under Python
3.0a1, and using htmlentitydefs.py to add character entities to the
parser, I found that I needed to create a customized version
any problem here.
You may well be right in that the problem may lie elsewhere. But as
making the change I mentioned fixed the problem at my, I figured
this was where the problem was located - and thought I should at least
report it here.
Regards,
André
Regards,
Martin
--
http
out (admittedly, not the character entity).
I would prefer to find a way to process such files and get #913;
instead... (or even, to process files with hard-coded characters e.g.
é instead of eacute; and have them processed properly...).
unicode-challengedly-yrs,
André
On Dec 26, 9:14 pm
shows how to quickly get started using
the official Python tutorial).
André
--
http://mail.python.org/mailman/listinfo/python-list
argument can be summarized as
Explicit is better than implicit.
Personally, I like the idea you suggest, with the modification that I
would use . instead of @, as in
class Server(object):
def __init__(self, .host, .port, .protocol, .bufsize, .timeout):
pass
André
--
http://mail.python.org
t.bar
print t.baz
#== the output is
baz = 3
1
2
Traceback (most recent call last):
File /Users/andre/CrunchySVN/branches/andre/src/tools_2k.py, line
24, in exec_code
exec code in local_dict
File User's code, line 23, in module
AttributeError: 'Test' object has no attribute 'baz'
#==
André
interest in static typing
three or four years ago on his blog. Does anyone know the current
status of this project? Thanks.
Perhaps this: http://www.python.org/dev/peps/pep-3107/ might be
relevant?
André
--
http://mail.python.org/mailman/listinfo/python-list
an exception
=
André
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 453 matches
Mail list logo