Print command
CptPicard
jpmorichon at earthlink.net
Wed Aug 11 13:09:10 EDT 2004
I think that you should try:
string.rjust('currentTotal',6)
instead of:
string.rjust(`currentTotal`,6)
You may also do it this this way:
'currentTotal'.rjust(6)
"Yong Wang" <yong at net.tamu.edu> wrote in message
news:mailman.1511.1092239223.5135.python-list at python.org...
> 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
>
More information about the Python-list
mailing list