also, here's a little example of usage of the blueDict class (above in
this thread). I use DAL in script. I have a table called 'data' which
has fields called 'pyModuleName' and 'cmdName'. I can use the dict
object to store the pyModuleName values and the cmdName values in one
of those dict
Cool, thanks. I look forward to taking a look.
I make heavy use of Storage in my apps because dot notation is so much
easier and faster. It is completely backwards compatible with Python's
dictionary. I usually end up putting this at the top of all my controllers
and modules:
from gluon.storage import Storage
Then instead of using a
there are many variations and combined functionality that we can do
with these dicts with attribute like functionality... below is an
example of one that lets you do the dot thing on copies of a dict
(comes in vary handy at times) and uses cPickle (can send usage if
unclear)
something else very
I'd be curious to see your XML processing code. Manipulating XML in Python
is pretty lame form what' I've seen so far.
be glad to... and I will freely admit to being dense :), but... I
don't know how to attach it here ;) Is there a trick? or if you send
me your email, I'll send with a usage sample.
Mart :)
On Jun 13, 9:48 pm, pbreit pbreitenb...@gmail.com wrote:
I'd be curious to see your XML processing code.
On Monday, June 13, 2011 10:16:15 PM UTC-4, mart wrote:
be glad to... and I will freely admit to being dense :), but... I
don't know how to attach it here ;) Is there a trick? or if you send
me your email, I'll send with a usage sample.
If you use the newer forum interface at
well, well,... look at this! this is new to me! :)
so, you can dump the 3 attached files somewhere and run dfoTest.py and check
the output (a few comments in the script and some in the _dfo module). I
through in an xml file just for quick testing.
I have quite a few variations on this (some
I think this might be the best way to do it:
my_dict.get(key, value_if_absent)
It's the gluon.storage.Storage class -- explained here:
http://web2py.com/book/default/chapter/04#request. You can probably use it
in a module by importing it.
On Sunday, June 12, 2011 2:41:44 AM UTC-4, pbreit wrote:
I am newish to Python and I think spoiled by Web2py. Is it correct that
10 matches
Mail list logo