Chicago Python User Group
=
Come join us for our best meeting ever!
Topics
--
* Google Code (Brian Fitzpatrick and Ben Collins-Sussman)
* Trac + Subversion + doctests (Garrett Smith)
* Special method names for operator overloading (Brian Ray)
Location
pyXSD v.0.1 has been released! pyXSD is a tool to map XML and XSD (XML Schema) into Python. It can validate an XML file against an XSD file. It also contains a feature to allow users to easily transform an XML file, using small python classes that are easy to use and are easy and fast for users to
Il Sun, 10 Sep 2006 19:15:40 +0200, David ha scritto:
The problem is that, when sizer2 containig hidden controls collapses to
zero dimensions, the panel resizes, but sizer1 and sizer0 don't!
Consequently the frame does not want to autoresize.
You con dowload the code here:
Licheng Fang wrote:
Oh, please do have a look at the second link I've posted. There's a
table comparing the regexp engines. The engines you've tested probably
all use an NFA implementation.
Sorry! *blush* I admit I skipped over your links. I'll have a look now.
BTW, just an idea that may or
Thank you very much, Tim and Monkee.
In fact, what I'm doing is handle a lot of regular expressions. I
wanted to build VERY LONG regexps part by part and put them all into a
file for easy modification and maintenance. The idea is like this:
(*INT) = \d+
(*DECIMAL) = (*INT)\.(*INT)
(*FACTION) =
Or mabye something like this is better:
def matcher(string, pattern):
out = ''
for match in re.findall(r'\S*%s\S*' % pattern, string):
if (len(match) = len(out)):
out = match
return out
p1 = 'dodad donkeykong dolittle dodaday'
p2 = 'oneself self-serving selfsufficient
In [EMAIL PROTECTED], metaperl wrote:
# Of course I could cheat and pass it, but I don't want to:
directories = data.storage.logic(__file__)
Why do you consider a plain and simple solution cheating?
Ciao,
Marc 'BlackJack' Rintsch
--
Gabriel Genellina wrote:
At Tuesday 5/9/2006 16:23, [EMAIL PROTECTED] wrote:
I would be surprised if they had never used ANY database. A little
thing like dynamic field typing will simply make it impossible to
migrate your Sqlite data to a *real* database.
Why not? Because it breaks the
I am looking for something like the caller() routine in Perl:
http://perldoc.perl.org/functions/caller.html
Look at the inspect module in Python's standard library.
Or is you're feeling lazy, have a look at the here function found in
[Licheng Fang[
...
In fact, what I'm doing is handle a lot of regular expressions. I
wanted to build VERY LONG regexps part by part and put them all into a
file for easy modification and maintenance. The idea is like this:
(*INT) = \d+
(*DECIMAL) = (*INT)\.(*INT)
(*FACTION) =
Licheng Fang wrote:
Oh, please do have a look at the second link I've posted. There's a
table comparing the regexp engines. The engines you've tested probably
all use an NFA implementation.
Unfortunately, the stuff about NFA's is wrong. Friedl's awful
book was the first time I saw this
A Comparison of Python Class Objects and Init Files for Program
Configuration
=
Terrence Brannon
[EMAIL PROTECTED]
[Licheng Fang]
Oh, please do have a look at the second link I've posted. There's a
table comparing the regexp engines. The engines you've tested probably
all use an NFA implementation.
[Bryan Olson]
Unfortunately, the stuff about NFA's is wrong. Friedl's awful
book
Strongly disagree: it's
Mike Owens wrote:
And if you say SQLite misrepresents itself,
then what do you say about MySQL, which until version 5 didn't have
views or triggers? In fact, it didn't even have subselects until
version 4. For a period of years, SQLite had more mainstream SQL
features than MySQL. Yet you
Auto-upgrade from what to what?
-Larry Bates
Interesting question.
In my case I want my program to check for (e.g.) bug-fix releases on
some location (network drive or ftp), and if available, allow to
automatically download and install them.
Kind of like the AutoUpgrade functionality in .net
At Thursday 7/9/2006 13:44, Omar wrote:
I'm working through a tutorial,
http://swaroopch.info/text/Byte_of_Python:Control_Flow, and I sorta
can't get through the tutorial without overcoming these little
speedbumps. This is why I'm asking these questions.
Have you read the Python tutorial
[EMAIL PROTECTED] wrote:
But it was stated in the sqlite docs that ALL SQL databases
use static types implying that sqlite will be incompatible
with any heavy database should the need arise to migrate
upwards. The issue is not that there will be compatibilty
problems with any data migration
At Thursday 7/9/2006 22:35, Roger wrote:
Anyone have an updated version of PILGraph beyond 0.1a7 or a suggestion
for a light-weight alternative?
pychart
Gabriel Genellina
Softlab SRL
__
Preguntá.
Oops! Sorry for the top-post!
--
http://mail.python.org/mailman/listinfo/python-list
"Frederic Wenzel" [EMAIL PROTECTED] Wrote:On
9/9/06, Frederic Wenzel [EMAIL PROTECTED] wrote: On
9/9/06, Hendrik van Rooyen [EMAIL PROTECTED]
wrote: | I wrote a script on Linux that uses pyserial to read
status messages | from a serial line using readlines(). For
now, it just displays
Chris Withers wrote:
Chris Withers wrote:
print msg.as_string()
MIME-Version: 1.0
Content-Type: text/plain; charset; charset=utf-8
^^^
Actually, even this isn't correct as you can see above...
charset = Charset('utf-8')
msg = MIMEText('','plain',None)
Paul Boddie wrote:
Bruno Desthuilliers wrote:
Wensheng a écrit :
I installed pysqlite2 using easy_install.
and got this when using it from modpython:
--
Mod_python error: PythonHandler
Tim Golden [EMAIL PROTECTED] wrote:
if os.path.isfile (filepath):
print filepath
You might get a more accurate result using
os.access(filepath, os.X_OK)
instead of
os.path.isfile(filepath)
Which checks the file is executable
--
Nick Craig-Wood [EMAIL PROTECTED] --
kondal wrote:
This is the way the regexp works python doesn't has anything to do with
it. It starts parsing the data with the pattern given. It returns the
matched string acording the pattern and doesn't go back to find the
other combinations.
I've recently had the same problem in Java,
Marty wrote:
On 9/11/06, Mike Owens [EMAIL PROTECTED] wrote:
I coworker pointed me to this thread.
Joy for us.
snipped good information
In all seriousness, the information you present here is great, and
much appreciated. Your sarcastic, condescending tone kind of gets in
the way of
[Nick Craig-Wood]
| Tim Golden [EMAIL PROTECTED] wrote:
| if os.path.isfile (filepath):
| print filepath
|
| You might get a more accurate result using
|
| os.access(filepath, os.X_OK)
|
| instead of
|
| os.path.isfile(filepath)
|
| Which checks the file is
Bryan Olson wrote:
Licheng Fang wrote:
Oh, please do have a look at the second link I've posted. There's a
table comparing the regexp engines. The engines you've tested probably
all use an NFA implementation.
Unfortunately, the stuff about NFA's is wrong. Friedl's awful
book was the
Ron Garret wrote:
In article [EMAIL PROTECTED],
Kent Johnson [EMAIL PROTECTED] wrote:
Steve Holden wrote:
Ron Garret wrote:
In article [EMAIL PROTECTED],
Steve Holden [EMAIL PROTECTED] wrote:
But basically, you aren't providing a CGI environment, and that's why
cgi.parse() isn't
Chris Withers wrote:
Okay, more out of desperation than anything else, lets try this:
from email.Charset import Charset,QP
from email.MIMEText import MIMEText
from StringIO import StringIO
from email import Generator,Message
Generator.StringIO = Message.StringIO = StringIO
charset =
Max M wrote:
From the docs:
The payload is either a string in the case of simple message objects or
a list of Message objects for MIME container documents (e.g. multipart/*
and message/rfc822)
Where'd you find that? I must have missed it in my digging :-S
Message objects are always
[EMAIL PROTECTED] wrote:
kondal wrote:
This is the way the regexp works python doesn't has anything to do with
it. It starts parsing the data with the pattern given. It returns the
matched string acording the pattern and doesn't go back to find the
other combinations.
I've recently
Licheng Fang [EMAIL PROTECTED] writes:
I think if the backtrack is carried out in an exaustive way, we may say
the engine trys every possibility on the NFA, though it's not an NFA
itself.
The backtracking engine really can recognize languages that are not
describable by classical regexps, by
Tim Golden wrote:
...snip...
This should be possible as Taskmanager tracks CPU usage for every
process... Anyone know how this can be done?
WMI can probably do the trick. If you can find something on Google
for wmi cpu usage (or something similar) then translation to Python's
usually quite
Licheng Fang wrote:
Another question: my task is to find in a given string the substrings
that satisfies a particular pattern. That's why the first tool that
came to my mind is regular expression. Parsers, however, only give a
yes/no answer to a given string. To find all substrings with a
Mike Owens [EMAIL PROTECTED] writes:
No it doesn't. If you don't like SQLite's design decisions, write your
own embedded relational database, and stop yapping about something you
didn't lift a finger to create, but are clearly trying to benefit
from.
That's silly. The sqlite developers are
Licheng Fang wrote:
The idea is like this:
(*INT) = \d+
(*DECIMAL) = (*INT)\.(*INT)
(*FACTION) = (*DECIMAL)/(*DECIMAL)
(*NUMERALS) = (*FACTION)|(*DECIMAL)|(*INT)
... ...
What's inside the sytactically wrong (* and ) is something to be
replaced, and then I wrote a little script to do
DeprecationWarning: struct integer overflow masking is deprecated
return struct.pack('H', ~value)
i didn't understand if someone have some explanation
and what uses instead.
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Nogradi wrote:
A new release of markup.py is available at
http://markup.sourceforge.net/
The markup module is an intuitive, lightweight, easy-to-use,
customizable and pythonic HTML/XML generator. [...]
It's more than only a bit confusing that there's also
Markup: A toolkit for
bussiere maillist wrote:
DeprecationWarning: struct integer overflow masking is deprecated
return struct.pack('H', ~value)
i didn't understand if someone have some explanation
and what uses instead.
Which 2.5 are you using? Mine (2.5c1, win32) gives me *TWO* messages,
the second of which
bussiere maillist wrote:
DeprecationWarning: struct integer overflow masking is deprecated
return struct.pack('H', ~value)
i didn't understand if someone have some explanation
and what uses instead.
the value doesn't fit in 16 bits. try masking off the extra bits on the
way in:
[Gerrit Muller]
|
| Tim Golden wrote:
| WMI can probably do the trick. I'm fairly sure I've got an example
| somewhere, but I can't lay my hands on it at the mo.
| If you have a working example of CPU usage could you post the
| result? I
| would be interested.
I haven't time to revisit it
Bruno Desthuilliers wrote:
eggs are the Python's equivalent to Java's JAR, not a RPM-like. I said
it was not an egg-specific issue (which is not totally accurate) because
it mostly have to do with loading dynamic libs (.so, .dll etc) from
zipped files.
True. It is notable that various Java
Mike Owens wrote:
Crackpot? And now we get to why I took the flamebait -- wonderfully
constructive comments such as this.
I know SQLite's author. Besides being a nice and clearly very
intelligent person, he also holds a master's degree in electrical
engineering from Georgia Tech and a PhD
Steve Holden wrote:
Sure. But if you go back to the start of the thread you'll remember the
OP was originally complaining that SQLite was being promoted in the
Python docs as SQL compliant. It clearly isn't if its response to the
insertion of a data value that conflicts with the declared
Paul Rubin wrote:
Mike Owens [EMAIL PROTECTED] writes:
No it doesn't. If you don't like SQLite's design decisions, write your
own embedded relational database, and stop yapping about something you
didn't lift a finger to create, but are clearly trying to benefit
from.
That's silly. The
Chris Withers wrote:
Max M wrote:
From the docs:
The payload is either a string in the case of simple message objects
or a list of Message objects for MIME container documents (e.g.
multipart/* and message/rfc822)
Where'd you find that? I must have missed it in my digging :-S
End
thks
Regards
Bussiere
On 9/12/06, Fredrik Lundh [EMAIL PROTECTED] wrote:
bussiere maillist wrote:
DeprecationWarning: struct integer overflow masking is deprecated
return struct.pack('H', ~value)
i didn't understand if someone have some explanation
and what uses instead.
the value
Hi there :)
I don't know how else to call what I'm currently implementing: An object
that behaves like a list but doesn't store it's own items but rather
pulls them from a larger list (if they match a certain criterion).
Changes to the filter are instantly reflected in the underlying list.
ls,
On 09/12/2006 11:48:10 AM, [EMAIL PROTECTED] wrote:
when I download python-spambayes-1.0rc2-2.src.rpm, install it and
run rpmbuild -ba ../SPECS/python-spambayes.spec, I get a lot of
error messages. It complains about a lot of installed but
unpackaged files. How can I create a valid
After may frustrated attempts I came to know that match function in
python re package actually start the matchs at the begining of the
subject, where search will find the given pattern any where in the
subject.
My Problem is, I want to know how can I force match functions to match
the pattern
Jason:
Thanks! That worked...in fact, almost everything is now working as
expected (so far).
Here is my batch file:
echo Making changes to path and file associations...
path =
%PATH%;%CD%Python24;%CD%Python24\libs;%CD%Python24\Scripts;%CD%Python24\Lib\site-packages;%CD%Python24\DLLs
set
[Gerrit Muller]
| If you have a working example of CPU usage could you post the
| result? I would be interested.
OK. Here's a workingish example, cut down from the link
I posted earlier. This one was designed to work with Win2K
which I was using at the time. For WinXP and later, there's
a new
[cjl]
[... snip ...]
| set PATHTEXT=.py;%PATHTEXT%
| I'm still having a problem with setting PATHTEXT...
That would be because it's PATHEXT not PATHTEXT (it's sort
of like a PATH but for EXTensions).
TJG
This e-mail has
On 12 Sep 2006 05:07:03 -0700,
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
My Problem is, I want to know how can I force match functions to match
the pattern any location in the subject. i.e I want to turn off before
said behaviour.
Use search() instead; that's why the method is there.
[EMAIL PROTECTED] wrote:
After may frustrated attempts I came to know that match function in
python re package actually start the matchs at the begining of the
subject, where search will find the given pattern any where in the
subject.
My Problem is, I want to know how can I force match
Hi all
Is there any handy untility for checking if a variable is populated at runtime ?
regards,
KM
--
http://mail.python.org/mailman/listinfo/python-list
I've just bought a new notebook, which has a dual core CPU.
I write cross platform games in Python, and I'd really like to be able
to use this second core (on my machine, and on user's machines) for any
new games I might write.
I know threads won't help (in CPython at least) so I'm investigating
Tim Williams wrote:
Alternatively there is os.path.exists which works for files or
directories, but calling it every time you use the wrapper is probably
more expensive than using the try statement when the program *does*
exist.
import os.path
if not os.path.exists('/dir1/dir2/filename'):
Tim:
That would be because it's PATHEXT not PATHTEXT (it's sort
of like a PATH but for EXTensions).
Doh.
Me fail English? That's unpossible.
Thanks, I think everything is working with my poor man's movable
python.
Last on my todo list is to restore the assoc and ftype settings when
I'm done,
A new release of markup.py is available at
http://markup.sourceforge.net/
The markup module is an intuitive, lightweight, easy-to-use,
customizable and pythonic HTML/XML generator. [...]
It's more than only a bit confusing that there's also
Markup: A toolkit for stream-based
Erm, is there some specific reason why you can't just use the search
method? Why does it *have* to be match()?
regards
Steve
I know there r many more methods to do the job, I just wonder can we
turnoff the default behaviour of match method.
Thanks.
--
Hi,
Today is my first day of working on python. I want to execute python
script through C++ program. I found one very good article with example
at http://docs.python.org/ext/pure-embedding.html.
I followed the procedure as given, the code is compiled but while
running it is giving error like:
[Tim Golden]
nice answer snipped
now I only have to find some time to play around...
thanks, Gerrit
--
Gaudi systems architecting:
http://www.gaudisite.nl/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Erm, is there some specific reason why you can't just use the search
method? Why does it *have* to be match()?
regards
Steve
I know there r many more methods to do the job, I just wonder can we
turnoff the default behaviour of match method.
Don't wonder.
cjl wrote:
Tim:
That would be because it's PATHEXT not PATHTEXT (it's sort
of like a PATH but for EXTensions).
Doh.
Me fail English? That's unpossible.
Thanks, I think everything is working with my poor man's movable
python.
Last on my todo list is to restore the assoc and ftype
Wildemar Wildenburger [EMAIL PROTECTED] writes:
I don't know how else to call what I'm currently implementing: An object that
behaves like a list but doesn't store it's own items but rather pulls them
from a larger list (if they match a certain criterion).
Changes to the filter are instantly
[EMAIL PROTECTED] wrote:
I know there r many more methods to do the job, I just wonder can we
turnoff the default behaviour of match method.
that's not the default behaviour, that's how match works. if you want
search, use search instead.
/F
--
km wrote:
Is there any handy untility for checking if a variable is populated at
runtime ?
access it, and catch the NameError:
try:
variable
except NameError:
print not defined
else:
print defined
leaving variables undefined is usually bad style, though;
[Simon Wittber]
| I write cross platform games in Python, and I'd really like to be able
| to use this second core (on my machine, and on user's
| machines) for any new games I might write.
| I know threads won't help (in CPython at least) so I'm investigating
| other types of concurrency which
Marc 'BlackJack' Rintsch wrote:
In [EMAIL PROTECTED], metaperl wrote:
# Of course I could cheat and pass it, but I don't want to:
directories = data.storage.logic(__file__)
Why do you consider a plain and simple solution cheating?
Hmm, I dont know the proper software engineering term,
Miki wrote:
I am looking for something like the caller() routine in Perl:
http://perldoc.perl.org/functions/caller.html
Look at the inspect module in Python's standard library.
Or is you're feeling lazy, have a look at the here function found in
[EMAIL PROTECTED] wrote:
Hi,
[...]
Step 3: Wrote the given script of multipication in a file named as
multiply (using vi editor)
The name of module should be multiply.py
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
I build a lot of elaborate dictionaries in my interpreter, and then I
forget exactly how they work. It would be really nice to be able to add
notes to the dictionary.
Is there some way to do this now?
Matt
--
A better way of running series of SAS programs:
Simon Wittber [EMAIL PROTECTED] writes:
Are there any other concurrency options I've not discovered yet?
I've been wondering about the different Python MPI bindings that are
out there, and whether they might make sense for general purpose
concurrency when they were designed mostly for parallel
On Mon, 11 Sep 2006, [EMAIL PROTECTED] wrote:
No, if you're going to insert into sqlite3, you don't want a csv string,
you want a list of values (see example code below).
Thank you very much. It makes solid sense and I can see the differences
and where I was not on track. I greatly
[EMAIL PROTECTED] wrote:
Hi,
Today is my first day of working on python. I want to execute python
script through C++ program. I found one very good article with example
at http://docs.python.org/ext/pure-embedding.html.
I followed the procedure as given, the code is compiled but while
Rob Wolfe wrote:
[EMAIL PROTECTED] wrote:
Hi,
[...]
Step 3: Wrote the given script of multipication in a file named as
multiply (using vi editor)
The name of module should be multiply.py
module != source_file
module don't have no ferschlugginer dots in its name
--
Tim Golden wrote:
+ Pyro - http://pyro.sf.net
+ Corba - eg omniorb http://omniorb.sourceforge.net/
+ SPyRO - http://lsc.fie.umich.mx/~sadit/spyro/spyro.html
+ mmap - (built-in module) http://docs.python.org/lib/module-mmap.html
+ twisted - (because it can do everything), esp.
| But I have the feeling I'm teaching my grandmother... Is that
| the kind of thing you were after? Or not?
|
| I'm not familiar with the expression 'teaching my grandmother'. What
| exactly does it mean?
Teaching my grandmother to suck eggs (and probably several variants
with other
John Machin wrote:
Rob Wolfe wrote:
[EMAIL PROTECTED] wrote:
Hi,
[...]
Step 3: Wrote the given script of multipication in a file named as
multiply (using vi editor)
The name of module should be multiply.py
module != source_file
module don't have no ferschlugginer dots in
Hello,
What is the best way to generate a long authentication string and email
this so that the user can reply and verify that the email address they
have provided is authentic, similar I guess to the way Bugzilla works?
Should this be server side or client?
How would one tackle an expiry limit
Marc 'BlackJack' Rintsch wrote:
In [EMAIL PROTECTED], metaperl wrote:
# Of course I could cheat and pass it, but I don't want to:
directories = data.storage.logic(__file__)
Why do you consider a plain and simple solution cheating?
Ok now I figured it out. The reason is that this
On 12 Sep 2006 00:15:41 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Just to be fair...
You do hear many people claiming exactly that, and the primary
complaint is often exactly the same one that's being levelled against
sqlite here (it's incredibly lax with types and does sometimes
Dan Sommers wrote:
It's difficult to imagine
any one developer (or development shop) using the entire library, so at
least one module must be extraneous.
That's a good point. I guess I am just trying to figure out why I'm a
little surprised sqlite was included, but at the same time I'm
John:
Congratulations. Now: how much time have you spent, and how much per
hour are you worth? hours * dollars_per_hour GBP_to_USD(4.99) ???
Since you mention it, I am currently earning about $200 an hour (when
I'm working), and I spent about 3 hours on this, so this cost me about
$600. I
[cjl]
| Any ideas about how to set file type associations without writing to
| the registry?
Well, yes. Just the same as was in the article you pointed
to... or have I missed something?
assoc .py=python.file
ftype python.file=c:\python24\python.exe %1 %*
(or whatever version of Python).
Daniel Crespo írta:
Hi Laszlo,
I have read that. It's the wrapper for the usage of OpenSSL, so I have
to install it. I have downloaded the Borland C++ compiler, and I'm
doing so right now, but I'm not getting good results yet.
You do not need any compiler. You just need to install the
On 2006-09-12, Matthew Wilson [EMAIL PROTECTED] wrote:
I build a lot of elaborate dictionaries in my interpreter, and
then I forget exactly how they work. It would be really nice
to be able to add notes to the dictionary.
Is there some way to do this now?
Writing a thin wrapper around the
Jorge Godoy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Wildemar Wildenburger [EMAIL PROTECTED] writes:
I don't know how else to call what I'm currently implementing: An object
that
behaves like a list but doesn't store it's own items but rather pulls
them
from a larger
Mike Owens wrote:
The bottom line: to use *any* database effectively, big or small, one
has to read its documentation, not the SQL standard.
note that the SQL standard tells you to read the documentation for the
database you're using, in at least 149 places (*).
/F
*) See Annex B. I only
| [cjl]
|
| | Any ideas about how to set file type associations without writing to
| | the registry?
|
[Tim Golden]
| Well, yes. Just the same as was in the article you pointed
| to... or have I missed something?
Ah, I see. Presumably the FTYPE / ASSOC commands write things
to the registry
Simon Wittber [EMAIL PROTECTED] writes:
For game programming purposes, I was hoping someone could point me to a
technique for sharing objects across Python processes, preferably
without any kind of marshal/unmarshal steps. It's a long shot, I know.
To be viable, I'll need to be able to pass
On 11 Sep 2006 21:35:28 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Mike Owens wrote:
On 11 Sep 2006 18:23:50 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Can you run your car on diesel fuel?
Why not?
Because your car's specification says to use gasoline?
If
Fredrik Lundh wrote:
km wrote:
Is there any handy untility for checking if a variable is populated at
runtime ?
access it, and catch the NameError:
try:
variable
except NameError:
In a function when accessing a not-yet-bound local variable you may also
(as
Tim Golden [EMAIL PROTECTED] wrote:
[Nick Craig-Wood]
| Tim Golden [EMAIL PROTECTED] wrote:
| if os.path.isfile (filepath):
| print filepath
|
| You might get a more accurate result using
|
| os.access(filepath, os.X_OK)
|
| instead of
|
|
Hello all,
I was curious if anyone has transitioned some code from using Raymond
Hettinger's bag class:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/259174
to using 2.5's collections.defaultdict. Any pitfalls to watch out for? It
seems we should be able to do slightly better than
-- python -i
class = algebra
File stdin, line 1
class = algebra
^
SyntaxError: invalid syntax
Why isn' t the parser smart enough to see that class followed by an
identifier is used for class definition but class followed by equals is
a simple assignment?
Also, I had a bug
| Tim Golden [EMAIL PROTECTED] wrote:
| [Nick Craig-Wood]
|
| | Tim Golden [EMAIL PROTECTED] wrote:
| | if os.path.isfile (filepath):
| | print filepath
| |
| | You might get a more accurate result using
| |
| | os.access(filepath, os.X_OK)
| |
| | instead
metaperl schrieb:
-- python -i
class = algebra
File stdin, line 1
class = algebra
^
SyntaxError: invalid syntax
Why isn' t the parser smart enough to see that class followed by an
identifier is used for class definition but class followed by equals is
a simple
metaperl [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Why isn' t the parser smart enough to see that class followed by an
identifier is used for class definition but class followed by equals is
a simple assignment?
Because it's simpler to reserve words than worry about possible
1 - 100 of 250 matches
Mail list logo