<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.python.general">
    <title>gmane.comp.python.general</title>
    <link>http://blog.gmane.org/gmane.comp.python.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733142"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733140"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733127"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733118"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733111"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733108"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733097"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733094"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733091"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733080"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733072"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733071"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733067"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733066"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733061"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733055"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733054"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733043"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/733029"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.general/732992"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733142">
    <title>file I/O and arithmetic calculation</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733142</link>
    <description>&lt;pre&gt;Dear all,

I would appreciate if someone could write a simple python code for the
purpose below:

I have five text files each of 10 columns by 10 rows as follows:

file_one = 'C:/test/1.txt'
file_two = 'C:/test/2.txt' . . .
file_five = 'C:/test/5.txt'

 I want to calculate the mean of first row (10 elements) for each file (5
files), if mean of first column (10 elements) of each file (5 files) is 50.

Thank you in advance.

Keira
&lt;/pre&gt;</description>
    <dc:creator>Keira Wilson</dc:creator>
    <dc:date>2013-05-22T16:13:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733140">
    <title>subclassing from unittest</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733140</link>
    <description>&lt;pre&gt;Hi,

I'd like to subclass from unittest.TestCase.  I observed something
interesting and wonder if anyone can explain what's going on... some
subclasses create  null tests.

I can create this subclass and the test works:

  class StdTestCase (unittest.TestCase):
      blahblah

and I can create this subsubclass and the test works:

  class aaaTestCase (StdTestCase):
      moreblahblah

but if I create this subsubclass (or any where the first letter is
capital):

  class AaaTestCase (StdTestCase):
      differentblahblah

the test completes immediately without any work being done.

I suspect that the answer is in the prefix printed out by the test.  I
have diffed both the long output (tests works, on the left) and the
short output (null test, on the right):

test
(TC_02.TestCase_F_0000_ULLA05_xxxxxxxx_AM_Tx) ...                  &amp;lt;
test suite has  &amp;lt;unittest.TestSuite tests=[&amp;lt;unittest.TestSuite
tests=[]&amp;gt;,       test suite has  &amp;lt;unittest.TestSuite
tests=[&amp;lt;unittest.TestSuite tests=[]&amp;gt;,
 
 &amp;lt;unittest.TestSuite
tests&lt;/pre&gt;</description>
    <dc:creator>Charles Smith</dc:creator>
    <dc:date>2013-05-22T15:32:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733127">
    <title>Python Windows release and encoding</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733127</link>
    <description>&lt;pre&gt;Hi, I am working on Linux; a friend of mine sends to me python files from
his Windows release. He uses the editor coming with the release; he runs
his code from the editor by using a menu (or some F5 key I think).

He doesn't declare any encoding in his source file; when I want to try
his code, I have an error since he obviously uses non-ascii characters.
As far as I can see, he uses utf8 without knowing it. I add the UTF8
declaration, run the code, and everything is fine.

Then I tell him to add the utf-8 declaration; but now he has an error
when running his file from the Windows editor.

Finally, he told me he could run the file by declaring the latin-1
encoding.

But I want to understand exactly:
  a) what is the encoding used by the editor coming in the Windows release?
  b) why doesn't he need to declare the encoding (I need it on Linux for
     the very same files)?

Best regards, ak.
&lt;/pre&gt;</description>
    <dc:creator>Absalom K.</dc:creator>
    <dc:date>2013-05-22T12:10:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733118">
    <title>Diagnosing socket "Connection reset by peer"</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733118</link>
    <description>&lt;pre&gt;I have a sockets client that is connecting to a printer and occassionally getting the error "104 Connection reset by peer"

I have not been able to diagnose what is causing this. Is there any additional traceing I can do(either within my python code or on the network) to establish what is causing this error?

Currently I am simply trapping socket.erruor 

Python version is 2.6






&lt;/pre&gt;</description>
    <dc:creator>loial</dc:creator>
    <dc:date>2013-05-22T08:46:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733111">
    <title>Newbie question about evaluating raw_input() responses</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733111</link>
    <description>&lt;pre&gt;Hi,

