Re: SQLite3 and web server

2015-08-20 Thread Steven D'Aprano
On Fri, 21 Aug 2015 04:11 pm, Cecil Westerhof wrote:

> At the moment I serve a AngularJS web application with:
> python3 -m http-server
> 
> This only servers static html pages with the data contained in js
> files, 


Ah, so you're one of *them*. People who serve static content out of
Javascript, instead of HTML, so that the website is broken and unusable in
browsers without JS, and those with JS turned off.


> I would like to retrieve the information out a SQLite3 database. I did
> some Googling, but until now I did not find something useful. How
> would I implement this?

I feel that by answering this question, I'm in the same position as someone
telling terrorists how best to build a dirty bomb. Oh well.

https://docs.python.org/3/library/sqlite3.html

But surely you need to find out how to access Sqlite from Javascript, not
Python? This doesn't seem to be related to Python in any way. Just because
the web server is written in Python doesn't mean that it's a Python
problem. Your web page is generated from Javascript, not Python.




Making-the-Internet-a-worse-place-one-piece-of-Javascript-at-a-time-ly y'rs,

-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pysqlite 2.8.0 released

2015-08-20 Thread zzzeek
Hi Gerhard -

is the download missing?  On Pypi I see 2.8.0 is registered but no download 
file:

https://pypi.python.org/pypi/pysqlite/2.8.0

pip fails:

$ ./bin/pip install pysqlite==2.8.0 --upgrade --force
Collecting pysqlite==2.8.0
  Could not find a version that satisfies the requirement pysqlite==2.8.0 
(from versions: 2.5.6, 2.6.0, 2.6.3, 2.7.0)
  Some externally hosted files were ignored as access to them may be 
unreliable (use --allow-external to allow).
  No distributions matching the version for pysqlite==2.8.0


On Tuesday, August 18, 2015 at 8:17:46 PM UTC-4, Gerhard Häring wrote:
>
> NEW FEATURES
>
> - No new features, but tons of bugfixes. These mean that things now work 
> that
>   didn't before:
> - Transactional DDL now works
> - You can use SAVEPOINTs now
>
>
> BUILD PROCESS
>
> - Python 2.7.x is now required. If trying to use it with Python 3, print a
>   useful error message.  Integrated all fixes from the sqlite3 module in 
> Python
>   2.7.10.
>
>
> MAJOR IMPROVEMENTS
>
> - Completety got rid of statement parsing. We now use SQLite functions to
>   determine if a statement modifies the database or not. If a statement
>   modifies the database, then we implicitly start a transaction. For 
> backwards
>   compatibility reasons, we do NOT implicitly start a transaction if we
>   encounter a DDL statement.
>
>   You can, however, now have transactional DDL if you want to:
>
> cur = con.cursor()
> cur.execute("begin")
> cur.execute("create table foo(bar)")
> con.rollback()
>
>   This also means that people can now finally use SAVEPOINTS.
>
> - Use sqlite3_get_autocommit() to determine if we are within a transaction
>   instead of trying to be smart.
>
> - Switch to v2 statement API. This simplified the code and will increase
>   stability.
>
> MINOR IMPROVEMENTS
>
> - You can use unicode strings as index for Row objects.
>
>
> BUGFIXES
>
> - Fixed a regression: statements should not be reset after a commit.
>
>
> GENERAL CLEANUP AND DEPRECATIONS
>
> - Since december 2005, row_factory is a feature of the Connection class 
> instead
>   of the Cursor class. It was kept in the Cursor class for backwards
>   compatibility. Now it was time to finally remove it from the Cursor 
> class.
> - DEPRECATE converters and adapters.
> - DEPRECATE text_factory.
> - Remove compatibility workarounds for old Python versions.
> - Remove workarounds for old SQLite versions.
> - Remove apsw related code.
>
>-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [python-sqlite] Re: pysqlite 2.8.0 released

2015-08-20 Thread Gerhard Häring
Yes, I forgot to "setup.py sdist upload". It's fixed now. Sorry for the
trouble.

