Issue1690

classification
Title: os.system() misinterprets '<' character. jython vs python
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: amak, fwierzbicki, houtm035
Priority: Keywords:

Created on 2010-12-20.15:39:48 by houtm035, last changed 2013-02-26.23:39:58 by amak.

Files
File name Uploaded Description Edit Remove
os.system_call.txt houtm035, 2010-12-20.15:39:48 os.system() incompatible
Messages
msg7824 (view) Author: Alan Kennedy (amak) Date: 2013-02-26.23:39:58
Your example code is

os.system(  'qgrep "<xyz" D:\*.xml > D:\result.txt'  )

You are aware that the \ characters are not being interpreted as directory slashes in this string: they are python escape characters. Furthermore, the "\r" will be interpreted as a carriage return.

Why such a convoluted mechanism? Why not just do this?

os.system('qgrep xyz D:/*.xml > D:/result.txt')
History
Date User Action Args
2013-02-26 23:39:58amaksetnosy: + amak
messages: + msg7824
2013-02-20 19:33:24fwierzbickisetnosy: + fwierzbicki
versions: + Jython 2.5, - 2.5.1
2010-12-20 15:39:48houtm035create