This file contains hidden or 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
| Use: | |
| ``` | |
| lpoptions -l printername | |
| ``` | |
| to view the list of printer options. The two lines of interest are: | |
| `StpiShrinkOutput/Shrink` Page If Necessary to Fit Borders: Shrink Crop *Expand | |
| `StpBorderless/Borderless`: False *True |
This file contains hidden or 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
| import urllib2 | |
| # retrieve token | |
| url="http://192.168.8.1/api/webserver/token" | |
| response = urllib2.urlopen(url) | |
| xml=response.read() | |
| token=xml[59:-23] | |
| print "Got token %s" % token | |