Revision 3562, 1.2 kB
(checked in by jerome, 11 years ago)
|
Changed copyright years.
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
Rev | Line | |
---|
[5] | 1 | #! /usr/bin/env python |
---|
[3437] | 2 | # -*- coding: utf-8 -*- |
---|
[5] | 3 | # |
---|
[13] | 4 | # pkipplib : IPP and CUPS support for Python |
---|
[5] | 5 | # |
---|
[3562] | 6 | # (c) 2003-2013 Jerome Alet <alet@librelogiciel.com> |
---|
[40] | 7 | # This program is free software: you can redistribute it and/or modify |
---|
[5] | 8 | # it under the terms of the GNU General Public License as published by |
---|
[40] | 9 | # the Free Software Foundation, either version 3 of the License, or |
---|
[5] | 10 | # (at your option) any later version. |
---|
[3437] | 11 | # |
---|
[5] | 12 | # This program is distributed in the hope that it will be useful, |
---|
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 15 | # GNU General Public License for more details. |
---|
[3437] | 16 | # |
---|
[5] | 17 | # You should have received a copy of the GNU General Public License |
---|
[40] | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
[5] | 19 | # |
---|
| 20 | # $Id$ |
---|
| 21 | |
---|
| 22 | import sys |
---|
| 23 | |
---|
[13] | 24 | sys.path.insert(0, "../pkipplib") |
---|
[3437] | 25 | import pkipplib |
---|
| 26 | |
---|
[28] | 27 | cups = pkipplib.CUPS() |
---|
| 28 | answer = cups.createSubscription("ipp://localhost/", ["printer-added", "printer-deleted"], |
---|
| 29 | userdata="samplenotifier:blah", |
---|
| 30 | recipient="samplenotifier", |
---|
| 31 | charset="utf-8") |
---|
[5] | 32 | print answer |
---|
[21] | 33 | |
---|
[5] | 34 | #print answer.operation["attributes-charset"] |
---|