<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: pycups</title>
	<atom:link href="http://cyberelk.net/tim/software/pycups/feed/" rel="self" type="application/rss+xml" />
	<link>http://cyberelk.net/tim</link>
	<description></description>
	<lastBuildDate>Tue, 23 Feb 2010 14:55:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Robert Kajic</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-4146</link>
		<dc:creator>Robert Kajic</dc:creator>
		<pubDate>Fri, 06 Mar 2009 18:40:39 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-4146</guid>
		<description>Thanks again! I was using 1.9.30 :)

Here are some notes on what I had to do to sucessfully install 1.9.45 (Max OS X 10.5.6):

In cupsppd.c I had to remove the #ifdef __SVR4 on line 510 (and 528) because otherwise gcc gave the following warning: 
cupsppd.c:557: warning: implicit declaration of function ‘getline’

and when importing cups in python I got the following error:
&gt;&gt;&gt; import cups
Traceback (most recent call last):
  File &quot;&quot;, line 1, in 
ImportError: dlopen(/usr/local/lib/python2.6/site-packages/cups.so, 2): Symbol not found: _getline
  Referenced from: /usr/local/lib/python2.6/site-packages/cups.so
  Expected in: dynamic lookup

Furthermore I had to add LDFLAGS=-liconv  to line 12 in the Makefile. Then after a make and make install I had to manually copy cups.so from the source directory to its install location:
sudo cp pycups-1.9.45/cups.so /usr/local/lib/python2.6/site-packages/cups.so

Indeed, as I said in a previous post, pycups-1.9.45/cups.so and pycups-1.9.45/build/lib.macosx-10.3-i386-2.6/cups.so seem to differ:
&gt; cmp pycups-1.9.45/cups.so pycups-1.9.45/build/lib.macosx-10.3-i386-2.6/cups.so 
pycups-1.9.45/cups.so pycups-1.9.45/build/lib.macosx-10.3-i386-2.6/cups.so differ: char 17, line 1

