#NEWLINE# def fix_argv( argv , path , main ) : #NEWLINE# #INDENT# 'Properly display ``python -m`` invocations' #NEWLINE# if ( not path [ 0 ] ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# name = main_module_name ( main ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# argv = argv [ : ] #NEWLINE# argv [ 0 ] = '{0} -m {1}' . format ( get_executable ( sys . executable , 'python' ) , name ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# name = get_executable ( argv [ 0 ] , argv [ 0 ] ) #NEWLINE# argv = argv [ : ] #NEWLINE# argv [ 0 ] = name #NEWLINE# #UNINDENT# return path