diff options
author | saksham1115 <saksham115@gmail.com> | 2016-06-28 06:58:22 +0000 |
---|---|---|
committer | saksham1115 <saksham115@gmail.com> | 2016-07-19 17:29:09 +0000 |
commit | 2c36555bfe4b21880d82b95c4c7a676967f10f96 (patch) | |
tree | 2a697f7f7eba14bb0835c508497919d444069660 /mediagoblin/tools | |
parent | 533c7ab44a6210f4734b77d5785c5825d70e0c36 (diff) | |
download | mediagoblin-2c36555bfe4b21880d82b95c4c7a676967f10f96.tar.lz mediagoblin-2c36555bfe4b21880d82b95c4c7a676967f10f96.tar.xz mediagoblin-2c36555bfe4b21880d82b95c4c7a676967f10f96.zip |
Converting the path to subtitle into a tuple
Diffstat (limited to 'mediagoblin/tools')
-rw-r--r-- | mediagoblin/tools/subtitles.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mediagoblin/tools/subtitles.py b/mediagoblin/tools/subtitles.py new file mode 100644 index 00000000..7002cdfc --- /dev/null +++ b/mediagoblin/tools/subtitles.py @@ -0,0 +1,10 @@ +import ast + +def get_path(path): + """ + Converting the path of the form + x = u'[ "A","B","C" ," D"]' + to + x = ["A", "B", "C", "D"] + """ + return ast.literal_eval(path)
\ No newline at end of file |