I'm just starting out with Python and to practice I am trying to write a script that can have a simple conversation with the user.

When I run the below code, it always ends up printing response to "if age &amp;gt; 18:" -- even if I enter a value below 18.

Can anyone point me to what I am doing wrong?  Many thanks in advance.

age=raw_input('Enter your age: ')
if age &amp;gt; 18:
    print ('Wow, %s. You can buy cigarettes.' % age)
else:
    print ('You are a young grasshopper.')
&lt;/pre&gt;</description>
    <dc:creator>C. N. Desrosiers</dc:creator>
    <dc:date>2013-05-22T06:23:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733108">
    <title>Case insensitive dict</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733108</link>
    <description>&lt;pre&gt;I was doing some work with the ldap module and required a ci dict that was case
insensitive but case preserving. It turned out the cidict class they implemented was
broken with respect to pop, it is inherited and not re implemented to work. Before
I set about re-inventing the wheel, anyone know of a working implementation?

I noticed twisted has one but it seems to omit pop.

Thanks!
jlc
&lt;/pre&gt;</description>
    <dc:creator>Joseph L. Casale</dc:creator>
    <dc:date>2013-05-22T03:59:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733097">
    <title>Myth Busters: % "this old style of formatting will eventually beremoved from the language"</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733097</link>
    <description>&lt;pre&gt;I was looking for something else and just found what I think is the place where I was first exposed to the myth[1]:

"Since str.format() is quite new, a lot of Python code still uses the % operator. However, because this old style of formatting will eventually be removed from the language, str.format() should generally be used."

Is this tutorial outdated or this still an issue?

[1] http://docs.python.org/2/tutorial/inputoutput.html#old-string-formatting       
&lt;/pre&gt;</description>
    <dc:creator>Carlos Nepomuceno</dc:creator>
    <dc:date>2013-05-22T02:26:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733094">
    <title>A computer programmer, web developer and network admin resume</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733094</link>
    <description>&lt;pre&gt;A computer programmer, web developer and network administrator resume.

For a resume in HTML or .Doc format click on:
www.DatabasePrograms.Biz&amp;lt;http://www.databaseprograms.biz/&amp;gt;

If you would like this in text format instead, please let me know.


Daniel Rapaport

1-949-307-2485
info&amp;lt; at &amp;gt;DatabasePrograms.Biz&amp;lt;mailto:info&amp;lt; at &amp;gt;DatabasePrograms.Biz&amp;gt;







To unsubscribe click on: info&amp;lt; at &amp;gt;DatabasePrograms.Biz?Subject=unsubscribe&amp;lt;mailto:info&amp;lt; at &amp;gt;DatabasePrograms.Biz?Subject=unsubscribe&amp;gt;

&lt;/pre&gt;</description>
    <dc:creator>info&lt; at &gt;DatabasePrograms.Biz</dc:creator>
    <dc:date>2013-05-22T01:15:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733091">
    <title>Modules list-tool</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733091</link>
    <description>&lt;pre&gt;Are anyone aware of a tool that can show me at run-time
which modules (pyd/dll) are loaded into a Python program 
at a specific time (or over time)?

To clarify, e.g. when running a sample from PyQt4
(examples\tutorials\addressbook\part1.pyw) and using Process Explorer [1],
I can launch WinDbg from it and get this list of modules:
....