I'm of course looking forward to hear if SQLAlchemy still works ok with
this release.

On Wed, Aug 19, 2015 at 10:10 PM,  wrote:

> Hi Gerhard -
>
> is the download missing?  On Pypi I see 2.8.0 is registered but no
> download file:
>
> https://pypi.python.org/pypi/pysqlite/2.8.0
>
> pip fails:
>
> $ ./bin/pip install pysqlite==2.8.0 --upgrade --force
> Collecting pysqlite==2.8.0
>   Could not find a version that satisfies the requirement pysqlite==2.8.0
> (from versions: 2.5.6, 2.6.0, 2.6.3, 2.7.0)
>   Some externally hosted files were ignored as access to them may be
> unreliable (use --allow-external to allow).
>   No distributions matching the version for pysqlite==2.8.0
>
>
>
> On Tuesday, August 18, 2015 at 8:17:46 PM UTC-4, Gerhard Häring wrote:
>>
>> NEW FEATURES
>>
>> - No new features, but tons of bugfixes. These mean that things now work
>> that
>>   didn't before:
>> - Transactional DDL now works
>> - You can use SAVEPOINTs now
>>
>>
>> BUILD PROCESS
>>
>> - Python 2.7.x is now required. If trying to use it with Python 3, print a
>>   useful error message.  Integrated all fixes from the sqlite3 module in
>> Python
>>   2.7.10.
>>
>>
>> MAJOR IMPROVEMENTS
>>
>> - Completety got rid of statement parsing. We now use SQLite functions to
>>   determine if a statement modifies the database or not. If a statement
>>   modifies the database, then we implicitly start a transaction. For
>> backwards
>>   compatibility reasons, we do NOT implicitly start a transaction if we
>>   encounter a DDL statement.
>>
>>   You can, however, now have transactional DDL if you want to:
>>
>> cur = con.cursor()
>> cur.execute("begin")
>> cur.execute("create table foo(bar)")
>> con.rollback()
>>
>>   This also means that people can now finally use SAVEPOINTS.
>>
>> - Use sqlite3_get_autocommit() to determine if we are within a transaction
>>   instead of trying to be smart.
>>
>> - Switch to v2 statement API. This simplified the code and will increase
>>   stability.
>>
>> MINOR IMPROVEMENTS
>>
>> - You can use unicode strings as index for Row objects.
>>
>>
>> BUGFIXES
>>
>> - Fixed a regression: statements should not be reset after a commit.
>>
>>
>> GENERAL CLEANUP AND DEPRECATIONS
>>
>> - Since december 2005, row_factory is a feature of the Connection class
>> instead
>>   of the Cursor class. It was kept in the Cursor class for backwards
>>   compatibility. Now it was time to finally remove it from the Cursor
>> class.
>> - DEPRECATE converters and adapters.
>> - DEPRECATE text_factory.
>> - Remove compatibility workarounds for old Python versions.
>> - Remove workarounds for old SQLite versions.
>> - Remove apsw related code.
>>
>> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "python-sqlite" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python-sqlite+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
https://mail.python.org/mailman/listinfo/python-list


SQLite3 and web server

2015-08-20 Thread Cecil Westerhof
At the moment I serve a AngularJS web application with:
python3 -m http-server

