- martinnadal.eu / muimota.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#uses python-escpos | |
#https://github.com/python-escpos/python-escpos | |
#2019 muimota | |
from escpos.printer import File | |
import os | |
p = File("/dev/usb/lp0") | |
p.text("Hello World\n") | |
if os.path.isfile('logo.gif'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[email protected] | |
#grabs stocks values from Yahoo finance | |
from lxml import html | |
import urllib2 | |
#curl -vs https://es.finance.yahoo.com/q?s=ITX.MC 2>/dev/null | xmllint --html --xpath '//*[@id="yfs_l84_itx.mc"]' - 2>/dev/null | |
def query(symbol): | |
url = 'http://finance.yahoo.com/quote/{}'.format(symbol.upper()) |