codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
u_config = u"""[DEFAULT] tmp: /tmp [file] file: %(tmp)s/myfile """ import ConfigParser import StringIO config = ConfigParser.SafeConfigParser() config.readfp(StringIO.StringIO(u_config)) print config.get('file', 'file')
Private
[
?
]
Run code
Submit