File: psyco_wrapper.py

package info (click to toggle)
constraint 0.3.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 312 kB
  • ctags: 501
  • sloc: python: 2,736; xml: 165; makefile: 43; sh: 1
file content (36 lines) | stat: -rw-r--r-- 1,313 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# (c) 2002-2004 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA  02111-1307
# USA.

"""Provides an psyobj class regardless of the availability of psyco"""

__revision__ = '$Id: psyco_wrapper.py,v 1.10 2005/04/15 13:15:08 alf Exp $'

import os

try:
    from psyco.classes import psyobj as Psyobj
except ImportError:
    from warnings import warn
    warn("""Psyco could not be loaded.
Psyco is a Python just in time compiler available at http://psyco.sf.net
Installing it will enhance the performance of logilab.constraint""",
         stacklevel=2)
          
    class Psyobj:
        pass