Print command

Yong Wang yong at net.tamu.edu
Wed Aug 11 11:47:00 EDT 2004


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