I am trying to add code to an answer and have tried using the < code> tag. But every line that has a # becomes bold. Is this a bug or am I missing something?
Example:
a line of commenting with a # at the beginning
another line that starts with a #
Should instead look Like this:
#!/usr/bin/python
# this script can installed to the current user account by running the following commands:
# sudo apt-get install python-nautilus python-mutagen python-pyexiv2 python-kaa-metadata python-pypdf
# mkdir ~/.nautilus/python-extensions
# cp bsc-v2.py ~/.nautilus/python-extensions
# chmod a+x ~/.nautilus/python-extensions/bsc-v2.py
# alternatively, you can be able to place the script in:
# /usr/lib/nautilus/extensions-2.0/python/
import os
import urllib
import nautilus
# for id3 support
try:
from mutagen.easyid3 import EasyID3
from mutagen.mp3 import MPEGInfo
except: print "Python Mutagen library not found?"
# for exif support
try: import pyexiv2
except: print "Python pyexiv2 library not found?"
# for reading videos. for future improvement, this can also read mp3!
try: import kaa.metadata
except: print "Python KAA library not found?"
# for reading image dimensions
try: from PIL import Image
except: print "Python Image library not found?"
# for reading pdf
try: from pyPdf import PdfFileReader
except: print "Python pyPDF library not found?"
class ColumnExtension(nautilus.ColumnProvider, nautilus.InfoProvider):
def __init__(self):
pass
def get_columns(self):
return (
nautilus.Column("NautilusPython::title_column","title","Title","Song title"),
nautilus.Column("NautilusPython::album_column","album","Album","Album"),
nautilus.Column("NautilusPython::artist_column","artist","Artist","Artist"),
nautilus.Column("NautilusPython::tracknumber_column","tracknumber","Track","Track number"),
nautilus.Column("NautilusPython::genre_column","genre","Genre","Genre"),
nautilus.Column("NautilusPython::date_column","date","Date","Date"),
nautilus.Column("NautilusPython::bitrate_column","bitrate","Bitrate","Audio Bitrate in kilo bits per second"),
nautilus.Column("NautilusPython::samplerate_column","samplerate","Sample rate","Sample rate in Hz"),
nautilus.Column("NautilusPython::length_column","length","Length","Length of audio"),
nautilus.Column("NautilusPython::exif_datetime_original_column","exif_datetime_original","EXIF Dateshot ","Get the photo capture date from EXIF data"),
nautilus.Column("NautilusPython::exif_software_column","exif_software","EXIF Software","EXIF - software used to save image"),
nautilus.Column("NautilusPython::exif_flash_column","exif_flash","EXIF flash","EXIF - flash mode"),
nautilus.Column("NautilusPython::exif_pixeldimensions_column","exif_pixeldimensions","EXIF Image Size","Image size - pixel dimensions as reported by EXIF data"),
nautilus.Column("NautilusPython::pixeldimensions_column","pixeldimensions","Image Size","Image/video size - actual pixel dimensions"),
)
UPDATE:
It seems that adding four spaces to each line did what I was looking for and I am guessing this is not a bug, but user error. Also as answered below.