the-generalist.com

  • Increase font size
  • Default font size
  • Decrease font size
joomla templates, wordpress themes, drupal, datalife engine, graphics, seo,
Home Credits

Posting Python Code Examples in Joomla

E-mail Print PDF

I wish I could say that I've found a good way to add Python code examples to my posts. I fought with the formatting of the previous post for most of the week. I think I've settled on an acceptable process, not great, but acceptable. Hopefully I can improve on it as I write more posts. Here are the steps I took:

  1. Create a new Blog Post in MS Word 2010 (File -> New -> Blog Post). Word 2007 probably works just as well.
  2. Write the article, copying the code from Eclipse into MS Word (I got some linking info when trying from Visual Studio).
  3. Replace code indents with tabs. I use four spaces in Eclipse and Visual Studio to indent my code, so I do a search and replace replacing fours spaces with a tab.
  4. I recommend creating a style for you code that doesn't add space between paragraphs and doesn't check spelling or grammar.
  5. Publish the article from Word to the Joomla page.
  6. Log into your Joomla site and edit the article. Change the style for the code blocks to
    .
  7. I had to add back in any spaces between lines that I wanted.

This turned out decent, but I still need to find a better way. This is also pretty specific to how I work, but I thought I would share in case any part of the process is useful to someone else having the same issues.

Last Updated on Monday, 06 June 2011 14:29  

Comments  

 
0 #1 home security 2016-03-08 21:44
What's up every one, here every one is sharing these knowledge, thus it's pleasant to read this web
site, and I used to pay a visit this webpage all the time.
Quote
 

Add comment


Security code
Refresh

Main Menu