What: Python Programming I: Introduction to Python
When: February 1-3, 2006
Where: San Francisco, CA, USA
Web:http://cyberwebconsulting.com
Need to get up-to-speed with Python as quickly as possible? Come join
us in beautiful Northern California for another rigorous Python
training
It is with great pleasure that JanRain, Inc. announces version 1.0 of
the Python OpenID library. This library contains packages to support
both OpenID consumers (relying parties) and servers. For back-end
storage, it supports a variety of methods, including flat file, SQL, and
MemCached.
In our
Hi.
I'm pleased to announce the twenty-seventh development release of PythonCAD,
a CAD package for open-source software users. As the name implies,
PythonCAD is written entirely in Python. The goal of this project is
to create a fully scriptable drafting program that will match and eventually
As long as memory mapped files are available, the fastest
method is to map the whole file into memory and use the
mappings rfind method to search for an end of line.
The following code snippets may be usefull:
reportFile = open( filename )
length = os.fstat( reportFile.fileno()
Op 2005-12-07, Zeljko Vrba schreef [EMAIL PROTECTED]:
On 2005-12-07, Antoon Pardon [EMAIL PROTECTED] wrote:
What I don't understand is, that most people who have a problem
with scope by indentation, want to introduce braces. I think
braces are the worst solution.
Braces are very convenient
Op 2005-12-07, Steven D'Aprano schreef [EMAIL PROTECTED]:
On Wed, 07 Dec 2005 15:26:59 +, Zeljko Vrba wrote:
Braces are very convenient to match block start and end. Open a C program
in the VI editor, and press % in command mode on some brace.. It will take
you to its matching brace. How
David Bear [EMAIL PROTECTED] wrote:
Being new to pgdb, I'm finding there are lot of things I don't understand
when I read the PEP and the sparse documentation on pgdb.
I was hoping there would be a module that would properly escape longer text
strings to prevent sql injection -- and other things
[EMAIL PROTECTED]
i want to check the position of a volume in a particular
drive. say for example in a disk i have 3 different drives:
C:\ , D:\ and E:\.
Now if i want to check what position is the D:\ in, how
can i write the code. Means whether its in a 0th position
or 1st position or
Bugs wrote:
I believe I read in a relatively recent thread that the reason
python24.dll is so large compared to previous releases is that all the
language encodings are linked into the library?
Not only that (but also). In addition, it also contains modules that
were previously implemented
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
I suspect I'd have a harder time living without the sys module than with
many of the builtins. Then there's os, re, math, ... Some modules, like
thread and sys, have to be linked into the interpreter. Are they core or
add on? Once you
using pyparsing to deal with nested tables , wanna keep table's
structure and propertys .
but program was chunked with the /td tag of inner table.
have any ideas?
here's the program
from pyparsing import *
mytable =
table id=leftpage_table width=156 border=0 cellspacing=0
cellpadding=0
tr
Frank Potter wrote:
Thank you very much.
Steve Holden, I post my soucecode at my blog here:
http://hiparrot.wordpress.com/2005/12/08/implementing-a-simple-net-spider/
http://hiparrot.wordpress.com/2005/12/08/implementing-a-simple-net-spider/
I wish you can read and give me some suggestion.
ex_ottoyuhr wrote:
I'm trying to create a function that can take arguments, say, foo and
bar, and modify the original copies of foo and bar as well as its local
versions -- the equivalent of C++ funct(foo, bar).
This is already what you have. In Python, all you have are references to
objects,
Michael Spencer wrote:
[...]
Allowing quotation, almost anything is possible, e.g.,
Fred! Where Guido had had had, Had had had had had. Had had had a
better
effect on the reader
or simply
fred, where Guido had had had had had had had had had had, had a better
effect on the reader
astarocean wrote:
using pyparsing to deal with nested tables , wanna keep table's
structure and propertys .
but program was chunked with the /td tag of inner table.
have any ideas?
here's the program
from pyparsing import *
... snip ...
tablePattern = Forward()
... snip ...
Steven D'Aprano wrote:
On Wed, 07 Dec 2005 10:59:09 +0100, Sybren Stuvel wrote:
[...]
But then you have all these small functions lying around in your module.
If you intend to use them multiple times, then obviously you should
keep them. But if they are intended to be used once, and once only,
David Bear wrote:
Being new to pgdb, I'm finding there are lot of things I don't understand
when I read the PEP and the sparse documentation on pgdb.
I was hoping there would be a module that would properly escape longer text
strings to prevent sql injection -- and other things just make sure
Paul Rubin wrote:
Steve Holden [EMAIL PROTECTED] writes:
All joking aside, when I have names (temporary variables or scaffolding
functions) that I need to initialise a module or data structure, but then
outlive their usefulness, I del the name afterwards. Am I the only one? I
can't say I've
On 12/8/05, shawn a [EMAIL PROTECTED] wrote:
Hello. Im brand new to this list and to python. Ive recently started
reading about it
and am now in the tinkering stage.
Welcome to Python!
I have a script im working on that i
need some
asistance debugging. Its super small and should be a
Frank Millman wrote:
Each of the API's includes the capability of passing commands in the
form of 'string + parameters' directly into the database. This means
that the data values are never embedded into the SQL command at all,
and therefore there is no possibility of injection attacks.
I think that's supposed to be [(i + j) % 2] for the index to the
(green,red) tuple
(since i*8 is always even).
[EMAIL PROTECTED] wrote:
Mike,
Thanks for your insight. It has been a big help.
I guess I was trying to learn too much with my original code. Trying to
implement inheritance,
[EMAIL PROTECTED] wrote:
ElementTree on the other hand provides incredibly easy access to XML
elements and works in a more Pythonic way. Why has the API not been
included in the Python core?
I'd really like to see that too. Sure, it's fairly trivial to install
it, but each different package
Hi,
I tried something like this but the umask part does not work clearly...:
newpid =
os.spawnle(os.P_NOWAIT,'/usr/bin/touch','/usr/bin/touch','xyz','umask 0113')
What would be the correct syntax for setting the umask for the created
process...?
Best regards,
Yves
--
Mike Meyer wrote:
ex_ottoyuhr [EMAIL PROTECTED] writes:
I'm trying to create a function that can take arguments, say, foo and
bar, and modify the original copies of foo and bar as well as its local
versions -- the equivalent of C++ funct(foo, bar).
C++'s '' causes an argument to be passed
Bernd wrote:
I'm on a Linux env and try to get
word completion form sdtin done,
like Perl's
$stdin = Complete( \t: , @choices );
What I have so far shows me the directory listing
on the second hit on TAB and not the list of
choices on the first like I wanted to have.
your completer
Yves Glodt wrote:
I tried something like this but the umask part does not work clearly...:
newpid =
os.spawnle(os.P_NOWAIT,'/usr/bin/touch','/usr/bin/touch','xyz','umask 0113')
What would be the correct syntax for setting the umask for the created
process...?
not sure, but something like
Fredrik Lundh wrote:
Yves Glodt wrote:
I tried something like this but the umask part does not work clearly...:
newpid =
os.spawnle(os.P_NOWAIT,'/usr/bin/touch','/usr/bin/touch','xyz','umask 0113')
What would be the correct syntax for setting the umask for the created
process...?
not
Magnus Lycka wrote:
We're deploying our software on a number of different platforms. We
certainly depend on Python, so a standard Python install will always
be included. Using standard library modules is for free. Using yet
another third party library has a cost, even if some Cheese Shop or
Fredrik Lundh wrote:
Frank Millman wrote:
Each of the API's includes the capability of passing commands in the
form of 'string + parameters' directly into the database. This means
that the data values are never embedded into the SQL command at all,
and therefore there is no possibility of
Hello,
what is a way to get the the extension of a filename from the path?
E.g., on my XP windows the path can be
C:\Pictures\MyDocs\test.txt
and I would like to get
the the extension of the filename, that is here
txt
I would like that to work on Linux also
Thank you for help
L.
--
Fredrik Lundh wrote:
Steven Bethard wrote:
ElementTree on the other hand provides incredibly easy access to XML
elements and works in a more Pythonic way. Why has the API not been
included in the Python core?
While I fully agree that ElementTree is far more Pythonic than the
Lad wrote:
Hello,
what is a way to get the the extension of a filename from the path?
E.g., on my XP windows the path can be
C:\Pictures\MyDocs\test.txt
and I would like to get
the the extension of the filename, that is here
txt
I would like that to work on Linux also
Thank you for
[EMAIL PROTECTED] wrote:
I think some people were hoping that instead of adding these things
to
the standard library, we would come up with a better package manager
that would make adding these things to your local library much
simpler.
STeVe
On Thu, 8 Dec 2005, Lad wrote:
what is a way to get the the extension of a filename from the path?
E.g., on my XP windows the path can be
C:\Pictures\MyDocs\test.txt
and I would like to get
the the extension of the filename, that is here
txt
You want os.path.splitext:
import os
Giovanni Bajo wrote:
One thing I really fear about the otherwise great EasyInstall (and
Python Eggs) is that we could forget about...
... how important is to have a standard library. The fact that it's easy to
install external modules shouldn't make us drop the standard library. A
standard
Lad [EMAIL PROTECTED] wrote:
what is a way to get the the extension of a filename from the path?
E.g., on my XP windows the path can be
C:\Pictures\MyDocs\test.txt
and I would like to get
the the extension of the filename, that is here
txt
I would like that to work on Linux also
Thank
Paul McGuire wrote:
Load Forward's with '' instead of '='. Change:
tablePattern = getMultiLevelPattern('table',trPattern)
to:
tablePattern getMultiLevelPattern('table',trPattern)
I think that is all you needed.
Awesome job! (Also check out the pyparsing built-ins for making HTML
Lad wrote:
Hello,
what is a way to get the the extension of a filename from the path?
E.g., on my XP windows the path can be
C:\Pictures\MyDocs\test.txt
and I would like to get
the the extension of the filename, that is here
txt
I would like that to work on Linux also
Thank you for
Fredrik Lundh wrote:
but seriously, given how easy it is to build things with distutils, I don't
think your
configuration folks would have much trouble adding support for anything that
has
a setup file, and is reasonably self-contained to their build scripts.
True. It's one more thing to
Here is my situation:
I am trying to programatically access files created on an IBM AIX
system, stored on a Sun OS 5.8 fileserver, through a samba-mapped drive
on a Win32 system. Not confused? OK, let's move on... ;-)
When I ask for an os.listdir() of a relevant directory, I get filenames
with
Yves Glodt wrote:
It does, I did like this:
os.umask(0113)
newpid =
os.spawnl(os.P_NOWAIT,'/usr/local/bin/wine','/usr/local/bin/wine',executable)
But I wanted to use spawnle and it's env argument, to avoid setting
umask manually...
The umask is not part of the environment, so there's no
Wolfgang Keller wrote:
Hello,
does anyone know of Python modules for OLAP work? E.g. efficient
manipulation of large multi-dimensional structures (arrays) of arbitrary
(not only numeric) data?
TIA,
Sincerely,
Wolfgang Keller
Perhaps this might be useful:
[EMAIL PROTECTED] writes:
hi
I have a file which is very large eg over 200Mb , and i am going to
use python to code a tail command to get the last few lines of the
file. What is a good algorithm for this type of task in python for
very big files? Initially, i thought of reading everything
On 7 Dec 2005 05:51:45 -0800,
Iain King [EMAIL PROTECTED] wrote:
Argh, you made me look at the html again - at least now I know *why* it
is so disgusting. I understand there's a new version coming out soon,
hopefully in html 4 strict or xhtml. I'm sure at that point it'll be
easier
ElementTree on the other hand provides incredibly easy access to XML
elements and works in a more Pythonic way. Why has the API not been
included in the Python core?
Magnus I'd really like to see that too. Sure, it's fairly trivial to
Magnus install it, but each different
ElementTree on the other hand provides incredibly easy access to XML
elements and works in a more Pythonic way. Why has the API not been
included in the Python core?
I think the key here is ElementTree's Pythoninc API. While it's clearly
possible to install it as a third-party
Dan M wrote:
Dennis Benzinger wrote:
Is there a Python web publishing framework like Cocoon?
How about:
[List of the usual suspects]
just to name a few of my favorites. Take a look at
http://wiki.python.org/moin/WebProgramming for a more complete list.
Although it is good advice to
QOTW: ... and to my utter surprise it worked. - Andrew Nagel on
his move from wxPython to programming Tkinter in desperation
Python has more web application frameworks than keywords. - Skip
Montanaro (but probably others going back years)
Frithiof Andreas Jensen writes frankly on use of
David Wahler wrote:
Yves Glodt wrote:
It does, I did like this:
os.umask(0113)
newpid =
os.spawnl(os.P_NOWAIT,'/usr/local/bin/wine','/usr/local/bin/wine',executable)
But I wanted to use spawnle and it's env argument, to avoid setting
umask manually...
The umask is not part of the
Thanks, exactly what I was looking for.
I should go and buy you book ;-)
Bernd
Fredrik Lundh wrote:
Bernd wrote:
I'm on a Linux env and try to get
word completion form sdtin done,
like Perl's
$stdin = Complete( \t: , @choices );
What I have so far shows me the directory listing
on the
Thanks Phil,
Good idea, I had failed to notice these code examples and been
struggling the qt3 examples from pyqtsrc.tgz for months.
So, I found my mistake, I was using a 8*8 bitmap, I have now corrected
it and use a 16*16 bitmap (which is the standard size on Mac OS X) read
in from a PNG file
Fredrik Lundh wrote:
on the other hand, for maximum portability, you can use
f, e = os.path.splitext(filename)
if e.startswith(os.extsep):
e = e[len(os.extsep):]
if e == txt:
...
Is there ever a time when the original `e` could evaluate True, yet not
utabintarbo wrote:
I am trying to programatically access files created on an IBM AIX
system, stored on a Sun OS 5.8 fileserver, through a samba-mapped drive
on a Win32 system. Not confused? OK, let's move on... ;-)
When I ask for an os.listdir() of a relevant directory, I get filenames
with
Gerald Klix [EMAIL PROTECTED] wrote:
As long as memory mapped files are available, the fastest
method is to map the whole file into memory and use the
mappings rfind method to search for an end of line.
Excellent idea.
It'll blow up for large 2GB files on a 32bit OS though.
--
Nick
On Wed, 07 Dec 2005 12:10:18 -0500,
Kent Johnson [EMAIL PROTECTED] wrote:
OK I'll bite. That Beginners Guide page has bugged me for a long time.
It's a wiki page but it is marked as immutable so I can't change it.
Here are some immediate suggestions:
Good suggestions; thanks! I've
Hi,
I need to look into serialization for python objects, including codes,
recursive types etc etc. Currently, I have no idea exactly what needs to
be serialized, so my scope is to be as wide as possible.
I understand that marshal is extended by pickle to serialize class
instances, shared
On 8 Dec 2005 08:17:14 GMT in comp.lang.python, Antoon Pardon
[EMAIL PROTECTED] wrote:
[...]
I just think braces are the worst solution for it, as python is
concerned.
Agreed. A model like Modula-2's would be much preferable, and in fact
is supported (but not enforced) today (as long as you
I still hope that the standard distribution will, in a not too distant future,
bundle more external libraries. as things are today, including something
in the core means that you have to transfer code and rights to the PSF.
Your description of how to include something in the core isn't
Kent Johnson [EMAIL PROTECTED] writes:
Mike Meyer wrote:
ex_ottoyuhr [EMAIL PROTECTED] writes:
I'm trying to create a function that can take arguments, say, foo and
bar, and modify the original copies of foo and bar as well as its local
versions -- the equivalent of C++ funct(foo, bar).
C++'s
Thank you ALL for help
Regards,
L.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
Rocco Moretti wrote:
Insert punctuation capitalization to make the following a correct and
coherent (if not a little tourtured).
fred where guido had had had had had had had had had had had a better
effect on the reader
punctuation, including quote marks, I
utabintarbo wrote:
I am trying to programatically access files created on an IBM AIX
system, stored on a Sun OS 5.8 fileserver, through a samba-mapped drive
on a Win32 system. Not confused? OK, let's move on... ;-)
When I ask for an os.listdir() of a relevant directory, I get filenames
Gerald Klix [EMAIL PROTECTED] wrote:
As long as memory mapped files are available, the fastest
method is to map the whole file into memory and use the
mappings rfind method to search for an end of line.
Actually mmap doesn't appear to have an rfind method :-(
Here is a tested solution
Post-modernism, Academia, and the Tech Geeking fuckheads
• the Sokal Affair
http://en.wikipedia.org/wiki/Sokal_Affair
• SCIGen and World Multi-Conference on Systemics, Cybernetics and
Informatics
http://pdos.csail.mit.edu/scigen/
• What are OOP's Jargons and Complexities, Xah Lee
utabintarbo wrote:
Here is my situation:
I am trying to programatically access files created on an IBM AIX
system, stored on a Sun OS 5.8 fileserver, through a samba-mapped drive
on a Win32 system. Not confused? OK, let's move on... ;-)
When I ask for an os.listdir() of a relevant
On 6 Dec 2005 14:02:37 -0800, Peter wrote:
I have a problem which seems to come up from time to time but I can't
find anything relevant in the archives. I have used PIL v1.1.5 with no
problem on Windows for some time but now wish to put it on Linux (Suse
Linux v10.0). I obtained and built
On Wed, 07 Dec 2005 12:58:36 -0800,
Michael Spencer [EMAIL PROTECTED] wrote:
I experimented with some more re-organization, but I don't see away
to attach the resulting file in the SF comments, so I'll post it
here instead.
I've attached your file to the patch. Some comments:
On Wed, 07 Dec 2005 12:33:07 -0600 in comp.lang.python, Rocco Moretti
[EMAIL PROTECTED] wrote:
[...]
fred where guido had had had had had had had had had had had a better
effect on the reader
I've seen this before as
bill had had had but will had had had had had had or had had been
correct
Andrew,
The site changes for the new-to-Python person are a big improvement in
terms of the sequence of exposures, but from a marketing perspective,
the first thing they read about Python is still aimed at a programmer.
The bulleted points in BeginnersGuide/Overview are, again, things that
are
A.M. Kuchling wrote:
On Wed, 07 Dec 2005 12:10:18 -0500,
Kent Johnson [EMAIL PROTECTED] wrote:
OK I'll bite. That Beginners Guide page has bugged me for a long time.
It's a wiki page but it is marked as immutable so I can't change it.
Here are some immediate suggestions:
Good
Lad wrote:
Thank you ALL for help
Regards,
L.
addendum: ASPN Python cookbook often has something relevant /
modifiable for your needs:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81931
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52661
(in this case code from 2001 / 2
On Thu, 08 Dec 2005 22:42:32 +0800, Maurice LING [EMAIL PROTECTED] wrote:
Hi,
I need to look into serialization for python objects, including codes,
recursive types etc etc. Currently, I have no idea exactly what needs to
be serialized, so my scope is to be as wide as possible.
I understand that
On Wed, 07 Dec 2005 10:36:52 -0600,
A.M. Kuchling [EMAIL PROTECTED] wrote:
of the seealso environment. I'll talk to Fred about it and begin
assembling a patch.
Patch #1376361: http://www.python.org/sf/1376361 . I still need to talk
to Fred about this.
--amk
--
utabintarbo wrote:
I am trying to programatically access files created on an IBM AIX
system, stored on a Sun OS 5.8 fileserver, through a samba-mapped drive
on a Win32 system. Not confused? OK, let's move on... ;-)
When I ask for an os.listdir() of a relevant directory, I get filenames
with
Mike Meyer wrote:
Your description of passes references by value is a description of
call by reference. C passes all arguments by value, to pass a
reference, the C programmer creates the reference to the value by
hand, then dereferences it by hand at the other end. So C's
call-by-reference
Hi Peter,
Could you give me detailed information about your idea.
Thanks,
Laya
--
http://mail.python.org/mailman/listinfo/python-list
A.M. Kuchling wrote:
of the seealso environment. I'll talk to Fred about it and begin
assembling a patch.
Patch #1376361: http://www.python.org/sf/1376361 . I still need to talk
to Fred about this.
cool. can you post a sample page somewhere?
/F
--
amk I wonder if the Internet chapter should be split into HTTP/Web
amk Tools (webbrowser, cgi, cgitb, httplib, urllib) and Non-Web
amk Protocols (ftplib, gopherlib, smtp, all the rest).
Note that cgitb works just fine in a non-web environment. I would actually
prefer it be renamed
In article [EMAIL PROTECTED],
Yves Glodt [EMAIL PROTECTED] wrote:
David Wahler wrote:
Yves Glodt wrote:
It does, I did like this:
os.umask(0113)
newpid =
os.spawnl(os.P_NOWAIT,'/usr/local/bin/wine','/usr/local/bin/wine',executabl
e)
But I wanted to use spawnle and it's env
Fredrik, you are a God! Thank You^3. I am unworthy /ass-kiss-mode
I believe that may do the trick. Here is the results of running your
code:
DIR = os.getcwd()
files = os.listdir(DIR)
file = files[-1]
file
'L07JS41C.04389525AA.QTR\xa6INR.E\xa6C-P.D11.081305.P2.KPF.model'
print file
Steven D'Aprano [EMAIL PROTECTED] wrote:
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
S
P
O
I
L
E
R
S
P
A
C
E
(Good grief, I've not done that in *years*.)
Buffalo from the city of Buffalo, which are intimidated by buffalo
from Buffalo, also intimidate buffalo from
François Pinard [EMAIL PROTECTED] wrote:
[AMK]
You may suggest that I should process my e-mail more promptly.
No, I'm not suggesting you how to work, no more that I would accept that
you force me into working your way. If any of us wants to force the
other to speak through robots, that one
Since copy_reg lets you specify arbitrary code to serialize arbitrary
objects, you shouldn't run into any single object that you cannot
serialize to a pickle.
In http://www.effbot.org/librarybook/pickle.htm, it specifically
mentions that code objects cannot be pickled and require the use
Hi all,
i am having a textfile which contains a single string with names.
I want to split this string into its records an put them into a list.
In normal cases i would do something like:
#!/usr/bin/python
inp = open(file)
data = inp.read()
names = data.split()
inp.close()
The problem is,
[EMAIL PROTECTED] wrote:
hi
I have a file which is very large eg over 200Mb , and i am going to use
python to code a tail
command to get the last few lines of the file. What is a good algorithm
for this type of task in python for very big files?
Initially, i thought of reading everything
[EMAIL PROTECTED] wrote:
I think the key here is ElementTree's Pythoninc API. While it's clearly
possible to install it as a third-party package, I think there's a clear
best-of-breed aspect here that suggests it belongs in the standard
distribution simply to discourage continued use of
You could also try the ping module that the Eddie monitoring tool has
been using successfully, cross-platform, for many years.
http://dev.eddie-tool.net/trac/browser/eddie/trunk/lib/common/Directives/pinger.py
Cheers,
Chris
Nico Grubert wrote:
I could not find any ping Class or Handler in
Does anyone know where I can find a 'connected component' image
processing function? I don't see it in numarray or scipy core...
In matlab the function is called bwlabel(bw,4);
and step 8 on this page is an example of what I'm trying to do:
Fredrik Lundh wrote:
David Bear wrote:
Being new to pgdb, I'm finding there are lot of things I don't understand
when I read the PEP and the sparse documentation on pgdb.
I was hoping there would be a module that would properly escape longer
text strings to prevent sql injection -- and
On Fri, 09 Dec 2005 02:17:10 +0800, Maurice LING [EMAIL PROTECTED] wrote:
Since copy_reg lets you specify arbitrary code to serialize arbitrary
objects, you shouldn't run into any single object that you cannot
serialize to a pickle.
[snip - example of pickling code objects]
I cannot
Thomas Liesner wrote:
Hi all,
i am having a textfile which contains a single string with names.
I want to split this string into its records an put them into a list.
In normal cases i would do something like:
#!/usr/bin/python
inp = open(file)
data = inp.read()
names = data.split()
Thomas Liesner wrote:
...
The only thing i can rely on, ist that the
recordseparator is always more than a single whitespace.
I thought of something like defining the separator for split() by using
a regex for more than one whitespace. RegEx for whitespace is \s, but
what would i use for
Hi Tom,
a regex for more than one whitespace. RegEx for whitespace is \s, but
what would i use for more than one? \s+?
For more than one, I'd use
\s\s+
-Jim
--
http://mail.python.org/mailman/listinfo/python-list
[Michael Hoffman]
Hi. I am trying to use unittest to run a test suite on some
scripts that do not have a .py extension.
[Sybren Stuvel]
I'd move the functionality of the script into a separate file that
does end in .py, and only put the invocation into the .py-less
script.
That's what I have
Steve Holden wrote:
Paul Rubin wrote:
I think it's a Python weakness that you can't declare a local var like
in other languages, to go out of scope at the end of the current block, e.g.:
if cond:
my x = 7# make a new scope for x, goes out of scope at end of if
If this
[EMAIL PROTECTED] wrote:
Could you give me detailed information about your idea.
I believe I just did.
Really, as I said, this is non-trivial. I can't give you a three
minute tutorial that will help you at all, especially if you haven't
read the information I pointed you to. (The page I
I don't know about anyone else, but you'd impress me much more if you
didn't swear in your posts. I am personally not offended, but it does
lower your credibility in my eyes. Just a tip.
Brad
--
http://mail.python.org/mailman/listinfo/python-list
The actress Margaret Anglin left this note in the dressing froom of
another actress:
'Margaret Anglin says Mrs. Fiske is the best actress in America.'
Mrs. Fiske added two commas and returned the note: 'Margaret Anglin,
says Mrs. Fiske, is the best actress in America.'
Or this, from a George
Steve Holden [EMAIL PROTECTED] writes:
if cond:
my x = 7# make a new scope for x, goes out of scope at end of if
If this genuinely troubles you then you can always isolate the scope
with a function, though of course you also no longer have the code
inline then.
I don't
P.S. Note that there is an additional complication resulting from the
fact that functions are descriptors:
class C(dict):
... pass
...
C.__iter__
slot wrapper '__iter__' of 'dict' objects
C().__iter__
method-wrapper object at 0x00E74A10
Even though the C instance is accessing the
1 - 100 of 158 matches
Mail list logo