Changeset 360 in tailor for vcpx/shwrap.py
- Timestamp:
- 06/10/05 02:38:43 (8 years ago)
- Hash name:
- 20050610003843-97f81-6ae125e4cb26db223f81cccf7c06e7a2f56d1ab1
- File:
-
- 1 edited
-
vcpx/shwrap.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/shwrap.py
r359 r360 76 76 VERBOSE = True 77 77 """Print the executed command on stderr, at each run.""" 78 79 FORCE_ENCODING = None 80 """Force the output encoding to some other charset instead of user prefs.""" 78 81 79 82 def __init__(self, command=None, working_dir=None): … … 120 123 inp, out = popen2(command) 121 124 def handleinp(): 122 inp.write(input.encode('utf8')) 125 if self.FORCE_ENCODING: 126 inp.write(input.encode(self.FORCE_ENCODING)) 127 else: 128 inp.write(input) 123 129 inp.close() 124 130 inpthread = threading.Thread(target = handleinp) … … 145 151 if input: 146 152 inp, out = popen2(command) 147 inp.write(input) 153 if self.FORCE_ENCODING: 154 inp.write(input.encode(self.FORCE_ENCODING)) 155 else: 156 inp.write(input) 148 157 inp.close() 149 158 out.close()
Note: See TracChangeset
for help on using the changeset viewer.
