Python: TCC command line parsing removes '=' equal sign characters

Nov 8, 2012
When I use an equals signs in a command line parameter to a python script it use the equal sign as white space.
import sys

print("arg count=%u" %len(sys.argv))
print("sys.argv[0]=%s" %sys.argv[0])
print("sys.argv[1]=%s" %sys.argv[1])
if len(sys.argv) >= 3:
print("sys.argv[2]=%s" %sys.argv[2])
print("no value in sys.argv[2]")

The output results for CMD and TCC 13 or 14.


TCC LE 13.04.63 Windows 7 [Version 6.1.7601]

[c:\]python e:\temp\ --path=c:\temp
arg count=3

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

c:\>python e:\temp\ --path=c:\temp
arg count=2
no value in sys.argv[2]

This makes writing command line parsing very difficult.
Can I report this as a bug?

J.R. Heisey
May 20, 2008
Syracuse, NY, USA
I don't know if it's a bug or not, but you might get around it by escaping the "=".
python e:\temp\ --path^=c:\temp
or, if python can deal with it, quote the second arg.
python e:\temp\ "--path=c:\temp"
Not having python, I can't test it.
Nov 8, 2012
CMDBatchDelimiters=no has corrected the issue even on LE. Thanks Charles.
The Python script is invoked by a make based software build system used by a hundred developers so I cannot change parameters. I am the only one who uses TCC.
  1. I could not find any documentation on this in the help file when using the keyword search for 'equal sign parameter delimiter'. OK now that I know what to look for the keywords 'argument delimiter' does show this topic.
  2. Searching for CMDBatchDelimiters does find the topic. I see the statement (Note: this will break CMD compatibility!) when set to 'no' which is not my experience on Windows 7 64 bit.
  3. The name CMDBatchDelimiters is confusing.
I would have expected something like EqualSignAsCommandLineDelimiter
I used to have paid licenses starting with 4DOS then 4NT for a while.
Now that was a long time ago. ;)
Similar threads
Thread starter Title Forum Replies Date
Alpengreis UTF-8 problem in TCC related to Python Support 7
Alpengreis Python support for 3.8.3 in TCC v26.x? Support 2
Joe Caverly PYTHON from Microsoft Windows Store Support 2
N Python 3.8.2 Support in 26? Support 3
fpefpe Python dll error Support 3
MickeyF Why doesn't my python program get executed without specifying its path? Support 2
J Error running Python at command line Support 9
fpefpe Documentation Python Examples Support 14
fpefpe Documentation Python support Support 11
jbanaszczyk Non ActiveState Python/Perl Support 4
fpefpe WAD Python support does not process command line Support 14
fpefpe How to? Path(s) for Python Support 0
fpefpe Documentation Python Support 5
Stefano Piccardi How to? return values from @python Support 2
lassevk exit(1) in a python script exits console, by design or bug? Support 1
p.f.moore TCMD v10 - Python support - use version 2.6? Support 2
vefatica TCC startup: /IP not honored after /K Support 1
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
C COMSPEC constantly reset to TCC.EXE Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
C How to? starting TCC/TCMD v25 Support 2
CWBillow TCC and TCMD in Powershell Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
Alpengreis Fixed Crash after copy dialog with big TCC.exception.log Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT v27.01 Build 22 Uploaded Support 0
L FTYPE in TCC, less quirky than in cmd.exe Support 3
V Set path permanently from within TCC? Support 3
DrusTheAxe Runaway TCC.exception.log filling drive Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.21 uploaded Support 0
Joe Caverly tcc.exception.log Support 3
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.20 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.19 Support 0
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
vefatica SCRIPT ... TCC disappears Support 2
rconn News Take Command / TCC / CMDebug / TCC-RT v27.0.18 Support 0
Jesse Heines Access Denied errors in TCC 27 Support 9
fpefpe How to? tcc inifile (%_ininame) Support 3
M How to? Black TCC Prompt Support 2
D Differences between TCC and CMD with COPY /b Support 4
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
Jay Sage Extra TCC Tasks Support 6
vefatica Can I turn off the minimize to tray mechanism in TCC? Support 5
N Command execution slows down in TCC Prompt after a while Support 6
R Upgrade TCMD 19 to TCC 26 Support 1
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
samintz How to? Is this doable in TCC? Support 2
rconn News Take Command / TCC / CMDebug / TCC-RT 26.02.41 Uploaded Support 0
D TCC tab detaching & restarting Support 3
Ó Recent git output not shown on TCC Support 1

Similar threads