2- Ir a editar HTML
3- Dentro de editar HTML debajo de la etiqueta <head> es necesario copiar el siguiente código:
<!--SYNTAX HIGHLIGHTER INICIO-->
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJavaFX.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'/>
<script language='javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = "http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf";
SyntaxHighlighter.all();
</script>
<!--SYNTAX HIGHLIGHTER FIN-->
4- Seleccionamos guardar tema y nos dirigimos a crear nuestra entrada
5-Dentro de la entrada, vamos a la sección de HTML y escribimos el siguiente código:
<
pre
class
=
"brush: python"
>
#Aqui insertamos el codigo
</
pre
>
formato Note Pad++
Ejemplo:
from Tkinter import * canvas_width = 500 canvas_height = 150 def paint(event): x1,y1 = (event.x-1), (event.y-1) x2,y2 = (event.x+1), (event.y+1) panel.create_oval(x1, y1, x2, y2, fill = 'red') def borrartodo(): panel.delete('all') master = Tk()#crea un objeto tk master.title('Pinta con el mouse') panel = Canvas(master, width = canvas_height, height = canvas_height) panel.pack(expand = YES, fill = BOTH) panel.bind("", paint) mensaje = Label(master, text = 'Presione o arrastre con el mause') mensaje.pack(side = BOTTOM) boton = Button(master, text = 'Borrar', command = borrartodo) boton.pack(side = BOTTOM) master.mainloop()
No hay comentarios:
Publicar un comentario