Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to use MS Word to make some documentation for python code. Line number, or boxing around the code, or anything would be better than just use normal format.

Is there any good/useful style/method for code documentation purposes?

share|improve this question
up vote 3 down vote accepted

Do you have an editor that formats python code for you? I ask because visual studio will copy C#/C++/VB code onto the clipboard with formatting intact so that when pasted into word it looks identical (give or take line lengths).

share|improve this answer

At the most basic you can select a monospaced font - usually Courier New - as your code font. You won't get all the syntax highlighting, but it will stand out from the rest of your document.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.