##// END OF EJS Templates
ensure Application.argv is unicode...
MinRK -
Show More
@@ -38,6 +38,7 b' from IPython.utils.traitlets import ('
38 )
38 )
39 from IPython.utils.importstring import import_item
39 from IPython.utils.importstring import import_item
40 from IPython.utils.text import indent, wrap_paragraphs, dedent
40 from IPython.utils.text import indent, wrap_paragraphs, dedent
41 from IPython.utils import py3compat
41
42
42 #-----------------------------------------------------------------------------
43 #-----------------------------------------------------------------------------
43 # function for re-wrapping a helpstring
44 # function for re-wrapping a helpstring
@@ -457,7 +458,7 b' class Application(SingletonConfigurable):'
457 def parse_command_line(self, argv=None):
458 def parse_command_line(self, argv=None):
458 """Parse the command line arguments."""
459 """Parse the command line arguments."""
459 argv = sys.argv[1:] if argv is None else argv
460 argv = sys.argv[1:] if argv is None else argv
460 self.argv = list(argv)
461 self.argv = [ py3compat.cast_unicode(arg) for arg in argv ]
461
462
462 if argv and argv[0] == 'help':
463 if argv and argv[0] == 'help':
463 # turn `ipython help notebook` into `ipython notebook -h`
464 # turn `ipython help notebook` into `ipython notebook -h`
General Comments 0
You need to be logged in to leave comments. Login now