This only servers static html pages with the data contained in js
files, like:
$scope.links = [
{ desc: 'Album',url: 
'https://plus.google.com/collection/MuwPX'  },
{ desc: 'Heron Sunbathing', url: 
'https://plus.google.com/+CecilWesterhof/posts/bHvSzBGobEj' },
{ desc: 'Heron Fishing',url: 
'https://plus.google.com/+CecilWesterhof/posts/TY3asc5oCnB' },
{ desc: 'Water Lily',   url: 
'https://plus.google.com/+CecilWesterhof/posts/AtTwhL8SdnH' },
{ desc: 'Tree at Pond', url: 
'https://plus.google.com/+CecilWesterhof/posts/TyiZbUWdnrm' },
{ desc: 'Fish', url: 
'https://plus.google.com/+CecilWesterhof/posts/MoQ7vXs8HqP' },
{ desc: 'Fountain', url: 
'https://plus.google.com/+CecilWesterhof/posts/BDYkPKSMUwZ' },
{ desc: 'Digitalis',url: 
'https://plus.google.com/+CecilWesterhof/posts/ed3ZGNzb8kM' },
{ desc: 'Sunset',   url: 
'https://plus.google.com/+CecilWesterhof/posts/DPbHHSFXBY4' },
{ desc: 'Digitalis 2',  url: 
'https://plus.google.com/+CecilWesterhof/posts/ZZtSUwNb6RC' },
{ desc: 'Water Lilies', url: 
'https://plus.google.com/+CecilWesterhof/posts/LY62DqLEJhG' },
{ desc: 'Flower',   url: 
'https://plus.google.com/+CecilWesterhof/posts/XFKyTcoakcy' },
{ desc: 'Waterfalls',   url: 
'https://plus.google.com/+CecilWesterhof/posts/bfg5irDAn2T' },
{ desc: 'Frogs',url: 
'https://plus.google.com/+CecilWesterhof/posts/jKr5B6EQyo1' },
{ desc: 'Flowers',  url: 
'https://plus.google.com/+CecilWesterhof/posts/iPQbBrTbcnm' },
{ desc: 'Sheep',url: 
'https://plus.google.com/+CecilWesterhof/posts/3a2mBo7om4H' },
{ desc: 'Beetle',   url: 
'https://plus.google.com/+CecilWesterhof/posts/KnNtis2Gqxf' },
{ desc: 'Dove', url: 
'https://plus.google.com/+CecilWesterhof/posts/XA5RcC2Cxbv' },
{ desc: 'City Walk',url: 
'https://plus.google.com/+CecilWesterhof/posts/R9me9AKQC6n' },
{ desc: 'Boar', url: 
'https://plus.google.com/+CecilWesterhof/posts/9bfpBiQPYen' },
{ desc: 'Bird', url: 
'https://plus.google.com/+CecilWesterhof/posts/X6gFE3oxXLY' },
{ desc: 'Goose',url: 
'https://plus.google.com/+CecilWesterhof/posts/H4w6JvnQkcU' },
{ desc: 'On mothers wings', url: 
'https://plus.google.com/+CecilWesterhof/posts/PY4Nm1TASvx' },
{ desc: 'Flowers',  url: 
'https://plus.google.com/+CecilWesterhof/posts/9o1i2NgoSfV' },
]

I would like to retrieve the information out a SQLite3 database. I did
some Googling, but until now I did not find something useful. How
would I implement this?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Check if dictionary empty with == {}

2015-08-20 Thread Skip Montanaro
On Thu, Aug 20, 2015 at 12:44 PM, Steven D'Aprano
 wrote:
> Testing for "any Falsey value" and "an empty dict" are not the same,
> naturally they will perform differently.

Sure, but the OP's original note explicitly said he had a dict and
asked how to test if it was empty. He was used to seeing/using "not
mydict", but had recently encountered "mydict == {}".  Given those
preconditions, the correct answer is that "not mydict" is the way to
go (idiomatic Python). Using "mydict == {}" is clearly suboptimal.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


PyDev 4.3.0 released

2015-08-20 Thread Fabio Zadrozny
Release Highlights:
---

* Fixed parser for Python 3.x to support async and await as regular names
too (PyDev-593).

* The new search dialog now has a 'whole word' option which automatically
adds `*` to the search

* Search backend updated to Lucene 5.2.1 (instant searches on huge
codebases)

* When bringing up the search dialog the search text is initially selected.


What is PyDev?
---

PyDev is an open-source Python IDE on top of Eclipse for Python, Jython and
IronPython development.

It comes with goodies such as code completion, syntax highlighting, syntax
analysis, code analysis, refactor, debug, interactive console, etc.

Details on PyDev: http://pydev.org
Details on its development: http://pydev.blogspot.com


