[[Category:Wiki_Help]] [[Category:Scripts]]
This wiki is capable of letting users download raw code embedded into the pages. Please see [http://wiki.yobi.be/wiki/Mediawiki_RawFile Mediawiki_RawFile] for more details, especially the examples at the [http://wiki.yobi.be/wiki/Mediawiki_RawFile#Short_example Examples] page.
== With 'syntaxhighlight' tag ==
In short, so as to cite python script code with proper syntax hilight, use the following tag and close your cite with
THIS WORKS.
Exeample :
def getCSVdata():
"""opens a csv file, reads it in and returns a 2 dimensional list with the data"""
csvfile = scribus.fileDialog("csv2table :: open file", "*.csv")
if csvfile != "":
try:
reader = csv.reader(file(csvfile))
datalist=[]
for row in reader:
rowlist=[]
for col in row:
rowlist.append(col)
datalist.append(rowlist)
return datalist
except Exception, e:
scribus.messageBox("csv2table", "Could not open file %s"%e)
else:
sys.exit
== With 'source' ==
* Use either tags where xxxxx is the language such as 'bash', 'python', 'cpp' and so on around your code snippets
or for more power use the specially designed {{#fileanchor: myotherscript.sh}} and {{#filelink: myotherscript.sh}} templates as shown in the long example.