0

How to format printing stmt in python?

print"---------------------------------"
print"client:mount-point:logfile:status"
print"---------------------------------"
print clientname,mntpt,logfile,status

Currently it prints something like this :

---------------------------------
client:mount-point:logfile:status
---------------------------------
client01 : /some/path/mnt/1007/1 : /export/something/laks/specs_dir/log/client1/gc.log:running

How to make this output better?. Any suggestions

gimel
87k10 gold badges80 silver badges104 bronze badges
asked Mar 23, 2010 at 12:45
2

3 Answers 3

1
answered Mar 23, 2010 at 12:59
Sign up to request clarification or add additional context in comments.

Comments

0

If you're trying to format a table, consider using other software for table formatting.

As an example, you can produce HTML with the print statements and view the table with a browser. Another option is to generate csv data to be viewed using a spreadsheet program.

answered Mar 23, 2010 at 13:03

Comments

0

Stick some tab spacing in for a start?

'\t'
answered Mar 23, 2010 at 16:55

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.