I hope this can be of some help to others.</description>
		<content:encoded><![CDATA[<p>Thanks again! I was using 1.9.30 <img src='http://cyberelk.net/tim/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here are some notes on what I had to do to sucessfully install 1.9.45 (Max OS X 10.5.6):</p>
<p>In cupsppd.c I had to remove the #ifdef __SVR4 on line 510 (and 528) because otherwise gcc gave the following warning:<br />
cupsppd.c:557: warning: implicit declaration of function ‘getline’</p>
<p>and when importing cups in python I got the following error:<br />
&gt;&gt;&gt; import cups<br />
Traceback (most recent call last):<br />
  File &#8220;&#8221;, line 1, in<br />
ImportError: dlopen(/usr/local/lib/python2.6/site-packages/cups.so, 2): Symbol not found: _getline<br />
  Referenced from: /usr/local/lib/python2.6/site-packages/cups.so<br />
  Expected in: dynamic lookup</p>
<p>Furthermore I had to add LDFLAGS=-liconv  to line 12 in the Makefile. Then after a make and make install I had to manually copy cups.so from the source directory to its install location:<br />
sudo cp pycups-1.9.45/cups.so /usr/local/lib/python2.6/site-packages/cups.so</p>
<p>Indeed, as I said in a previous post, pycups-1.9.45/cups.so and pycups-1.9.45/build/lib.macosx-10.3-i386-2.6/cups.so seem to differ:<br />
&gt; cmp pycups-1.9.45/cups.so pycups-1.9.45/build/lib.macosx-10.3-i386-2.6/cups.so<br />
pycups-1.9.45/cups.so pycups-1.9.45/build/lib.macosx-10.3-i386-2.6/cups.so differ: char 17, line 1</p>
<p>I hope this can be of some help to others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-4144</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Fri, 06 Mar 2009 17:41:04 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-4144</guid>
		<description>Robert: use cups.Connection.printFile()/printFiles() to do that.

cups.require(&quot;1.9.39&quot;)</description>
		<content:encoded><![CDATA[<p>Robert: use cups.Connection.printFile()/printFiles() to do that.</p>
<p>cups.require(&#8220;1.9.39&#8243;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Kajic</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-4142</link>
		<dc:creator>Robert Kajic</dc:creator>
		<pubDate>Fri, 06 Mar 2009 17:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-4142</guid>
		<description>I realize I am probably missing out on something but why isn&#039;t it possible to add jobs using pycups? I would very much like to be able to do this and I&#039;ve looked through the pycups documentation but I can&#039;t find an addJob or equivalent method. Right now I am using os.execv and &quot;lp&quot; to add jobs but I would very much like to avoid that. Perhaps there is some other library I could use to add jobs?</description>
		<content:encoded><![CDATA[<p>I realize I am probably missing out on something but why isn&#8217;t it possible to add jobs using pycups? I would very much like to be able to do this and I&#8217;ve looked through the pycups documentation but I can&#8217;t find an addJob or equivalent method. Right now I am using os.execv and &#8220;lp&#8221; to add jobs but I would very much like to avoid that. Perhaps there is some other library I could use to add jobs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Kajic</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-4123</link>
		<dc:creator>Robert Kajic</dc:creator>
		<pubDate>Wed, 04 Mar 2009 21:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-4123</guid>
		<description>I would prefer to email the patch but I can&#039;t seem to find your email. 
However, the modifications I made to the Makefile regarding libiconv seem to have been futile. Python throws the following error when I try cupstree.py
(right after running make install):

Traceback (most recent call last):
  File &quot;pycups-1.9.30/cupstree.py&quot;, line 2, in 
    import cups
ImportError: dlopen(/usr/local/lib/python2.6/site-packages/cups.so, 2): Symbol not found: _libiconv
  Referenced from: /usr/local/lib/python2.6/site-packages/cups.so
  Expected in: dynamic lookup

I noticed that I was able to import cups if I launched python while standing in the source directory where the freshly build cups.so can be found. So I manually copied cups.so to /usr/local/lib/python2.6/site-packages and now I am able to import cups regardless of where it&#039;s started from. Indeed, running cmp on the cups.so that is created by make install and the cups.so that is created by make shows the files are not identical:

&gt; cmp /usr/local/lib/python2.6/site-packages/cups.so /Users/kajic/stuff/kek/pycups-1.9.30/cups.so
/usr/local/lib/python2.6/site-packages/cups.so /Users/kajic/stuff/kek/pycups-1.9.30/cups.so differ: char 17, line 1

How can this be?</description>
		<content:encoded><![CDATA[<p>I would prefer to email the patch but I can&#8217;t seem to find your email.<br />
However, the modifications I made to the Makefile regarding libiconv seem to have been futile. Python throws the following error when I try cupstree.py<br />
(right after running make install):</p>
<p>Traceback (most recent call last):<br />
  File &#8220;pycups-1.9.30/cupstree.py&#8221;, line 2, in<br />
    import cups<br />
ImportError: dlopen(/usr/local/lib/python2.6/site-packages/cups.so, 2): Symbol not found: _libiconv<br />
  Referenced from: /usr/local/lib/python2.6/site-packages/cups.so<br />
  Expected in: dynamic lookup</p>
<p>I noticed that I was able to import cups if I launched python while standing in the source directory where the freshly build cups.so can be found. So I manually copied cups.so to /usr/local/lib/python2.6/site-packages and now I am able to import cups regardless of where it&#8217;s started from. Indeed, running cmp on the cups.so that is created by make install and the cups.so that is created by make shows the files are not identical:</p>
<p>&gt; cmp /usr/local/lib/python2.6/site-packages/cups.so /Users/kajic/stuff/kek/pycups-1.9.30/cups.so<br />
/usr/local/lib/python2.6/site-packages/cups.so /Users/kajic/stuff/kek/pycups-1.9.30/cups.so differ: char 17, line 1</p>
<p>How can this be?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-4122</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Wed, 04 Mar 2009 17:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-4122</guid>
		<description>I think your patch has been broken during transit.  Please submit patches in unified diff format (i.e. diff -u), preferably from &#039;git format-patch&#039;, using the trac interface or normal email.

However, for this particular case it looks like it needs an autoconf check, which means that it needs to start using autoconf.</description>
		<content:encoded><![CDATA[<p>I think your patch has been broken during transit.  Please submit patches in unified diff format (i.e. diff -u), preferably from &#8216;git format-patch&#8217;, using the trac interface or normal email.</p>
<p>However, for this particular case it looks like it needs an autoconf check, which means that it needs to start using autoconf.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Kajic</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-4121</link>
		<dc:creator>Robert Kajic</dc:creator>
		<pubDate>Wed, 04 Mar 2009 17:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-4121</guid>
		<description>Your source does not build on Mac OS X. Here is a patch. 
Btw, there are C libraries other than glibc...

Makefile.diff
14c14
       env LDFLAGS=-liconv CFLAGS=-DVERSION=\\\&quot;$(VERSION)\\\&quot; python setup.py build

cupsppd.c.diff
25a26
&gt; #include 
54a56,65
&gt; char *
&gt; strndup(char *src, size_t n)
&gt; {
&gt;       char *dst = malloc(n);
&gt; 
&gt;       if (!dst)
&gt;               exit(1);
&gt;       return strncpy(dst, src, n);
&gt; }
&gt; 
480,481c491
file);
     if (!fgets(line, linelen, self-&gt;file))</description>
		<content:encoded><![CDATA[<p>Your source does not build on Mac OS X. Here is a patch.<br />
Btw, there are C libraries other than glibc&#8230;</p>
<p>Makefile.diff<br />
14c14<br />
       env LDFLAGS=-liconv CFLAGS=-DVERSION=\\\&#8221;$(VERSION)\\\&#8221; python setup.py build</p>
<p>cupsppd.c.diff<br />
25a26<br />
&gt; #include<br />
54a56,65<br />
&gt; char *<br />
&gt; strndup(char *src, size_t n)<br />
&gt; {<br />
&gt;       char *dst = malloc(n);<br />
&gt;<br />
&gt;       if (!dst)<br />
&gt;               exit(1);<br />
&gt;       return strncpy(dst, src, n);<br />
&gt; }<br />
&gt;<br />
480,481c491<br />
file);<br />
     if (!fgets(line, linelen, self-&gt;file))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-3298</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Mon, 27 Oct 2008 16:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-3298</guid>
		<description>pycups doesn&#039;t use the symbol &#039;libiconv&#039; directly, however it does use &#039;iconv&#039;, &#039;iconv_open&#039;, and &#039;iconv_close&#039;.  These are POSIX.1-2001 functions, so should be provided by your C library (for instance, GNU glibc provides them).</description>
		<content:encoded><![CDATA[<p>pycups doesn&#8217;t use the symbol &#8216;libiconv&#8217; directly, however it does use &#8216;iconv&#8217;, &#8216;iconv_open&#8217;, and &#8216;iconv_close&#8217;.  These are POSIX.1-2001 functions, so should be provided by your C library (for instance, GNU glibc provides them).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: QLand</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-3297</link>
		<dc:creator>QLand</dc:creator>
		<pubDate>Mon, 27 Oct 2008 13:22:30 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-3297</guid>
		<description>Hi,

After making the application if I run the example I get: undefined symbol: libiconv. I have libiconv 2.4.0 installed

Any idea?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>After making the application if I run the example I get: undefined symbol: libiconv. I have libiconv 2.4.0 installed</p>
<p>Any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-3258</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Mon, 20 Oct 2008 18:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-3258</guid>
		<description>I went to the trac site to create a bug report, but couldn&#039;t figure out how to create an account there. I eventually found my way  &lt;a href=&quot;https://admin.fedoraproject.org/accounts/user/new&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; in case others want to submit a bug.</description>
		<content:encoded><![CDATA[<p>I went to the trac site to create a bug report, but couldn&#8217;t figure out how to create an account there. I eventually found my way  <a href="https://admin.fedoraproject.org/accounts/user/new" rel="nofollow">here</a> in case others want to submit a bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quick Printer Setup with system-config-printer &#124; kallasoft</title>
		<link>http://cyberelk.net/tim/software/pycups/comment-page-1/#comment-2714</link>
		<dc:creator>Quick Printer Setup with system-config-printer &#124; kallasoft</dc:creator>
		<pubDate>Fri, 22 Aug 2008 18:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://cyberelk.net/tim/software/pycups/#comment-2714</guid>
		<description>[...] goodbye to back button woes couldn&#8217;t be easier&#8230; Just install pycups (from the same developer), pygtk, and the nifty little system-config-printer app found here. There is a little more doc on [...]</description>
		<content:encoded><![CDATA[<p>[...] goodbye to back button woes couldn&#8217;t be easier&#8230; Just install pycups (from the same developer), pygtk, and the nifty little system-config-printer app found here. There is a little more doc on [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