ModLoad: 1d000000 1d00a000   G:\ProgramFiler\Python27\python.EXE
ModLoad: 7c900000 7c9b1000   F:\WINDOWS\system32\ntdll.dll
ModLoad: 7c800000 7c8f7000   F:\WINDOWS\system32\kernel32.dll
ModLoad: 1e000000 1e261000   f:\windows\system32\python27.dll
ModLoad: 7e410000 7e4a1000   F:\WINDOWS\system32\USER32.dll
ModLoad: 77f10000 77f59000   F:\WINDOWS\system32\GDI32.dll
ModLoad: 77dc0000 77e6a000   F:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e70000 77f03000   F:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000   F:\WINDOWS\system32\Secur32.dll
ModLoad: 7c9c0000 7d1d8000   F:\WINDOWS\system32\SHELL32.dll
ModLoad: 77c00000 77c58000   F:\WINDOWS\system32\msvcrt.dll
ModLoad: 77f6&lt;/pre&gt;</description>
    <dc:creator>Gisle Vanem</dc:creator>
    <dc:date>2013-05-21T19:35:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733080">
    <title>More general way of generating PyODBC queries as a dict?</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733080</link>
    <description>&lt;pre&gt;Here are my averagely general class methods for creating a dictionary from the result of database queries:

def make_schema_dict(self):
    schema = [i[2] for i in self.cursor.tables()
              if i[2].startswith('tbl_') or i[2].startswith('vw_')]

    self.schema = {table: {'scheme': [row.column_name for row
                                      in self.cursor.columns(table)]}
                   for table in schema}

def last_table_query_as_dict(self, table):
    return {'data': [{col: row.__getattribute__(col) for col in self.schema[table]['scheme']
                      if col != 'RowNum'} for row in self.cursor.fetchall()]}
Unfortunately as you can see, there are many complications.

For example, when multiple tables are queried; some hackish lambdas are required to generate the resulting dictionary.

Can you think of some more general methods?

(and yes I know this is against the PEP; and that this is also on SO)
&lt;/pre&gt;</description>
    <dc:creator>stackoverflowuser95&lt; at &gt;gmail.com</dc:creator>
    <dc:date>2013-05-21T17:27:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733072">
    <title>How to raise a socket "104 connection reset by peer error"</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733072</link>
    <description>&lt;pre&gt;For testing purposes I want my code to raise a socket "connection reset by peer" error, so that I can test how I handle it, but I am not sure how to raise the error.

Any advice appreciated

  
&lt;/pre&gt;</description>
    <dc:creator>loial</dc:creator>
    <dc:date>2013-05-21T15:26:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733071">
    <title>&lt; at &gt;staticmethods called more than once</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733071</link>
    <description>&lt;pre&gt;Hi,

i'm somewhat confused working with &amp;lt; at &amp;gt;staticmethods. My logger and configuration  methods are called n times, but I have only one call.  
n is number of classes which import the loger and configuration class
in the subfolder mymodule. What might be my mistake mistake?

Many thanks
Christian



### __init__.py ###

from  mymodule.MyLogger import MyLogger
from  mymodule.MyConfig import MyConfig


 
##### my_test.py ##########
from mymodule import MyConfig,MyLogger

#Both methods are static
key,logfile,loglevel = MyConfig().get_config('Logging')
log = MyLogger.set_logger(key,logfile,loglevel)
log.critical(time.time())

#Output
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - 1369149637.19
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - 1369149637.19
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - 1369149637.19
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - 1369149637.19

&lt;/pre&gt;</description>
    <dc:creator>Christian</dc:creator>
    <dc:date>2013-05-21T15:26:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733067">
    <title>suggestions for "best practices lite" for small site deployment withtesting</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733067</link>
    <description>&lt;pre&gt;Hi everyone,

