@@ -180,7 +180,7 @@ def _forward_ilshift(self, other):
180
180
181
181
182
182
if not hasattr (sys , 'argv' ): # for modpython
183
- sys .argv = ['modpython' ]
183
+ sys .argv = [str ( 'modpython' ) ]
184
184
185
185
186
186
from matplotlib .rcsetup import (defaultParams ,
@@ -249,8 +249,10 @@ class Verbose:
249
249
# --verbose-silent or --verbose-helpful
250
250
_commandLineVerbose = None
251
251
252
- for arg in map (six .u , sys .argv [1 :]):
253
- if not arg .startswith ('--verbose-' ):
252
+ for arg in sys .argv [1 :]:
253
+ # cast to str because we are using unicode_literals,
254
+ # and argv is always str
255
+ if not arg .startswith (str ('--verbose-' )):
254
256
continue
255
257
level_str = arg [10 :]
256
258
# If it doesn't match one of ours, then don't even
@@ -1282,8 +1284,10 @@ def tk_window_focus():
1282
1284
# Allow command line access to the backend with -d (MATLAB compatible
1283
1285
# flag)
1284
1286
1285
- for s in map (six .u , sys .argv [1 :]):
1286
- if s .startswith ('-d' ) and len (s ) > 2 : # look for a -d flag
1287
+ for s in sys .argv [1 :]:
1288
+ # cast to str because we are using unicode_literals,
1289
+ # and argv is always str
1290
+ if s .startswith (str ('-d' )) and len (s ) > 2 : # look for a -d flag
1287
1291
try :
1288
1292
use (s [2 :])
1289
1293
except (KeyError , ValueError ):
0 commit comments