line continuation in python scripts

Posted by Arthur Dent on Mon 24 May 2004 03:03 PM — 2 posts, 25,148 views.

#0
In python you can use \ to continue a long line. For example:

if a == a or a==b or a==c:
print a

can be written as

if a == a or \
a == b or \
a == c:
print a

However, when I try the same code in python scripts for mushclient the \ causes an error.

Does anyone know of a work around?
Australia Forum Administrator #1
Is this in a script or the command window? There is an option for direct commands "translate backslash sequences" which, if active, will translate (eg, \n) when entered.