Print command
wes weston
wweston at att.net
Wed Aug 11 11:57:44 EDT 2004
Yong Wang wrote:
> Hi, All:
> For unknow reasons, I often get compiler error in the print
> statements. For example: I have following codes:
>
> if len(currentFiberCode) > 0 :
> print string.ljust(expandFiberCode(currentFiberCode,buildingRoom),30), \
> string.rjust(`currentTotal`,6), \
> string.rjust(`currentAvailable`,11), \
> string.rjust(`sm_ava`,7), \
> string.rjust(`mm_ava`,6), \
> string.rjust(`sm_used`,9), \
> string.rjust(`mm_used`,9)
> else:
> print 'data exist in fiber database table'
>
> When I comiped all the codes, I got :
> Compiling ./NetDBfiber.py ...
> File "./NetDBfiber.py", line 1086
> string.rjust(`currentTotal`,6), \
> ^
> SyntaxError: invalid token
>
>
> How can I fix the problems ?
> Thanks a lot.
>
> Yong
>
Yong,
Is there a trailing space after the \ ? Looks like it.
wes
More information about the Python-list
mailing list