Browse Source

Code review fix: convert list into variables.

pull/35/head
denarced 10 years ago
parent
commit
9f36c7c517
1 changed files with 2 additions and 2 deletions
  1. 4
      gooey/code_prep.py

4
gooey/code_prep.py

@ -38,8 +38,8 @@ def split_line(line):
# splits an assignment statement into varname and command strings
# in: "parser = ArgumentParser(description='Example Argparse Program')"
# out: "parser", "ArgumentParser(description='Example Argparse Program"
pieces = line.split('=', 1)
return pieces[0].strip(), ''.join(pieces[1:]).lstrip()
variable, instruction = line.split('=', 1)
return variable.strip(), instruction.strip()
def update_parser_varname(new_varname, code):
# lines = source.split('\n')[1:]

Loading…
Cancel
Save