PyWeek #3 has now finished with the judging results coming in and declaring
the winners to be:
Individual - Bouncy the Hungry Rabbit http://www.pyweek.org/e/bouncy/
Team - Typus Pocus http://www.pyweek.org/e/PyAr2/
Congratulations to everyone who entered! The full list of entries is
James Stroud schrieb:
I think I would like to know how to avoid or correct these sort of
issues in the future, which seem to be limited, for me at least, to
scipy and numpy, with the possible exception of MySQLdb and its
dependency on zlib. Ideally, I would like to understand exactly what
Rob Williscroft schrieb:
Having read Noel Byron's reply also, I'm tempted to say there is
some confusion here between a Visual *Studio* toolkit (VS 2003)
and a Visual *C++* toolkit (VC 2003).
Ah, that could well be.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
metaperl wrote:
Hello, I am looking for a module which has
* log levels
* output to stdout and file (either/or based on config)
* nicely formatted log output (e.g., indentation when appropriate)
I tried to use cheeseshop to find such a module, but came up short. I
clicked on
Browse Tree -
milan_sanremo schrieb:
cc -shared
build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/_tkinter.o
build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/tkappinit.o
-L/usr/openwin/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lX11 -o
build/lib.solaris-2.10-i86pc-2.5/_tkinter.so
Yet, the
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote:
Can doctests be added to nested functions too? (This can be useful to
me, I use nested function when I don't have attributes that I have to
remember, but I want to split the logic in some subparts anyway).
I think we had that discussion
how to remember login in zope?
so when user came back , they needn't input username and password
again.
i'm using zope,extensiveuserfolder and cookiecrumbler,
exuserfolder is set to cookie-based authentication.
i'm not using cmf or plone , how could i handle this?
thanks a lot.
i'm working
Just wrote:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote:
Can doctests be added to nested functions too? (This can be useful to
me, I use nested function when I don't have attributes that I have to
remember, but I want to split the logic in some subparts anyway).
I think we
Hi,
I am running on WinXP so that is not so convenient to communicate
between separate processes.
In the past I have used blocking files but it may be a slow
communication way for some applications. It may also be too much
depending on the disk on which the program is run (network drives with
Ben Finney wrote:
James Stroud [EMAIL PROTECTED] writes:
rantI try things until a build works. I consider everything I do
until acquiring a working build as necessary. Going back to see
exactly what I did to make things work is not a viable option
Before trying such I don't know what I
Steve Holden wrote:
Is this a serious suggestion, or simply an attempt at sardonic obscurantism?
Well, I was being serious, but now I'm afraid to see what kind of evils
I've acidentally stepped in, heh!? I honestly don't see anything wrong
with creating a DSL for a given problem domain. Where
Hi,
I use SkunkWeb as my application server for my web application. I
intend to put up a blog on the website but I haven't been able to find
out a good blogging software for SkunkWeb. Most of them are based on
Zope/Plone or use CGI or mod_python.
The basic features I need are:
1. Multi-user
metaperl wrote:
Hello, I am looking for a module which has
* log levels
* output to stdout and file (either/or based on config)
* nicely formatted log output (e.g., indentation when appropriate)
Sorry for being nosey, but how'd you use indentation in a log?
Regards,
Björn
--
BOFH excuse
Jay wrote:
How would I be able to grab random words from an internet source.
I'd like to grab a random word from a comprehensive internet
dictionary. What would be the best source and the best way to go
about this?
The *best* source would be a function of the internet dictionary
that
Martin v. Löwis wrote:
James Stroud schrieb:
I think I would like to know how to avoid or correct these sort of
issues in the future, which seem to be limited, for me at least, to
scipy and numpy, with the possible exception of MySQLdb and its
dependency on zlib. Ideally, I would like to
Robert Kern wrote:
I think he wants a no-install (or, perhaps more accurately,
simply-unzip-to-install) version of the interpreter that doesn't
need to touch the Windows registry or copy DLLs to system
locations. py2exe builds such a thing (or nearly so) for the
application itself, if it
Robert Kern wrote:
Okay, this is possibly part of the problem. numpy.distutils handles
FORTRAN code differently than other extension modules; this is why pure
C extension modules both inside numpy and elsewehere were linking fine.
Try unsetenving $CPPFLAGS and $LDFLAGS and adding those
At Saturday 23/9/2006 06:35, Bjoern Schliessmann wrote:
Hello, I am looking for a module which has
* log levels
* output to stdout and file (either/or based on config)
* nicely formatted log output (e.g., indentation when appropriate)
Sorry for being nosey, but how'd you use indentation in
Opinions?
Great :)
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
[log w/indentation]
I do - what's wrong? Imagine the following on a single line...
Ah, K. Got it :)
Regards,
Björn
--
BOFH excuse #351:
PEBKAC (Problem Exists Between Keyboard And Chair)
--
http://mail.python.org/mailman/listinfo/python-list
Jay:
How would I be able to grab random words from an internet source. I'd
like to grab a random word from a comprehensive internet dictionary.
What would be the best source and the best way to go about this?
Why do you need to grab them from the net?
A simpler solution seems to keep a local
A new cookbook recipe suggesting two decorators @throws and @catches
for treatment of checked exceptions in Python:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131
This might be of practical interest for some and theoretical interest
for others - in particular those who know
Robert Kern wrote:
metaperl wrote:
Hello, I am looking for a module which has
You should look in the standard library before hitting the Package Index.
http://www.python.org/doc/current/lib/module-logging.html
Very nice module. Thanks for the pointer.
--
I learned about Python regular expressions from the Web documentation
http://docs.python.org/lib/lib.html. This describes a module named re.
Then I saw some code written by a colleague, and he was using a module
named sre. I checked my Python 2.4.3 installation, and sure enough, I
have a module
Kay Schluehr wrote:
A new cookbook recipe suggesting two decorators @throws and @catches
for treatment of checked exceptions in Python:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131
This might be of practical interest for some and theoretical interest
for others - in
The escape function in the cgi module escapes characters with special
meanings in HTML. The ones that need escaping are '', '' and ''.
However, cgi.escape only escapes the quote character if you pass a second
argument of True (the default is False):
cgi.escape(the \quick\ brown fox)
In message [EMAIL PROTECTED], Kay
Schluehr wrote:
A new cookbook recipe suggesting two decorators @throws and @catches
for treatment of checked exceptions in Python:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131
This might be of practical interest for some and theoretical
In message [EMAIL PROTECTED], Bjoern Schliessmann wrote:
In my C++ code,
it happens so often that I forget or overread a !. And if I want
to understand my functions later on, my brain quite wrinkles
looking at parentheses, !s, s and ||s.
Which is why C++ allows not, and and or.
--
In message [EMAIL PROTECTED],
MonkeeSage wrote:
I don't really see anything wrong with creating a custom class for
evaluating those kinds of logical statements. It does make the code for
statements more concise and easy to follow (with less binding
ambiguity).
Why not express everything in
Need compile python code, source is in html and starts with parameters:
#!/bin/sh -
exec python -O $0 $@
I have installed ActivePython for windows.
--
http://mail.python.org/mailman/listinfo/python-list
Franz Steinhaeusler wrote:
Hello NG,
I have a suggestion.
For simplifying learning or switching between different GUI
Toolkits, I could imagine to have one short clearly presented
program in different GUI Toolkits.
Anybody is interested in implementing in one other GUI?
We could put in
Another approach would be to just scrape a CS's random (5.75 x 10^30)
word haiku generator. ;)
import urllib
import libxml2
import random
uri = 'http://www.cs.indiana.edu/cgi-bin/haiku'
sock = urllib.urlopen(uri)
data = sock.read()
sock.close()
doc = libxml2.htmlParseDoc(data, None)
Bjoern Schliessmann wrote:
metaperl wrote:
Hello, I am looking for a module which has
* log levels
* output to stdout and file (either/or based on config)
* nicely formatted log output (e.g., indentation when appropriate)
Sorry for being nosey, but how'd you use indentation in a log?
Lawrence D'Oliveiro wrote:
I learned about Python regular expressions from the Web documentation
http://docs.python.org/lib/lib.html. This describes a module named re.
Then I saw some code written by a colleague, and he was using a module
named sre. I checked my Python 2.4.3 installation, and
In message [EMAIL PROTECTED], Peter Otten wrote:
Lawrence D'Oliveiro wrote:
I learned about Python regular expressions from the Web documentation
http://docs.python.org/lib/lib.html. This describes a module named
re. Then I saw some code written by a colleague, and he was using a
module
Steve Holden wrote:
Ilias Lazaridis wrote:
Steve Holden wrote:
...
Though of course the easiest way to enforce your classes to new style is
to begin each module with
__metaclass__ = type
I assume placing this in the central site import (e.g.
sitecustomize.py) would collapse python? (I
Why doesn't MySQLdb provide a function like this:
def QuoteSQL(Str, DoWild) :
returns a MySQL string literal which evaluates to Str. Needed
for those times when MySQLdb's automatic quoting isn't good enough.
Result = []
for Ch in str(Str) :
if Ch == \0 :
Ch =
Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED],
MonkeeSage wrote:
I don't really see anything wrong with creating a custom class for
evaluating those kinds of logical statements. It does make the code for
statements more concise and easy to follow (with less binding
ambiguity).
mistral wrote:
Need compile python code, source is in html and starts with
parameters:
Excuse me?
#!/bin/sh -
exec python -O $0 $@
Is the line break intended?
I have installed ActivePython for windows.
What exactly do you want?
Python code is always compiled (to byte code) before it's
MonkeeSage wrote:
Why not express everything in Conjunctive Normal Form?
[snip]
Oh, you meant the actual form. Duh! Yeah, that would work. For some
reason I was thinking you were asking why I didn't implement the
standard symbols, sorry.
Regards,
Jordan
--
Lawrence D'Oliveiro wrote:
Which is why C++ allows not, and and or.
Is this standards compliant? My reference (book) doesn't contain it,
but g++ allows it.
Regards,
Björn
--
BOFH excuse #441:
Hash table has woodworm
--
http://mail.python.org/mailman/listinfo/python-list
Bjoern Schliessmann wrote:
Lawrence D'Oliveiro wrote:
Which is why C++ allows not, and and or.
Is this standards compliant? My reference (book) doesn't contain it,
but g++ allows it.
The C++ standard provides _operator keywords_ (Fig. 21.8) that can be
used in place of several C++
I enjoyed Paul Barry's September article in Linux Journal entitled,
Web Reporting with MySQL, CSS and Perl. It provides a simple,
elegant way to use HTML to display database content without any sql
markup in the cgi script. The cgi script simply calls the Mysql
command line with the HTML option
Lawrence D'Oliveiro wrote:
Why doesn't MySQLdb provide a function like this:
Because the author has read PEP 8?
--
http://mail.python.org/mailman/listinfo/python-list
This might be of practical interest for some and theoretical interest
for others - in particular those who know checked ex as a language
feature of Java.
The trouble with having to declare every possible exception that a
function might throw is that it rapidly turns into a complete mess.
Bjoern Schliessmann писал(а):
mistral wrote:
Need compile python code, source is in html and starts with
parameters:
Excuse me?
#!/bin/sh -
exec python -O $0 $@
Is the line break intended?
I have installed ActivePython for windows.
What exactly do you want?
Python code is
Bjoern Schliessmann писал(а):
mistral wrote:
Need compile python code, source is in html and starts with
parameters:
Excuse me?
#!/bin/sh -
exec python -O $0 $@
Is the line break intended?
I have installed ActivePython for windows.
What exactly do you want?
Python code is
Rob Williscroft wrote in news:Xns9846DDC7A18E0rtwfreenetREMOVEcouk@
216.196.109.145 in comp.lang.python:
That's yet another option. Somebody reported that the compiler in the
.NET SDK won't support generating optimized code, though. That's a
problem for some people.
I belive that was true
John Machin wrote:
daniel wrote:
there's a dll extension used to be imported with no error under version
2.4.3, but the new python complains that the name of the module can't
be found. seems not mentioned in the official documentation, any work
around to fix the issue without switching
Peter Otten wrote:
Kay Schluehr wrote:
A new cookbook recipe suggesting two decorators @throws and @catches
for treatment of checked exceptions in Python:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131
This might be of practical interest for some and theoretical
Hello,
Compiling f2py extensions in Linux is a trivial task, You can even
automate it with distutils. Now, in a Windows machine this does not
seem to be an easy task. At least, I could not find any decent tutorial
on how to do it.
Is there a way to do this? Can some one point me to a tutorial.,
On Wed, 20 Sep 2006 08:27:30 +0200, Franz Steinhaeusler wrote
(in article [EMAIL PROTECTED]):
What about for example wxProject?
What about something that could be actually useful for end-users? :-
E.g. a GUI wrapper for Httrack?
The back-end is already there:
Lawrence D'Oliveiro wrote:
Why doesn't MySQLdb provide a function like this:
def QuoteSQL(Str, DoWild) :
returns a MySQL string literal which evaluates to Str. Needed
for those times when MySQLdb's automatic quoting isn't good enough.
Presumably because you're expected to use
daniel wrote:
John Machin wrote:
daniel wrote:
there's a dll extension used to be imported with no error under version
2.4.3, but the new python complains that the name of the module can't
be found. seems not mentioned in the official documentation, any work
around to fix the issue
Hello!
I'm relatively new to python but I already noticed that many lines of
python code can be simplified to a oneliner by some clever coder. As
the topics says, I'm trying to split lines like this :
'foo bar- blah/hm.lala' - [foo, bar, blah, hm, lala]
'foobbbar.. xyz' - [foo, bbbar, xyz]
I'm no c programmer, and I'm a ctypes newbie. I'll frame my problem as
simply as I can. Sorry if it's too much or not enough info. I don't
expect an explicit answer (but maybe), just help figuring out how to debug.
WinXP, python 2.4.2
I'm using ctypes to access functions in a commercial
IDLE has an output format like this:
object
type 'object'
type
type 'type'
object.__class__
type 'type'
object.__bases__
How can I customize it to become like that:
object
type 'object'
type
type 'type'
object.__class__
type 'type'
object.__bases__
or that:
I'm relatively new to python but I already noticed that many lines of
python code can be simplified to a oneliner by some clever coder. As
the topics says, I'm trying to split lines like this :
'foo bar- blah/hm.lala' - [foo, bar, blah, hm, lala]
'foobbbar.. xyz' - [foo, bbbar, xyz]
I'm relatively new to python but I already noticed that many lines of
python code can be simplified to a oneliner by some clever coder. As
the topics says, I'm trying to split lines like this :
'foo bar- blah/hm.lala' - [foo, bar, blah, hm, lala]
'foobbbar.. xyz' - [foo, bbbar, xyz]
Now 2.5 is out, and we have a syntax for explicit relative imports
(PEP 328, http://www.python.org/dev/peps/pep-0328/, in case anyone
wasn't paying attention). The long-term plan is that the classical
import syntax becomes absolute import only, so that all imports are
explicitly one or the other.
James Stroud schrieb:
COMMENTARYThough great for self development, I'm not so sure such
lessons should be necessary to build these tools./COMMENTARY
Yes. The lesson you should take from this is: don't try to be smarter
than the authors of the software. It should build out of the box, if
you
thank you so much for your help..
I've got no idea about pyd or dll stuff, started to learn python just
several weeks ago.
so the implementation rules of python extension module must have been
changed, for now, I have to wait for the new release of that module and
switch back to python 2.4 to get
mistral wrote:
Just to comple python ode - it creates html page, nothing more, nothing
else.. Just generate one html page.
I *think* this is what you want:
python -O -m py_compile file.py
python file.pyo
See: http://docs.python.org/lib/module-pycompile.html
Regards,
Jordan
--
We are pleased to announce version 0.83.3 of our open-source
simulation, modeling, and analysis package PyDSTool. New features
include improved graphical capabilities in the PyCont bifurcation and
continuation sub-package and its interface with AUTO, and better
support for domain bound
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive, straightforward call.
And while there is a lot of help on embedding, I
volcano wrote:
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive, straightforward call.
And while there is a lot of
In article [EMAIL PROTECTED],
crystalattice [EMAIL PROTECTED] wrote:
From: Sebastian Bassi [EMAIL PROTECTED]
Date: Thurs, Aug 31 2006 7:51 am
Subject: Re: Timeline for Python?
Groups: comp.lang.python
I am working on a Python book, since it could be completed in about a
year (writing
From: Rrajal [EMAIL PROTECTED]
Date: Mon, Sep 18 2006 9:50 am
Subject: Re: Help
Groups: comp.lang.python
Hi there, I am new in this subject so could you please tell
me from where I can get help (or good e-book) of python?
do you have some kind of programming background? if so,
good intro
Lawrence D'Oliveiro wrote:
So I think the default for the second argument to cgi.escape should be
changed to True. Or alternatively, the second argument should be removed
altogether, and quotes should always be escaped.
you're confused: cgi.escape(s) is designed to be used for ordinary text,
What happens when you run C:\Python2.3\python.exe from the command
line (or the equivalent path)? How about pythonw.exe (or the windowed
equivalent, not sure about the naming)?
Are .py and .pyw files displayed with the correct icons?
Yes.
When installing Python packages, is Python 2.3
Gerard Flanagan wrote:
volcano wrote:
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive, straightforward call.
[EMAIL PROTECTED] wrote:
Is there a stand-alone version of python out there that I can package
with my scripts so that I don't have to bother with something like
py2exe?
why not just ship the standard python interpreter with your applications?
just make a copy of the c:\python24 (or 25)
deleted the core 2.3.4 distribution [from where? how?] or
uninstalled?
Uninstalled
Was c:\windows\system32\python23.dll blown away?
Yes, as part of the uninstall process.
Are you installing it for all users or for a single user?
ALl users, using Admin priveledges
Do a search for
volcano wrote:
Gerard Flanagan wrote:
volcano wrote:
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive,
Gerard Flanagan wrote:
volcano wrote:
Gerard Flanagan wrote:
volcano wrote:
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling -
MonkeeSage писал(а):
mistral wrote:
Just to comple python ode - it creates html page, nothing more, nothing
else.. Just generate one html page.
I *think* this is what you want:
python -O -m py_compile file.py
python file.pyo
See: http://docs.python.org/lib/module-pycompile.html
David Isaac [EMAIL PROTECTED] wrote:
What's New document for Python 2.5?
http://docs.python.org/dev/whatsnew/whatsnew25.html
pretends to hold it, but the links are corrupt.
It's without /dev/
--
Lawrence - http://www.oluyede.org/blog
Nothing is more dangerous than an idea
if it's the only
Alan Isaac [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Where does one get the
What's New document for Python 2.5?
http://docs.python.org/dev/whatsnew/whatsnew25.html
pretends to hold it, but the links are corrupt.
OK, here it is:
http://docs.python.org/whatsnew/whatsnew25.html
mistral wrote:
this not work for me, show compilation error. Is there simple way
compile pythone file? its absolutely unclear with command line. Just
show me exact command I need run(from python interactive shell?)
OK...
# cd to where the file.py is
$ cd /some/dir
# start python
These are csound files. Csound recently added python as a scripting
language and is allowing also allowing csound calls from outside of
csound. The nice thing about csound is that instead of worrying about
virus and large files it is an interpiter and all the files look
somewhat like html.
MonkeeSage wrote:
import py_compile
py_compiler.compile('file.py')
^^^
Should be:
py_compile.compile('file.py')
--
http://mail.python.org/mailman/listinfo/python-list
MonkeeSage wrote:
mistral wrote:
this not work for me, show compilation error. Is there simple way
compile pythone file? its absolutely unclear with command line. Just
show me exact command I need run(from python interactive shell?)
OK...
# cd to where the file.py is
$ cd /some/dir
Hello,
Copy
wxmsw26uh_vc.dll
inC:\python24\lib\site-packages\matplotlib\backends.To find
wxmsw26uh_vc.dll, you can
downloadwxPython2.6-win32-unicode-2.6.3.3-py24.exe,and execute in
aspecific directory and extract the file
wxmsw26uh_vc.dll(C:\...\wx-2.6-msw-unicode\wx)
Regards,
Michel
On 23 Sep 2006 12:24:58 -0700, mistral wrote
No, something is wrong there. what I need is just compile one python
file which will generate html page, with parameters:
exec python -O $0 $@
This is not a python script. It appears to be a Unix shell script that calls a
python script.
Maybe it
mistral wrote:
No, something is wrong there. what I need is just compile one python
file which will generate html page, with parameters:
exec python -O $0 $@
just need simple way do this(script is correct), i will not set any
patches anywhere, can i do this wrom normal GUI?
Hmmm... Are you
Dennis Lee Bieber schrieb:
On 23 Sep 2006 09:24:09 -0700, daniel [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
so the implementation rules of python extension module must have been
changed, for now, I have to wait for the new release of that module and
No change...
Flavio wrote:
Hello,
Compiling f2py extensions in Linux is a trivial task, You can even
automate it with distutils. Now, in a Windows machine this does not
seem to be an easy task. At least, I could not find any decent tutorial
on how to do it.
Is there a way to do this? Can some one
My understanding of the __future__ statement is that you may say
something like:
from __future__ import foo, bar
to enable more than one feature. However, this does not seem to be
working properly in 2.5; it behaves as expected when typed into the
interactive interpreter, but not when it is in
crystalattice a écrit :
I've been working on a game for several months but now I'm thinking I
may be going about it the wrong way. It's an online RPG designed to
recreate a pen paper session, kind of like the OpenRPG project.
Originally I planned on doing something like OpenRPG with a
help figuring out how to debug ... ctypes ...
a commercial dll. A certain function takes five arguments, foo(a, b, c, d,
e).
Can I view the appropriate stack? ... Any other ideas or advice? etc?
Did you call the foo of _cdecl ctypes.cdll or the foo of _stdcall =
ctypes.windll?
What is the
sam a écrit :
i am starting to experiment with recursion, and decided to write a
fairly trivial little program which took a float as input, then called
a function to halve it recursively until it was less than 1:
And forgot to return the result from the recursive call, I guess ?-)
--
Is my mind playing tricks on me? I really remember being able to
reverse a string as in:
text='greg'
print text.reverse()
'gerg'
Is it possible thats in some Python install and not in others? I just
switched to linux.
In any case, can we get that added?
Here's my workaround for now:
def
Gregory Piñero wrote:
Is my mind playing tricks on me? I really remember being able to
reverse a string as in:
text='greg'
print text.reverse()
'gerg'
Is it possible thats in some Python install and not in others? I just
switched to linux.
In any case, can we get that added?
Not in
Neil Cerutti a écrit :
(snip)
It's not out of the kindness of our hearts that we help. Heck, I
don't know what it is. Probably I just like reading my own drivel
on the internet and occassionally helping others is a good
excuse.
Lol !-)
+1 OTQOTW
--
Gregory Piñero wrote:
Is my mind playing tricks on me? I really remember being able to
reverse a string as in:
text='greg'
print text.reverse()
'gerg'
That method has never existed AFAIK. Maybe you're thinking of the
reverse() method on lists?
In any case, the you can reverse strings in
George Sakkis a écrit :
Daniel Nogradi wrote:
In a recent thread,
http://mail.python.org/pipermail/python-list/2006-September/361512.html,
a couple of very useful and enlightening itertools examples were given
and was wondering if my problem also can be solved in an elegant way
by itertools.
I
That 'foo'[::-1] is the Python reverse string idiom I'll try here
forward, thanks.
Also '.h.e.l.l.o'[1::2] to pick out every second char, etc., thanks.
Three footnotes:
1) Reverse string isn't yet in http://www.python.org/doc/faq/
2) Google Groups searches here yesterday instead pushed me
Thanks to all who answered.
On Friday 22 September 2006 17:28, Marc 'BlackJack' Rintsch wrote:
Christoph Haas wrote:
TestModule.py
globalvar = 0
def def1():
print globalvar
def def2(foo=globalvar):
print foo
On 9/23/06, Robert Kern [EMAIL PROTECTED] wrote:
Not in that form, no, since this already exists:
text[::-1]
Wow, that's really cool! Here are my questions:
1. How long has this thing been going on? I didn't know slice even
took an extra argument like that.
2. Where can I get the lowdown
MonkeeSage wrote:
The C++ standard provides _operator keywords_ (Fig. 21.8) that
can be used in place of several C++ operators. (Deitel Deitel,
2001; 1082).
Thanks. Only if I'd known that earlier ;)
Regards,
Björn
--
BOFH excuse #39:
terrorist activities
--
1 - 100 of 176 matches
Mail list logo