Command line is not Python, try to use double quotes.
And it would be useful to write your original regex. This seemes to be a malformed command rather than a replace.py error.
node:pywikipedia kudu$ python replace.py -transcludes:sometemplate
-regex 'someregex' 'somereplacement'