Changeset 2788 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jan 14, 2020, 3:44:09 PM (5 years ago)
Author:
lfita
Message:

Doing it well when 'unicode' (not working in hydra) in `numVector_String'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r2787 r2788  
    38723872    string=''
    38733873    for i in range(Nvals):
    3874         if type(vec[i]) == type('Str') or type(vec[i]) == type(u'1'):
     3874        if type(vec[i]) == type('Str'):
    38753875            vecS = vec[i]
     3876        elif type(vec[i]) == type(u'1'):
     3877            vecS = vec[i].encode('utf-8')
    38763878        else:
    38773879            vecS = str(vec[i])
Note: See TracChangeset for help on using the changeset viewer.