Hi All,
PyDev - Python IDE (Python Development Enviroment for Eclipse) version
0.9.7.99 has just been released.
Check the homepage (http://pydev.sourceforge.net/) for more details.
Details for Release: 0.9.7.99
OK, what's with the strange release version number?... Well, this
version
I have uploaded an early preview release for comtypes. As you might
know, comtypes is a new COM library for Python, based on the ctypes
package.
There is not yet any documentation, but I hope that at least some of the
unittests provided give an impression how it is supposed to be used.
There are
for data in iter(lambda:f.read(1024), ''):
for c in data:
What are the meanings of Commands 'iter' and 'lambda', respectively? I
do not want you to indicate merely the related help pages. Just your
ituitive and short explanations would be enough since I'm really newbie
to Python.
-James
James wrote:
for data in iter(lambda:f.read(1024), ''):
for c in data:
What are the meanings of Commands 'iter' and 'lambda', respectively? I
do not want you to indicate merely the related help pages. Just your
ituitive and short explanations would be enough since I'm really newbie
to
Claudio Grondi wrote:
What TAR version is built into the tarfile module?
None: the tarfile module is not built on top of
GNU tar. Instead, it is a complete reimplementation.
Is there a TAR 1.14 or 1.15 port to Windows
available in Internet for download (which URL)?
Mike -
Thanks for asking. Typically I hang back from these discussions of
parsing HTML or XML (*especially* XML), since there are already a
number of parsers out there that can handle the full language syntax.
But it seems that many people trying to parse HTML aren't interested in
fully parsing
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2005-07-16_2005-07-31.html]
=
Announcements
=
-
PyPy Sprint in Heidelberg 22nd - 29th August 2005
Hello,
I just wrote a short script that generates look and say sequence. What
do you Python guys think of it? Too Java-ish? I can't shake off the
feeling that somebody may have done this with 2-3 lines of Python
magic. Heh.
# generator for sequence
def lookAndSaySequence(firstTerm, n):
term
Ray wrote:
I just wrote a short script that generates look and say sequence. What
do you Python guys think of it? Too Java-ish?
Yes, but that's beside the point. :)
I think your basic design was sound enough for this application
(presumably this isn't something that needs to run at high
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 }
.
Damn, those are cool, man. Thanks! This Python thing keeps expanding
and expanding my brain...
Ray
[EMAIL PROTECTED] wrote:
snipped
--
http://mail.python.org/mailman/listinfo/python-list
Michael Hoffman wrote:
Ray wrote:
I just wrote a short script that generates look and say sequence. What
do you Python guys think of it? Too Java-ish?
Yes, but that's beside the point. :)
Well... I'm always paranoid that I'm, you know, writing Java in Python
:)
snipped
Thanks for the
On Fri, 19 Aug 2005 15:26:27 GMT, max(01)* [EMAIL PROTECTED] wrote:
hi.
i was wondering, what's the simplest way to echo the standard input to
the standard output, with no modification.
i came up with:
...
but i guess there must be a simpler way.
using bash i simply do 'cat', *sigh*!
...
Jon Monteleone [EMAIL PROTECTED] wrote:
The OS I am using is linux distro fedora core 4 (RH, version 10 I think).
The first
question I have is exactly as you mention in 1. I need to have the gui
running from
machine bootup to shutdown. I wrote a bash daemon init script to turn my
On Thu, 18 Aug 2005 15:05:02 +0100, Tom Anderson [EMAIL PROTECTED] wrote:
On Thu, 18 Aug 2005, Jules Dubois wrote:
On Wednesday 17 August 2005 22:11, jitya [EMAIL PROTECTED]
([EMAIL PROTECTED]) wrote:
...
Smalltalk is or would be my first choice if everything else were equal.
Python is what
On Thu, 18 Aug 2005 11:58:23 +0200, Magnus Lycka [EMAIL PROTECTED] wrote:
John Salerno wrote:
hi all. are there any recommendations for an intro book to python that
is up-to-date for the latest version?
It depends on what kind of books you like, and of course on your
previous experience.
Hi,
I'm extremely new to python, and am looking at using it as an embedded
script engine in a dotnet project I'm working on. I'm currently playing
with the Python for Net (http://www.zope.org/Members/Brian/PythonNet)
stuff, and it seems to work well.
Googling for information on securing
Robert Kern wrote:
http://www.catb.org/~esr/faqs/smart-questions.html
Is it a *smart* way or *necessary* way?
Plus, my question was not for the detail description but for the
intuitive guide leading the beginner's further study.
I understand that too many repeated talks make cyberian tired.
Nigel Rowe wrote:
Steve Holden wrote:
Robert Kern wrote:
Jon Hewer wrote:
Is there an online database of non standard library modules for Python?
http://cheeseshop.python.org/pypi
While cheeseshop might resonate with the Monty Python fans I have to say
I think the name sucks in terms
On Fri, 19 Aug 2005 14:25:36 +0200, Magnus Lycka [EMAIL PROTECTED] wrote:
John Salerno wrote:
Just one more quick question: I'm basically learning programming for
fun, and I'm concentrating on C# right now. Python seems interesting,
but I was wondering if I should even bother. Would it
[EMAIL PROTECTED] wrote:
anyone know of any college/school that is teaching the python language?
Bordeaux University (France) uses Python in a programming 101 course.
--
bruno desthuilliers
python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL
On Thu, 18 Aug 2005 08:53:56 GMT, Alessandro Bottoni [EMAIL PROTECTED] wrote:
Titi Anggono wrote:
...
2. I use gnuplot.py module for interfacing with
gnuplot in linux. Can we make the plot result shown in
web ? I tried using cgi, and it didn't work.
The ability to display a image (in this
Would this sufficient? Are there any drawbacks or giant gaping holes?
I'm anticipating that I'd also need to block 'exec' and 'eval' to
prevent an import from being obfuscated past the pre-parse.
Or is this a hopeless cause?
Yes. There have been numerous discussions about this, and there
James Kim wrote:
Robert Kern wrote:
http://www.catb.org/~esr/faqs/smart-questions.html
Is it a *smart* way or *necessary* way?
Of course it's not *necessary*. I mean, the world isn't going to come
to an end if it doesn't happen. There is no logical contingency making
it so.
42 [EMAIL PROTECTED] writes:
Googling for information on securing Python in a sandbox seems
indicate that there are some built in features, but they aren't really
trustworthy. Is that correct?
Yes.
For my purposes, I really just want to let users run in a sandbox, with
access to only the
try this
http://miex.tigris.org
i wrote this for checking bad html, correct them and optimize them
--
http://mail.python.org/mailman/listinfo/python-list
I have just released a new module that interfaces the Class Library for
Numbers (CLN) to Python. The CLN library is a C++ library that provides
rational and arbitrary precision floating point numbers in real and
complex form. The clnum module exposes these types to Python and also
provides
[km]
is true parallelism possible in python ?
cpython:no.
jython: yes.
ironpython: yes.
or atleast in the coming versions ?
cpython:unknown.
pypy: don't have time to research. Anyone know?
is global interpreter lock a bane in this context ?
You need to pass a mask in when you paste in the watermark.
see the documentation for the paste method at
http://effbot.org/imagingbook/image.htm
for more information
This should at least get you started...
import Image
import ImageDraw
import ImageFont
import ImageEnhance
On my Debian GNU/Linux system I have Python 2.3 installed in
/usr/lib/python2.3/ where most Python system files like
/usr/lib/python2.3/gzip.py
/usr/lib/python2.3/gzip.pyc
/usr/lib/python2.3/gzip.pyo
live, besides of course /usr/bin/python2.3
I noticed that all those files come in three
Hi all,
i'm new to python programming so excuseme if the question is very stupid.
here the problem.
this code work
list=[airplane]
select=vars
while select != list[0]:
select=raw_input(Wich vehicle?)
but i want check on several object inside the tuple so i'm trying this:
Miernik wrote:
On my Debian GNU/Linux system I have Python 2.3 installed in
/usr/lib/python2.3/ where most Python system files like
/usr/lib/python2.3/gzip.py
/usr/lib/python2.3/gzip.pyc
/usr/lib/python2.3/gzip.pyo
live, besides of course /usr/bin/python2.3
I noticed that all those
Cegep du Vieux Montreal (technical college level), uses Python for CGI
in web developement class.
...At least when I give this course ;-)
Jean-Marc
--
http://mail.python.org/mailman/listinfo/python-list
Viper Jack wrote:
but i want check on several object inside the tuple so i'm trying this:
list=[airplane,car,boat]
Note that this is actually a list, not a tuple as your subject suggests.
For the difference, take a look at this:
Try the code below.
#-
list=[airplane,car,boat]
select = None
while select not in list:
select=raw_input(Which vehicle?)#-
Cyril
On 8/20/05, Viper Jack [EMAIL PROTECTED] wrote:
Hi all,i'm new to
Miernik a écrit :
On my Debian GNU/Linux system I have Python 2.3 installed in
[...]
I noticed that all those files come in three flavours:
*.py *.pyc *.pyo
Is it possible that only one flavour of these files is needed, and I can
delete the remaining two, any my Python installation will
Lucas Raab a écrit :
Miernik wrote:
[...]
You can delete any two of the three and you shouldn't run into any
problems. However, the .py files are the source code and .pyc and .pyo
are compiled Python files. The .pyc and .pyo files will load faster
because they are compiled. Also, if you
Martin, thank you for your response.
I see, that I have to test myself if the tarfile
module can do what I need, so I did and I
have evidence, that the Python tarfile module
is not able to see all the files inside the TAR
archives created on Linux with TAR 1.14 .
The Python tarfile module stops
Claudio Grondi wrote:
remember. I work in a Windows command shell
(DOS-box) and mount says:
j: on /cygdrive/j , but I don't know how to write
the entire path
j:\o\archives\images\dump.tar,
so that the file can be found by tar.exe and
unpacked to i:\images .
tar.exe --extract
Quoth Paul Rubin http://[EMAIL PROTECTED]:
| Mike Meyer [EMAIL PROTECTED] writes:
| The real problem is that the concurrency models available in currently
| popular languages are still at the goto stage of language
| development. Better models exist, have existed for decades, and are
| available
Googling for information on securing Python in a sandbox seems
indicate that there are some built in features, but they aren't really
trustworthy. Is that correct?
For my purposes, I really just want to let users run in a sandbox, with
access to only the language, manipuate a few published
i guess, it is pythonchallenge.com level 10?
if so, i used this thing:
import re
def enc(s):
return ''.join('%s%s' % (len(a[0]),a[0][0]) for a in
re.findall('((.)\\2*)', s))
--
http://mail.python.org/mailman/listinfo/python-list
Miernik wrote:
On my Debian GNU/Linux system I have Python 2.3 installed in
/usr/lib/python2.3/ where most Python system files like
/usr/lib/python2.3/gzip.py
/usr/lib/python2.3/gzip.pyc
/usr/lib/python2.3/gzip.pyo
live, besides of course /usr/bin/python2.3
I noticed that all those
Mike Meyer wrote:
The real problem is that the concurrency models available in currently
popular languages are still at the goto stage of language
development. Better models exist, have existed for decades, and are
available in a variety of languages.
That's not the real problem; it's a
Viper Jack wrote:
Hi all,
i'm new to python programming so excuseme if the question is very stupid.
here the problem.
this code work
list=[airplane]
select=vars
while select != list[0]:
select=raw_input(Wich vehicle?)
but i want check on several object inside the tuple so i'm trying
[Bryan Olson]
I don't see much point in trying to convince programmers that
they don't really want concurrent threads. They really do. Some
don't know how to use them, but that's largely because they
haven't had them. I doubt a language for thread-phobes has much
of a future.
[Mike Meyer]
The
This is kind of funny, I posted earlier about a small, light python
distro. The thing is, I did it in an hour or so, but amazingly, I got
responses from everywhere asking for support on how to do this. To be
honest, I don't have the time to investigate it more. My point, there
seems to be
Ramza Brown wrote:
This is kind of funny, I posted earlier about a small, light python
distro. The thing is, I did it in an hour or so, but amazingly, I got
responses from everywhere asking for support on how to do this. To be
honest, I don't have the time to investigate it more. My
I want to create the window and contents in a class, and then use a
separate function to write text to the buttons. Then when it clicks a
button, I want it to call a check() function to see if that was the
right button and then write some new stuff to the buttons. So far it
displays the window all
Thank you both (Martin and Diez) for your help.
The 17 GByte TAR archive was unpacked
without problems the way you suggested.
Let's summarize:
# Python tarfile module can't extract files from
newer TAR archives (archived with tar 1.14 or later)
# The core of my problems was, that I was not
Hi, everybody. I wish someone could advise me.
I'm running in circles, trying to find an elegant way to devise run-time
pluggable classes. It all goes around method resolution order, I guess.
(We already use various solutions, but the maintenance burden is high.)
We have a common module
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says...
Would this sufficient? Are there any drawbacks or giant gaping holes?
I'm anticipating that I'd also need to block 'exec' and 'eval' to
prevent an import from being obfuscated past the pre-parse.
Or is this a hopeless cause?
42 [EMAIL PROTECTED] writes:
I want the 'worst case' a malicious script to be able to accompish to be
a program crash or hang.
You should not rely on Python to provide any kind of security from
malicious users who can run Python scripts.
--
James Kim wrote:
Robert Kern wrote:
http://www.catb.org/~esr/faqs/smart-questions.html
Is it a *smart* way or *necessary* way?
It's the polite way. And probably the only way you're going to get your
questions actually answered.
Read the documentation. If you still don't understand
Hello!!!
I want know if python have binary trees and more?
--
http://mail.python.org/mailman/listinfo/python-list
In article [EMAIL PROTECTED],
[diegueus9] Diego Andrés Sanabria [EMAIL PROTECTED] wrote:
Hello!!!
I want know if python have binary trees and more?
Python does not come with a tree data structure. The basic data structures
in Python are lists, tuples, and dicts (hash tables).
People who
42 wrote:
I was wondering if it would be effective to pre-parse incoming scripts
and reject those containing import?
getattr(__builtins__, '__imp' + 'ort__')('dangerousmodule')
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
Well, I couldn't find where the general semantics of a negative stride
index are defined, but for sequences at least[1]:
The slice of s from i to j with step k is defined as the sequence of
items with index x = i + n*k such that 0 = n (j-i)/k.
This seems to
Robert Kern [EMAIL PROTECTED] writes:
http://www.catb.org/~esr/faqs/smart-questions.html
Is it a *smart* way or *necessary* way?
It's the polite way. And probably the only way you're going to get
your questions actually answered.
I wonder if there's a way to killfile posts that contain
[diegueus9] Diego Andrés Sanabria wrote:
Hello!!!
I want know if python have binary trees and more?
Yea, binary trees are more data structures as opposed to libraries:
Here is one approach ( remove the 'java.lang' stuff)
http://www.newspiritcompany.com/BinaryTreePyNew.html
--
Ramza from
Hello,
python24.dll is much bigger than python23.dll. This was discussed already on
the newsgroup, see the thread starting here:
http://mail.python.org/pipermail/python-list/2004-July/229096.html
I don't think I fully understand the reason why additional .pyd modules were
built into the .dll.
[diegueus9] Diego Andrés Sanabria [EMAIL PROTECTED] wrote:
Hello!!!
I want know if python have binary trees and more?
You might be interested that ZODB comes with some B-tree
implementations. They can be used alone or you can persist them in the
ZODB quite easily.
Miernik [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On my Debian GNU/Linux system I have Python 2.3 installed in
/usr/lib/python2.3/ where most Python system files like
/usr/lib/python2.3/gzip.py
/usr/lib/python2.3/gzip.pyc
/usr/lib/python2.3/gzip.pyo
live, besides of
Steve Holden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
http://cheeseshop.python.org/pypi
To be fair, it's really the Python Package Index, it just happens to
be
stored on a machine called cheeseshop.
You are being more that fair! The page in question reads:
Cheese
On 2005-08-20, James [EMAIL PROTECTED] wrote:
for data in iter(lambda:f.read(1024), ''):
for c in data:
What are the meanings of Commands 'iter' and 'lambda', respectively? I
do not want you to indicate merely the related help pages.
Rude much?
If somebody is kind enough to point out
I agree with you in part and disagree in part.
I don't see the point to making the distribution any smaller. 10MB for
the installer from python.org, 16MB for ActiveState .exe installer. How
is 5MB lightweight while 10MB isn't? The Windows XP version of Java
at java.com is 16+ MB, and the .NET
Paul Rubin wrote:
Robert Kern [EMAIL PROTECTED] writes:
http://www.catb.org/~esr/faqs/smart-questions.html
Is it a *smart* way or *necessary* way?
It's the polite way. And probably the only way you're going to get
your questions actually answered.
I wonder if there's a way to killfile
max(01)* wrote:
i was wondering, what's the simplest way to echo the standard input to
the standard output, with no modification.
...
ps: in perl you ca do this:
...
while ($line = STDIN)
{
print STDOUT ($line);
}
...
I guess you could, but there wouldn't be much point. In
Christoph Rackwitz wrote:
i guess, it is pythonchallenge.com level 10?
if so, i used this thing:
import re
def enc(s):
return ''.join('%s%s' % (len(a[0]),a[0][0]) for a in
re.findall('((.)\\2*)', s))
Don't do that!
--
http://mail.python.org/mailman/listinfo/python-list
Steve M wrote:
I agree with you in part and disagree in part.
I don't see the point to making the distribution any smaller. 10MB for
the installer from python.org, 16MB for ActiveState .exe installer. How
is 5MB lightweight while 10MB isn't? The Windows XP version of Java
at java.com is 16+
Steve M wrote:
I agree with you in part and disagree in part.
I don't see the point to making the distribution any smaller. 10MB for
the installer from python.org, 16MB for ActiveState .exe installer. How
is 5MB lightweight while 10MB isn't? The Windows XP version of Java
at java.com is 16+
Bryan Olson wrote:
Steven Bethard wrote:
Well, I couldn't find where the general semantics of a negative stride
index are defined, but for sequences at least[1]:
The slice of s from i to j with step k is defined as the sequence of
items with index x = i + n*k such that 0 = n
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
42 wrote:
I was wondering if it would be effective to pre-parse incoming scripts
and reject those containing import?
getattr(__builtins__, '__imp' + 'ort__')('dangerousmodule')
See that's sort of thing I'm talking about. :)
On 19 Aug 2005 23:13:44 -0700, James [EMAIL PROTECTED] wrote:
for data in iter(lambda:f.read(1024), ''):
for c in data:
What are the meanings of Commands 'iter' and 'lambda', respectively? I
do not want you to indicate merely the related help pages. Just your
ituitive and short
The Python Game Programming Challenge (otherwise known as PyWeek) is only a
week away from starting! Theme voting has started!
http://www.mechanicalcat.net/tech/PyWeek/1
Richard
--
http://mail.python.org/mailman/listinfo/python-list
Donn Cave [EMAIL PROTECTED] writes:
Quoth Paul Rubin http://[EMAIL PROTECTED]:
| Mike Meyer [EMAIL PROTECTED] writes:
| The real problem is that the concurrency models available in currently
| popular languages are still at the goto stage of language
| development. Better models exist, have
Bryan Olson [EMAIL PROTECTED] writes:
Mike Meyer wrote:
The real problem is that the concurrency models available in currently
popular languages are still at the goto stage of language
development. Better models exist, have existed for decades, and are
available in a variety of
Hello,
I am working with a code that has python embedded in it. The embedded python
points to my local python. Outside of the embedding application, I can import a
third part module (wrapped ITK). When, I attempt to import the same module from
within the embedding application, it fails with
Mike Meyer [EMAIL PROTECTED] writes:
Even simpler to program in is the model used by Erlang. It's more CSP
than threading, though, as it doesn't have shared memory as part of
the model. But if you can use the simpler model to solve your problem
- you probably should.
Well, ok, the Python
Robert Kern 쓴 글:
Now go read the documentation.
Thanks to your comments, I read the corresponding helps searched by
Google. (Sorry to say a specific search engine here, but I must say that
it is really convinient.)
Now I realized that Command 'lambda' is a similar to Command 'inline' in
James Sungjin Kim [EMAIL PROTECTED] writes:
Now I realized that Command 'lambda' is a similar to Command 'inline'
in C++. In addition, Command 'iter' is something new but not much new
to c engineers, since it is related to 'for loops', e.g.,
Actually not related at all. Nothing like lambda or
Thank you... I finally got around to installing a proper newsreader,
so that not every single one of my posts is a new thread.
I know what I did wrong now.
First, the line in the requirements about Java Communications
(JavaComm) extension for Java/Jython seriously threw me off.
Second, I
Quoth Mike Meyer [EMAIL PROTECTED]:
[... wandering from the nominal topic ...]
| *) The most difficult task was writing horizontal microcode, which
| also had serious concurrency issues in the form of device settling
| times. I dealt with that by inventing a programming model that hid
| most of
Hi all. I'm currently tracking down a problem in a little script[1] I have,
and I was hoping that those more experienced than myself could weigh in.
The script's job is to grab the status page off a DLink home router. This is
a really simple job: I just use urllib.urlopen() to grab the status
Chris Tavares [EMAIL PROTECTED] writes:
Is this normal behavior for urllib? Is there a way to force that initial
socket closed earlier? Is there something else I need to do?
I'd say open a sourceforge bug. There may be a way around it with the
fancy opener methods of urllib2, but it's a bug if
Hello,
I want to write a thread in python which can be invoked for say 5
sec, within that the threads function would be to take input,is it
possible because i tried it and found that raw_input() is blocking
threads.
--
http://mail.python.org/mailman/listinfo/python-list
Bugs item #1264666, was opened at 2005-08-20 02:17
Message generated for change (Comment added) made by goodger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1264666group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1265100, was opened at 2005-08-20 15:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1265100group_id=5470
Please note that this message will contain a full copy of
Bugs item #1265100, was opened at 2005-08-20 15:30
Message generated for change (Settings changed) made by bediviere
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1265100group_id=5470
Please note that this message will contain a full copy of the comment
89 matches
Mail list logo