We've been having a bit of a discussion of this topic over on the Python-UK
list (http://mail.python.org/pipermail/python-uk/2013-May/thread.html#2949),
and I was a bit shy about mailing out to the big, bad, worldwide Python
list, but I'm forcing myself!

So I'm writing a book, for O'Reilly, on TDD with Python, and I'm looking
for some help and suggestions on my current chapter (well, I'm looking for
help and suggestions in general too!  i need all the help i can get.).

http://www.obeythetestinggoat.com/what-to-say-about-deployment.html

So far I've taken the user through building a basic site, and now I want to
get them to deploy it.  It's very early days, but minimum-viable-product
and all that, deploying early + often is a good habit to get into.

cf the blog post above for a bit of background.  I'm currently leaning away
from talking about the various PaaS offerings, they being too many +
varied, and I have a bit of a conflict of interest since I work at
PythonAnywere.  Instead, I'm curren&lt;/pre&gt;</description>
    <dc:creator>Harry Percival</dc:creator>
    <dc:date>2013-05-21T13:41:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733066">
    <title>Static Maps from Lat Long data in XLS file</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733066</link>
    <description>&lt;pre&gt;Hello,

I'm new to Python, but I think it can solve my problem and I am looking for a someone to point me to tutorial or give me some tips here.

I have an xls file that has about 1,000 latitude and longitude points. I want to do one of two things: 1) Save a static maps and street view image from the coordinates, or 2) create an html file with the map and street view image side by side.

I need the urls to look like this: 

Map with a pin in the centre:
http://maps.googleapis.com/maps/api/staticmap?center=43.65162,-79.40571&amp;amp;zoom=16&amp;amp;size=600x600&amp;amp;markers=color:blue%7Clabel:S%7C43.65162,-79.40571&amp;amp;sensor=false

Image:
http://maps.googleapis.com/maps/api/streetview?location=43.65162,%20-79.40571&amp;amp;size=600x600&amp;amp;sensor=false

I am not sure if option 1 will work because the url doesn't actually lead to an image, but rather Google returns an image when that url is used. 

Any tips or pointers are much appreciated!
&lt;/pre&gt;</description>
    <dc:creator>kobewka&lt; at &gt;gmail.com</dc:creator>
    <dc:date>2013-05-21T13:12:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733061">
    <title>64-bit Python for Solaris</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733061</link>
    <description>&lt;pre&gt;Hello python-list,

I'm looking into creating a 32/64-bit Python (2.x and/or 3.x) package
for Solaris. The specificity of that package is that I need to include
both 32-bit and 64-bit binaries in it. The exact way in which the
32/64 support is done is described at [1].

There currently is a Python package that I maintain, which is 32-bit only[2].

I have made an attempt to build a 64-bit package, and my findings are
that the ${prefix}/lib/pythonX.Y/_sysconfigdata.py file contains
system-specific information. Note that it's not ${libdir}/pythonX.Y -
that would have worked, because I'm specifying different ${libdir}
directories when running the 32-bit and 64-bit builds. The Python
installer specifically uses ${prefix}/lib/pythonX.Y. For the most part
is fine, because most of files in there are not architecture-specific,
and it would be quite good to share them among the 32-bit and 64-bit
binaries at runtime. The problem is that some files differ. I've
described it some more at [3].

Ideally, I'd make _sysconfi&lt;/pre&gt;</description>
    <dc:creator>Maciej (Matchek) Bliziński</dc:creator>
    <dc:date>2013-05-21T09:51:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733055">
    <title>please help</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733055</link>
    <description>&lt;pre&gt;WAP in python to accept a list of words on STDIN and searches for a line containing all five vowels(a,e,i,o,u)
&lt;/pre&gt;</description>
    <dc:creator>iman.memarpour&lt; at &gt;gmail.com</dc:creator>
    <dc:date>2013-05-21T08:38:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733054">
    <title>sympy.nsimplify</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733054</link>
    <description>&lt;pre&gt;For maths nerds like me, this is too cool for words:

http://www.johndcook.com/blog/2013/04/30/recognizing-numbers/



&lt;/pre&gt;</description>
    <dc:creator>Steven D'Aprano</dc:creator>
    <dc:date>2013-05-21T08:26:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733043">
    <title>PEP 378: Format Specifier for Thousands Separator</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733043</link>
    <description>&lt;pre&gt;Is there a way to format integers with thousands separator (digit grouping) like the format specifier of str.format()?

I'm currently using the following:

Number = 12,345

'x' is unsigned integer so it's like using a sledgehammer to crack a nut!

I'd like to have something like:

sys.stdout.write('Number = %,u\n' % x)


