__init__ is not a valid variable name because it starts with a "_"
Thats what zope said when I made a new python script and entered something like: class AdsSecondClass: def __init__() blah blah as inspired by some example code. Why? All I really want is to store four integers on the server and have them updated by surfer actions. Thanks in advance, Ad.
You can't really define classes in Python Scripts. It's easiest to think of Python scripts like methods of the Folder in which they live. If you need to define a class, you'll likely need to write a Python Product. ----- Original Message ----- From: "Adrian May" <stoneage@stone-age-software.com> To: <zope@zope.org> Sent: Friday, June 28, 2002 4:31 PM Subject: [Zope] __init__ is not a valid variable name because it starts with a "_"
Thats what zope said when I made a new python script and entered
something
like:
class AdsSecondClass: def __init__() blah blah
as inspired by some example code.
Why?
All I really want is to store four integers on the server and have them updated by surfer actions.
Thanks in advance,
Ad.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Thanks, but how do I make a Python Product using my new freezope account??? Ad. On Fri, 28 Jun 2002, Chris McDonough wrote:
You can't really define classes in Python Scripts. It's easiest to think of Python scripts like methods of the Folder in which they live. If you need to define a class, you'll likely need to write a Python Product.
----- Original Message ----- From: "Adrian May" <stoneage@stone-age-software.com> To: <zope@zope.org> Sent: Friday, June 28, 2002 4:31 PM Subject: [Zope] __init__ is not a valid variable name because it starts with a "_"
Thats what zope said when I made a new python script and entered
something
like:
class AdsSecondClass: def __init__() blah blah
as inspired by some example code.
Why?
All I really want is to store four integers on the server and have them updated by surfer actions.
Thanks in advance,
Ad.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
You don't... ;-) You'll need to download and install Zope to make a Zope Python product. IMeme (http://www.imeme.net) provides a hosting environment which allows you to install your own custom Zope products. Adrian May wrote:
Thanks, but how do I make a Python Product using my new freezope account???
Ad.
On Fri, 28 Jun 2002, Chris McDonough wrote:
You can't really define classes in Python Scripts. It's easiest to think of Python scripts like methods of the Folder in which they live. If you need to define a class, you'll likely need to write a Python Product.
----- Original Message ----- From: "Adrian May" <stoneage@stone-age-software.com> To: <zope@zope.org> Sent: Friday, June 28, 2002 4:31 PM Subject: [Zope] __init__ is not a valid variable name because it starts with a "_"
Thats what zope said when I made a new python script and entered
something
like:
class AdsSecondClass: def __init__() blah blah
as inspired by some example code.
Why?
All I really want is to store four integers on the server and have
them
updated by surfer actions.
Thanks in advance,
Ad.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
All I'm trying to do is store a few click stats on the server. That cant be so tough can it? Why cant I just put some properties in the directory and edit them so they persist. I also read about ZClasses in the help but couldnt find them on my freezope interface. Same reason I guess. The worst case would be to abuse the demo Elvis DB which seems to work. At some point Im going to want to crunch a lot more numbers too, but then I also won't want the overhead of a relational DB. Is there really no easier and leaner way? Ad. On Fri, 28 Jun 2002, Chris McDonough wrote:
You don't... ;-) You'll need to download and install Zope to make a Zope Python product. IMeme (http://www.imeme.net) provides a hosting environment which allows you to install your own custom Zope products.
Adrian May wrote:
Thanks, but how do I make a Python Product using my new freezope account???
Ad.
On Fri, 28 Jun 2002, Chris McDonough wrote:
You can't really define classes in Python Scripts. It's easiest to think of Python scripts like methods of the Folder in which they live. If you need to define a class, you'll likely need to write a Python Product.
----- Original Message ----- From: "Adrian May" <stoneage@stone-age-software.com> To: <zope@zope.org> Sent: Friday, June 28, 2002 4:31 PM Subject: [Zope] __init__ is not a valid variable name because it starts with a "_"
Thats what zope said when I made a new python script and entered
something
like:
class AdsSecondClass: def __init__() blah blah
as inspired by some example code.
Why?
All I really want is to store four integers on the server and have
them
updated by surfer actions.
Thanks in advance,
Ad.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Adrian May writes:
Thats what zope said when I made a new python script and entered something like:
class AdsSecondClass: def __init__() blah blah
as inspired by some example code.
Why?
Because attributes starting with "_" are not accessible by Python scripts.
All I really want is to store four integers on the server and have them updated by surfer actions. You may consider using a dictionary.
Dieter
participants (3)
-
Adrian May -
Chris McDonough -
Dieter Maurer