What is LiClipse?
---

LiClipse is a PyDev standalone with goodies such as support for Multiple
cursors, theming, TextMate bundles and a number of other languages such as
Django Templates, Jinja2, Kivy Language, Mako Templates, Html, Javascript,
etc.

It's also a commercial counterpart which helps supporting the development
of PyDev.

Details on LiClipse: http://www.liclipse.com/



Cheers,

--
Fabio Zadrozny
--
Software Developer

LiClipse
http://www.liclipse.com

PyDev - Python Development Environment for Eclipse
http://pydev.org
http://pydev.blogspot.com

PyVmMonitor - Python Profiler
http://www.pyvmmonitor.com/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Check if dictionary empty with == {}

2015-08-20 Thread Steven D'Aprano
On Thu, 20 Aug 2015 11:54 pm, Skip Montanaro wrote:

> On Wed, Aug 19, 2015 at 10:16 PM, Steven D'Aprano <
> steve+comp.lang.pyt...@pearwood.info> wrote:
> 
>> So maybe it's a micro-optimization?
> 
> 
> Note, however, that the original post compared "mydict == {}" with "not
> mydict". In that case, it's decidedly not an optimization:
> 
> firefly% python2.7 -m timeit -s "mydict = {1:2}" "if mydict == {}: pass"
> 1000 loops, best of 3: 0.0508 usec per loop
> firefly% python2.7 -m timeit -s "mydict = {1:2}" "if not mydict: pass"
> 1000 loops, best of 3: 0.0246 usec per loop

I suppose it depends on whether you want to run the "if" block when mydict
is None, 0, [], "", etc.

Testing for "any Falsey value" and "an empty dict" are not the same,
naturally they will perform differently.




-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: RPI.GPIO Help

2015-08-20 Thread alister
On Thu, 20 Aug 2015 16:45:53 +0100, MRAB wrote:

> On 2015-08-20 16:12, John McKenzie wrote:
>>
>>   Thanks for the reply. Also, thanks to Laura who replied via email.
>>
>>   Tried a bunch of things based off these comments and I always ended
>>   up
>> with one of two situations, the channel conflict error, or an instant
>> run and quit issue. This new version of the code runs but is
>> unresponsive. I removed loops then put in a short sleep loop. while
>> True:
>>  time.sleep(0.1) It could be my hardware is done up wrong, but it
>> looks OK. Perhaps it is always sleeping.
>>
>>   Anyone at all know about GPIO and the Pi under the Python library
>> RPi.GPIO please feel free to advise as to what the problem is most
>> likely to be.
>>
>>
>> import atexit import time from blinkstick import blinkstick import
>> RPi.GPIO as GPIO
>>
>> led = blinkstick.find_first()
>> colour = 0 timered = 0 timeyellow = 0 timeblue = 0 timestamp =
>> time.strftime("%H:%M:%S")
>>
>>
>>
>> GPIO.setmode(GPIO.BCM)
>> GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
>> GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
>> GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
>>
>>
>>
>> def red_button(channel):
>>  colour = 1 while colour == 1:
>>  print "Red Button pressed" timered += 1
>>
>>
>> def yellow_button(channel):
>>  colour = 2 while colour == 2:
>>  print "Yellow Button pressed"
>>  timeyellow += 1
>>
>>
>> def blue_button(channel):
>>  colour = 3 while colour == 3:
>>  print "Blue Button pressed" timeblue += 1
>>
>> GPIO.add_event_detect(23, GPIO.RISING, callback=yellow_button,
>> bouncetime=200)
>> GPIO.add_event_detect(22, GPIO.RISING, callback=red_button,
>> bouncetime=200)
>> GPIO.add_event_detect(24, GPIO.RISING, callback=blue_button,
>> bouncetime=200)
>>
>> while True:
>>  time.sleep(0.1)
>>
>> def exit_handler():
>>  print '\033[0;41;37mRed Team:\033[0m ', timered print
>>  '\033[0;103;30mYellow Team:\033[0m ', timeyellow print
>>  '\033[0;44;37mBlue Team:\033[0m ', timeblue flog =
>>  open('flag1log.text', 'a')
>>  flog.write(timestamp + '\n' + 'Red Team: ' + str(timered) + '\n' +
>> 'Yellow Team: ' + str(timeyellow) + '\n' + 'Blue Team: ' +
>> str(timeblue) + '\n')
>>  flog.close()
>> atexit.register(exit_handler)
>> GPIO.cleanup()
>>
>>
> The function 'red_button' will be called when a rising edge is detected.
> 
> In that function, you're assigning to 'colour' but not changing it in
> the loop, so it's basically just a busy loop. However, you're trying to
> change 'timered', which is a global variable, but you're not declaring
> it as global, so that will raise UnboundLocalError.
> 
> Similar remarks apply to the other two callbacks.
> 
> I think you'd be better off detecting both the rising and falling edges,
> with a callback for each, recording when each edge occurred (duration of
> press = time of falling edge - time of rising edge).

