For me, one of the reasons for using Python
is the ease and the intuivity of reading its
code.
I have a problem with intuitively getting
what is going on when using a pattern like
(x,y,z=0) - (x,y,z)
where I expect at the first glance some
C code with access to class members.
At least I must
Why not:
try:
(x,y,z)
except NameError:
z=0
(x,y,z)
?
instead of
lambda x,y,z=0:(x,y,z)
Because it does not do the same thing ?-)
Haven't got the idea why? (pedantic?)
Because, if it did, it would still require 5 times more lines of code to
do the same thing (hence it's
Already
lambda x,y,z=0:(x,y,z)
is a problem for me.
Why not:
try:
(x,y,z)
except NameError:
z=0
(x,y,z)
?
Because they are not equivallent.
Watching the last piece of code
can even directly be seen, that there
is eventually a NameError
problem with z to
for x,y,z in some_iterator:
If some_iterator produces at some time
a tuple with only two elements this
will raise an exception no matter
whether you assigned z already or not.
So if I now understand it right, the core
of the whole proposal is to find a way to
make unpacking of tuples work
What do you find most readable: your version, with an ad-hoc function
defined somewhere else, far away in the code, or a simpler:
for (x,y,z=0) in tupleList:
do_whatever_with_it()
I came up with the ad-hoc function
to give a kind of replacement
for the used syntax, in order
not to ask why
$main_prefix = u:/WikiMedia-Static-HTML/;
$wiki_language = pl;
The script is running now for over half an hour
and has created yet 1.555 folders and
generated 527 files with a total size of 6 MBytes
consuming only 16 seconds of CPU time.
I estimate the time until the script is ready to
s = 'a  aaa'
What am I doing wrong?
First get rid of characters not allowed
in Python code.
Replace  with appropriate escape
sequence: /x## where ## is the
hexadecimal code of the ASCII
character.
Claudio
--
http://mail.python.org/mailman/listinfo/python-list
Claudio Grondi [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
s = 'a  aaa'
What am I doing wrong?
First get rid of characters not allowed
in Python code.
Replace  with appropriate escape
sequence: /x## where ## is the (should be \x##)
hexadecimal code of the ASCII
[EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Claudio Grondi wrote:
I am on a Widows 2000 box using the NTFS file system.
Both up to now suggested approaches as
- tee.exe (where I used the http://david.tribble.com/dos/tee.exe
DOS-port with redirecting stdout to NULL
Is there an already available script/tool able to
extract records and generate proper HTML
code out of the data stored in the Wikipedia
SQL data base?
e.g.
converting all occurences of
[[xxx|yyy]] to a href=xxxyyy/a
etc.
Or even better a script/tool able to generate
and write to the disk all
)
causes no problems with MySQL.
Leif K-Brooks [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Claudio Grondi wrote:
Is there an already available script/tool able to extract records and
generate proper HTML code out of the data stored in the Wikipedia SQL
data base
I would like to save time copying the same file
(6 GByte) to various different target storage
media connected to the system via USB.
Is there a (Python or other) tool able to help me
to do this, so that I don't need to copy the
source file first to the first media, then to the
second, etc.?
I'll post my version in a few days.
Have I missed something?
Where can I see your version?
Claudio
Xah Lee [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
here's a large exercise that uses what we built before.
suppose you have tens of thousands of files in various
means your message, that you think, that
the consecutive copy is the fastest possible
method if using Windows 2000?
Claudio
Grant Edwards [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
On 2005-03-20, Claudio Grondi [EMAIL PROTECTED] wrote:
Is there maybe a way to use
I don't know any deep details about USB, except that
I _know_ that it is a serial bus, but considering
following:
1) I can read/write 45 MByte/s from harddrive to harddrive
on the E-IDE bus (theoretically 100 MByte/s), so the
speed of the harddrive I read/write from/to is probably the
bottleneck.
PROTECTED]
Claudio Grondi wrote:
Steven Reddie [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
I want to do something like the following, which doesn't work:
modulename = 'module'
import modulename
The error is that there is no module named 'modulename
Steven Reddie [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Hi,
I want to do something like the following, which doesn't work:
modulename = 'module'
import modulename
The error is that there is no module named 'modulename'. Is there a
way to get that variable
Hi,
I have done some more work on Console.py
from the readline package version 1.12, adding
support for background colors and testing of proper
function of them (run the Console.py script to
see coloured output).
Added was also the possibility to set the default
text/background colors for colored
().
e.g.
'\x1B[31m'
'\x1B[1m'
will cause later submitted text to be light red.
Running Console.py creates coloured
test output which can be checked for
integrity.
Any feedback is welcome.
Claudio
Claudio Grondi [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Hi,
I have
Ashot [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
whoa, that was quick, looks like it works for me. Thanks a lot!
It would be nice to be able to set the colors in the prefs file, although
its possible to edit the pyColorize file as Claudio mentioned.
To get the coloured
Hi,
I have watched this thread hoping to get an
hint on my problem, but it seems I didn't.
My problem is, that the background of part of
the error messages is always black
(e.g. after typing In [1]: sdfsdf)
and my monitor failes to show the red, green
texts on black background clearly enough
to
I use this one,
http://heanet.dl.sourceforge.net/sourceforge/uncpythontools/readline-1.7.win
32.exe
which I assume is the right one.
Any other ideas?
Claudio
Fuzzyman [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Are you really using the readline module from
background:
In [1]: sdlfjf
---
exceptions.NameError Traceback (most
recent call last)
Fernando Perez [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Claudio Grondi wrote:
I use
{Key11: Value11
{Keyn1: Valuen1
Keyn2: Valuen2
...
Keynn:Valuenn}
Each pair in a dictionary is separated by CRLF and in each dictionary
numbers of pairs can be different.
I need to read only the last dictionary.What is a
best solution?
Thanks
Lad
What about (not tested):
Dear Limin,
Tao Script with its 300 KByte of code is so small,
that one just must love it forgiving all its baby
troubles.
After changes (see below) to the code in taoModule.cpp
necessary because my compiler claimed repeated definition
of 'ref' e.g. in the section:
if(TaoReference
I can't resist to point here to the
Re: How to input one char at a time from stdin?
posting in this newsgroup to demonstrate, what
this thread is about.
Claudio
On Tue, 25 Jan 2005 12:38:13 -0700, Brent W. Hughes
[EMAIL PROTECTED] wrote:
I'd like to get a character from stdin, perform some
On my 2.8GHz P4, Windows 2000 SP4 with Python 2.3.4 I am getting
totally different results compared to Ray. Does Python 2.3.4 already
use the Pentium RTDSC instruction for clock()?
Claudio
# \ Claudio Grondi, 2.8GHz P4 Python 2.3.4 (2005-01-24 14:32)
# time of taking time
You don't have to rely on expensive and proprietary EDI conversion software
to parse, validate, and translate EDI X12 data to and from XML; you can
build your own translator with any modern programming language, such as
Python.
by Jeremy Jones
http://sourceforge.net/project/showfiles.php?group_id=50346
shows the date of release of pyscript-0.5 as:
2004-05-11 07:00
What is then the reason for this [ANN] ?
Claudio
Paul Cochrane [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
PyScript is a python module for
Hi,
I have just by chance discovered, that Microsoft research
works on a kind of programming language called AsmL,
and I'm just curious if AsmL, which is using same concept
of significant indentation as Python language, was
developed fully independently or is there a kind of
relationship (same
301 - 330 of 330 matches
Mail list logo