Daniel Veazey
  • Home
  • About
  • Contact
  • What People Are Saying
Follow

WP-SynHighlight

Apr22
2010
1 Comment Written by Daniel Veazey

I found a plugin for adding Python code to my posts. It’s called WP-SynHighlight. I’m not sure it works well with my theme, though. Here is an example:

Code block   
  1. # produce a multiplication table with the number of rows and columns defined by the user
  2. columns = int(raw_input("Input the number of columns: "))
  3. rows = int(raw_input("Input the number of rows: "))
  4. longest = len(str(columns * rows)) # find out how many digits are needed for rjust() to format table evenly
  5. for table in range (1, rows+1):
  6. for table2 in range (1, columns+1):
  7. result = table * table2
  8. print str(result).rjust(longest),
  9. print

Some of the code is white on a white background. Now I need to figure out how to change that background or change the color of the text.

Be Sociable, Share!
  • Tweet

Related posts:

  1. timestable.py
  2. Python Sudoku solver
  3. Working on the bike problem with Python
  4. Programming with Python
  5. The bike saga continues
Posted in Python - Tagged plugins, Python, wordpress, wp-synhighlight
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
← YouTube
Changes →

1 Comment

  1. Daniel Veazey's Gravatar Daniel Veazey
    April 22, 2010 at 2:40 pm | Permalink

    With this new theme, the text that previously couldn’t be seen can now be seen.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories

  • Activities
  • Audacity
  • Books
  • Film reviews
  • Free stuff
  • Gadgetry
  • Gimp
  • Inkscape
  • Jokes
  • Kdenlive
  • Linux
  • Music
  • Photography
  • Python
  • Quotes
  • Ukulele
  • Videos
  • WordPress

Why you should leave a comment

1. I read all the comments.
2. I reply and answer every question.
3. I always click through to see the sites of commentators.
4. Because you can.
5. You become a participant instead of just an observer.

Pictures I took

DSC_2351 DSC_0179 DSC_0170 girl3 DSC_0156 Cold dennis_painting A Man And His Dog DSC_0146 DSC_0174 dsc_9485 DSC_0130

Blogroll

  • A Life Ended Here
  • Arthur Reeder
  • Barrel House Marketing Group
  • Central Arkansas Innovative Alliance
  • Digital Photography School
  • Fazed
  • Freedom Feens Podcast
  • Full Circle Magazine
  • heathenx.org
  • John LeMasney
  • Libertarian Punk
  • Mitch Canter
  • Ozarks Unbound
  • radio free python
  • Ronnie Tucker
  • Tammy Hart Designs
  • The Agitator
  • Ubunite
  • Ubuntu
  • WordCamp Fayetteville
  • WP Beginner

EvoLve theme by Theme4Press  •  Powered by WordPress Daniel Veazey
Things I find interesting