root / pkipplib / trunk / tests / test.py @ 2810

Revision 45, 1.3 kB (checked in by jerome, 17 years ago)

Changed copyright years.
Changed default source encoding from ISO-889-15 to UTF-8.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /usr/bin/env python
2# -*- coding: UTF-8 -*-
3#
4# pkipplib : IPP and CUPS support for Python
5#
6# (c) 2003, 2004, 2005, 2006, 2007, 2008 Jerome Alet <alet@librelogiciel.com>
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
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.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19#
20# $Id$
21
22import sys
23
24sys.path.insert(0, "../pkipplib")
25import pkipplib       
26   
27cups = pkipplib.CUPS()
28answer = cups.createSubscription("ipp://localhost/", ["printer-added", "printer-deleted"],
29                                                     userdata="samplenotifier:blah",
30                                                     recipient="samplenotifier",
31                                                     charset="utf-8")
32print answer
33
34#print answer.operation["attributes-charset"]
Note: See TracBrowser for help on using the browser.