Is that possible? How can I do it if not already available?       
&lt;/pre&gt;</description>
    <dc:creator>Carlos Nepomuceno</dc:creator>
    <dc:date>2013-05-21T05:17:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/733029">
    <title>pip and different branches?</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/733029</link>
    <description>&lt;pre&gt;We use github and we work on many different branches at the same time.

The problem is that we have &amp;gt;5 repos now, and for each repo we might
have the same branches on all of them.

Now we use pip and install requirements such as:
git+ssh://git&amp;lt; at &amp;gt;github.com/repo.git&amp;lt; at &amp;gt;dev

Now the problem is that the requirements file are also under revision
control, and constantly we end up in the situation that when we merge
branches the branch settings get messed up, because we forget to change
them.

I was looking for a solution for this that would allow me to:
- use the branch of the "main" repo for all the dependencies
- fallback on master if that branch doesn't exist

I thought about a few options:
1. create a wrapper for PIP that manipulates the requirement file, that now
   would become templates.
   In this way I would have to know however if a branch exist or not,
   and I didn't find a way to do that without cloning the repo.

2. modify PIP to not fail when checking out a non existing branch, so
   that if it's not fo&lt;/pre&gt;</description>
    <dc:creator>andrea crotti</dc:creator>
    <dc:date>2013-05-20T18:00:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/732992">
    <title>CFP: MuCoCoS Workshop at PACT-2013 (Edinburgh, Scotland, UK)</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/732992</link>
    <description>&lt;pre&gt;                      CALL FOR PAPERS:

6th International Workshop on Multi/many-Core Computing Systems
                       (MuCoCoS-2013)

          September 7, 2013, Edinburgh, Scotland, UK

       in conjunction with the 22nd Int. Conference on
  Parallel Architectures and Compilation Techniques (PACT-2013)

        http://www.ida.liu.se/conferences/mucocos2013


AIMS AND SCOPE

The pervasiveness of homogeneous and heterogeneous multi-core and
many-core processors, in a large spectrum of systems from embedded and
general-purpose to high-end computing systems, poses major challenges
to software industry. In general, there is no guarantee that software
developed for a particular architecture will be executable (that is functional)
on another architecture. Furthermore, ensuring that the software preserves
some aspects of performance behavior (such as temporal or energy efficiency)
across different such architectures is an open research issue.

Therefore, this workshop focuses on language level, system so&lt;/pre&gt;</description>
    <dc:creator>SP</dc:creator>
    <dc:date>2013-05-20T07:08:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.general/732991">
    <title>Question about ast.literal_eval</title>
    <link>http://comments.gmane.org/gmane.comp.python.general/732991</link>
    <description>&lt;pre&gt;Hi all

I am trying to emulate a SQL check constraint in Python. Quoting from 
the PostgreSQL docs, "A check constraint is the most generic constraint 
type. It allows you to specify that the value in a certain column must 
satisfy a Boolean (truth-value) expression."

The problem is that I want to store the constraint as a string, and I 
was hoping to use ast.literal_eval to evaluate it, but it does not work.

 &amp;gt;&amp;gt;&amp;gt; x = 'abc'
 &amp;gt;&amp;gt;&amp;gt; x in ('abc', xyz')
True
 &amp;gt;&amp;gt;&amp;gt; b = "x in ('abc', 'xyz')"
 &amp;gt;&amp;gt;&amp;gt; eval(b)
True
 &amp;gt;&amp;gt;&amp;gt; from ast import literal_eval
 &amp;gt;&amp;gt;&amp;gt; literal_eval(b)
ValueError: malformed node or string: &amp;lt;_ast.Compare object at ...&amp;gt;

Is there a safe way to do what I want? I am using python 3.3.

Thanks

Frank Millman

&lt;/pre&gt;</description>
    <dc:creator>Frank Millman</dc:creator>
    <dc:date>2013-05-20T07:05:48</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.general</link>
  </textinput>
</rdf:RDF>
