Print to printer
I can't seem to figure out how to print with my printer using python. I'm using Mac OSX 10.4. I was thinking maybe something with applescript. Does anyone know? -- http://mail.python.org/mailman/listinfo/python-list
Re: Print to printer
I just want to print text. I'll try macpython. Thanks for the help. -- http://mail.python.org/mailman/listinfo/python-list
Re: Print to printer
I just want to print text. I'll try macpython. Thanks for the help. -- http://mail.python.org/mailman/listinfo/python-list
Re: random number generator
import random print random.randint(1,20) #prints random integer from 1 to 20 -- http://mail.python.org/mailman/listinfo/python-list
Re: Print to printer
Wow. That worked perfectly. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list
Re: Print to printer
Do you know if there's a way to print a file? I'm trying to print an
HTML file, so your solution is good, but doesn't really work for me.
Just reading the HTML file and the printing the content obviously
wouldn't work. I also tried:
>>> printer.write(file('path/to/file.ext'))
but apparently this function only takes strings as parameters.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Command line
What OS are you using. I'm not sure about anything else but on a mac
it's:
>>import os
>>os.system("ls -la")
--
http://mail.python.org/mailman/listinfo/python-list
Re: hex string to hex value
If you just want to convert a string to an integer, it would be: >>> int(n) in your case it would be: >>> m=66 >>> n=int(hex(m)) -- http://mail.python.org/mailman/listinfo/python-list
