A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/074311.html below:

converting string to dict ?

converting string to dict ? converting string to dict ?Fredrik Lundh fredrik at pythonware.com
Thu Apr 12 04:08:57 EDT 2001
Richard Scott Glazerman wrote:
> what about exec?? (somebody please let me know if there is something wrong
> with using exec this way, I've used it many times for just that purpose.)
>
> >>> a = "{'Name':'Cleopatra'}"
> >>> exec 'a = %s' % a
> >>> a
> {'Name': 'Cleopatra'}

a = "__import__('os').system('rm -rf ~')"

see my earlier reply to this thread, and the followups to
that post.

Cheers /F



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4