you may also find it more useful to post this to Comp.sys.raspberry_pi
the python skills may not be quite as in depth as here but they will know 
more about the raspberry hardware



-- 
The easiest way to get the root password is to become system admin.
-- Unknown source
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Check if dictionary empty with == {}

2015-08-20 Thread Laurent Pointal
Anton wrote:

> Probably a silly question.
> Let's say I have a dictionary mydict and I need to test if a dictionary is
> empty.
> 
> I would use
> 
> if not mydict:
> """do something"""
> 
> But I just came across a line of code like:
> 
> if mydict == {}:
> """do something"""
> 
> which seems odd to me, but maybe there is a valid use case, thus I decided
> to ask the community.
> 
> Thanks.

You can also use:

if len(mydict) == 0:
"do something"

The form 'if not mydict:' is AMA the more pythonic, but it may be a source 
of question for beginners (what is the boolean meaning of a dictionnary…).

A+
Laurent.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: RPI.GPIO Help

2015-08-20 Thread MRAB

On 2015-08-20 16:12, John McKenzie wrote:


  Thanks for the reply. Also, thanks to Laura who replied via email.

  Tried a bunch of things based off these comments and I always ended up
with one of two situations, the channel conflict error, or an instant run
and quit issue. This new version of the code runs but is unresponsive. I
removed loops then put in a short sleep loop. while True:
 time.sleep(0.1) It could be my hardware is done up wrong, but it
looks OK. Perhaps it is always sleeping.

  Anyone at all know about GPIO and the Pi under the Python library
RPi.GPIO please feel free to advise as to what the problem is most likely
to be.


import atexit
import time
from blinkstick import blinkstick
import RPi.GPIO as GPIO

led = blinkstick.find_first()
colour = 0
timered = 0
timeyellow = 0
timeblue = 0
timestamp = time.strftime("%H:%M:%S")



GPIO.setmode(GPIO.BCM)
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)



def red_button(channel):
 colour = 1
 while colour == 1:
 print "Red Button pressed"
 timered += 1


def yellow_button(channel):
 colour = 2
 while colour == 2:
 print "Yellow Button pressed"
 timeyellow += 1


def blue_button(channel):
 colour = 3
 while colour == 3:
 print "Blue Button pressed"
 timeblue += 1

GPIO.add_event_detect(23, GPIO.RISING, callback=yellow_button,
bouncetime=200)
GPIO.add_event_detect(22, GPIO.RISING, callback=red_button,
bouncetime=200)
GPIO.add_event_detect(24, GPIO.RISING, callback=blue_button,
bouncetime=200)

while True:
 time.sleep(0.1)

def exit_handler():
 print '\033[0;41;37mRed Team:\033[0m ', timered
 print '\033[0;103;30mYellow Team:\033[0m ', timeyellow
 print '\033[0;44;37mBlue Team:\033[0m ', timeblue
 flog = open('flag1log.text', 'a')
 flog.write(timestamp + '\n' + 'Red Team: ' + str(timered) + '\n' +
'Yellow Team: ' + str(timeyellow) + '\n' + 'Blue Team: ' + str(timeblue)
+ '\n')
 flog.close()
