|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21573/root/usr/lib/python2.4/site-packages/yum/ |
Upload File : |
mò
üüPc @ s£ d Z y
d k Z Wn e j
o d k Z n Xd e f d „ ƒ YZ d d d d „ Z d „ Z d d „ Z d d
„ Z
e i d d j o
e
Z n e Z d S(
s«
utility functions to handle differences in pysqlite versions
These are from Wichert Akkerman <wichert@deephackmode.org>'s python-dhm
http://www.wiggy.net/code/python-dhm
Nt
TokenizeErrorc B s t Z d Z RS( s Tokenizer error class( t __name__t
__module__t __doc__( ( ( t0 /usr/lib/python2.4/site-packages/yum/sqlutils.pyR s s
s "s \c C s² | g d d f \ } } } } y?x8| o0| d | j o
d } n| d j o | d | j o | d } nÜ | d | j oY | d j o | | d 7} qM| i | ƒ d } x• | d | j o | d } q¸ Wnr | d | j o7 | d j o | d } n | | d 7} | d } n* | d j o | d } n | | d 7} | d } q$ WWn t
j
o t d ‚ n X| o
t d ‚ n | d j o | i | ƒ n | S( s– String tokenizer
This function tokenizes a string while taking quotation and
escaping into account.
>>> import dhm.strtools
>>> dhm.strtools.Tokenize("this is a test")
['this', 'is', 'a', 'test']
>>> dhm.strtools.Tokenize("this "is a" test")
['this', 'is a', 'test']
>>> dhm.strtools.Tokenize("this \"is\" a test")
['this', '"is"', 'a', 'test']
>>> dhm.strtools.Tokenize("this "is a test")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.2/site-packages/dhm/strtools.py", line 80, in Tokenize
raise TokenizeError, "Unexpected end of string in quoted text"
dhm.strtools.TokenizeError: Unexecpted end of string in quoted text
@param str: string to tokenize
@type str: string
@param whitespace: whitespace characters seperating tokens
@type whitespace: string
@param quotes: legal quoting characters
@type quotes: string
@param escapes: characters which can escape quoting characters
@type escapes: string
@return: list of tokens
@rtype: sequence of strings
i i s Unexpected end of strings' Unexpected end of string in quoted textN( t strt Nonet buffert tokenst curtokent quotet quotest
whitespacet appendt escapest
IndexErrorR ( R R R R R R
R R ( ( R t Tokenize sB
c C s» t | d d ƒ} g } d } xR | D]J } | i d ƒ o' | i | d d | ƒ | d 7} q% | i | ƒ q% Wh } d } x&