atexit.register(exit_handler)
GPIO.cleanup()



The function 'red_button' will be called when a rising edge is detected.

In that function, you're assigning to 'colour' but not changing it in
the loop, so it's basically just a busy loop. However, you're trying to
change 'timered', which is a global variable, but you're not declaring
it as global, so that will raise UnboundLocalError.

Similar remarks apply to the other two callbacks.

I think you'd be better off detecting both the rising and falling
edges, with a callback for each, recording when each edge occurred
(duration of press = time of falling edge - time of rising edge).

--
https://mail.python.org/mailman/listinfo/python-list


Re: RPI.GPIO Help

2015-08-20 Thread John McKenzie

 Thanks for the reply. Also, thanks to Laura who replied via email.

 Tried a bunch of things based off these comments and I always ended up 
with one of two situations, the channel conflict error, or an instant run 
and quit issue. This new version of the code runs but is unresponsive. I 
removed loops then put in a short sleep loop. while True:
time.sleep(0.1) It could be my hardware is done up wrong, but it 
looks OK. Perhaps it is always sleeping.

 Anyone at all know about GPIO and the Pi under the Python library 
RPi.GPIO please feel free to advise as to what the problem is most likely 
to be.


import atexit
import time
from blinkstick import blinkstick
import RPi.GPIO as GPIO  

led = blinkstick.find_first()
colour = 0
timered = 0
timeyellow = 0
timeblue = 0
timestamp = time.strftime("%H:%M:%S")



GPIO.setmode(GPIO.BCM)
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)  
GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) 



def red_button(channel):
colour = 1
while colour == 1:
print "Red Button pressed"
timered += 1


def yellow_button(channel):
colour = 2
while colour == 2:
print "Yellow Button pressed"
timeyellow += 1


def blue_button(channel):
colour = 3
while colour == 3:
print "Blue Button pressed"
timeblue += 1

GPIO.add_event_detect(23, GPIO.RISING, callback=yellow_button, 
bouncetime=200)
GPIO.add_event_detect(22, GPIO.RISING, callback=red_button, 
bouncetime=200)
GPIO.add_event_detect(24, GPIO.RISING, callback=blue_button, 
bouncetime=200)

while True:
time.sleep(0.1)

def exit_handler():
print '\033[0;41;37mRed Team:\033[0m ', timered
print '\033[0;103;30mYellow Team:\033[0m ', timeyellow
print '\033[0;44;37mBlue Team:\033[0m ', timeblue
flog = open('flag1log.text', 'a')
flog.write(timestamp + '\n' + 'Red Team: ' + str(timered) + '\n' + 
'Yellow Team: ' + str(timeyellow) + '\n' + 'Blue Team: ' + str(timeblue) 
+ '\n')
flog.close()
atexit.register(exit_handler)
GPIO.cleanup()



 Thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Check if dictionary empty with == {}

2015-08-20 Thread Skip Montanaro
On Wed, Aug 19, 2015 at 10:16 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:

> So maybe it's a micro-optimization?


Note, however, that the original post compared "mydict == {}" with "not
mydict". In that case, it's decidedly not an optimization:

firefly% python2.7 -m timeit -s "mydict = {1:2}" "if mydict == {}: pass"
1000 loops, best of 3: 0.0508 usec per loop
firefly% python2.7 -m timeit -s "mydict = {1:2}" "if not mydict: pass"
1000 loops, best of 3: 0.0246 usec per loop

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Storing dictionary locations as a string and using eval - alternatives?

2015-08-20 Thread Peter Otten
dieter wrote:

> Victor Hooi  writes:
>> ...
> I did not read your message body - just your "subject".

That was a mistake ;)

> Instead of (the potentially insecure) "eval", I use "json.loads"
> (combined with a "json.dumps" to get the "json" representation).
> See the "json" module documentation.


-- 
https://mail.python.org/mailman/listinfo/python-list