shoot yourself in the foot and check what
the exceptions are, i.e.:
except:
import traceback
print traceback.format_exc()
Second, better use mechanize:
http://wwwsearch.sourceforge.net/mechanize/
HTH,
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.
ary/struct.html
http://www.doughellmann.com/PyMOTW/struct/index.html
http://code.activestate.com/recipes/498149/
HTH,
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
slash is left in the string. (This
behavior is useful when debugging: if an escape sequence is mistyped,
the resulting output is more easily recognized as broken.)
So, as long as the escape sequence is recognized it is changed
accordingly.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
7;RED')
c.set_color('YELLOW')
print c.has_color('RED')
print c.has_color('BLUE')
print c.status_as_string(5)
HTH,
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
[1] a valid URL? And are you sure that you want to send
something to the web serwer? By specifying the second argument
(args[3]) you're asking python to send HTTP "POST" request,
not "GET".
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
ting rid of this comment? I doubt that
the comment is a reason of this error, but it seems that
it shadows the real problem. Moreover, try to import urlparse
itself and check if you got the pyc file for urlparse.py
in your */lib/python2.5/ directory.
--
Regards,
Wojtek Walczak,
http://tosh.pl/g
> It works fine from the command line. Why is this happening?
I can't answer your question, since I don't use emacs,
but it looks like emacs has some kind of built in firewall.
;-)
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
WHERE titem.object_id IN (%s)
> """,( eid_list))
^
It should rather be '%'.
HTH.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
#x27; % (i)] = i
print A.xxx1
print A.xxx2
a = A()
print a.xxx1
print a.xxx2
-
And the output is:
-
1
2
1
2
-
But I definitely don't consider this one as a good programming
practice.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
t here. I can't remember any beginner
asking such a question on p.c.py. I think they would come and ask
if it really was problematic.
And, anyway, I don't know how to answer your question :-)
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
lt;= 4GB of RAM. If you got more, increase it.
And to make it clear: I do not recommend this way of sorting
things out :)
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
;080824-7
> 070405-6
You need to read about slice indices. An example:
>>> a=('080829-7_A', '070529-5_c', '080824-7_O')
>>> [i[:-2] for i in a]
['080829-7
d(11))
to check what does struct.unpack return.
I guess it returns more than three elements. Just like below:
>>> a,b,c=(1,2,3,4)
Traceback (most recent call last):
File "", line 1, in ?
ValueError: too many values to unpack
As you can see the fourth element from the tuple
same for vast majority of us ;-)
The question is why is it '90364ed45b452d43378629c20543a81d'
for the OP? :-)
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
the file to md5.new, but the contents
of this file.
The strange thing is that
>>> md5.new("/Volumes/data/Arno/test.txt").hexdigest()
returns '8dd66a1592e2a8c3ab160822fb237f4d' on my machine.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
n";
What about:
>>> myhash={'one':1, 'two':2, 'three':3}
>>> map(myhash.get, ['one', 'two', 'two'])
[1, 2, 2]
>>>
or, to make it more similar to perl's qw() thing:
>>> map(myhash.get,
On Sat, 6 Sep 2008 15:13:45 -0700 (PDT), cnb wrote:
> if i do
> try:
> something
> except TypeError, IndexError:
> pass
Parenthesize them:
except (TypeError, IndexError):
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
for giga). I'm trying
> to convert those strings to integers, with this function:
> if mult is 1:
^^
You're testing for identity, not for equality.
Change it to "if mult == 1". Is it alright now?
--
Regards,
Wojtek Walczak,
h
returns an empty list, and sum([]) doesn't return an error. What did you
expect?
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
raise ValueError("attribute already set")
self._attr1flag = True
self._attr1 = x
def getatt(self):
return self._attr1
attr1 = property(getatt, setatt)
a = SetOnce()
a.attr1 = 1
print a.attr1
try:
a.attr1 = 2
except ValueError:
print a.attr1
---
$ pyt
akes?
Check pychecker or figleaf:
http://pychecker.sourceforge.net
http://darcs.idyll.org/~t/projects/figleaf/doc/
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
rcn.com/python/download/Descriptor.htm
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
or 0 i.e whether the 2 files differ or not?
In python it's called difflib. Try to import it.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 3 Sep 2008 14:31:17 + (UTC), Wojtek Walczak wrote:
> class Square(object):
>def __init__(self, val):
> self._square = pow(val, 2)
> self._value = math.sqrt(self.square)
^^
or just:
self._value = val
:-)
property(getvalue, setvalue)
a = Square(5)
print a.square
print a.value
a.value = 10
print a.square
print a.value
a.square = 64
print a.square
print a.value
---
and the result:
$ python sqval.py
25
5.0
100.0
10
64
8.0
$
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
ave a short chunk of code that I can observer, that uses the
> mechanize.Browser implentation?
Take a look at the bottom of this post:
http://mail.python.org/pipermail/python-list/2006-June/390037.html
It seems that submit does the job.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
On Tue, 2 Sep 2008 15:32:07 +0100, [EMAIL PROTECTED] wrote:
> But if I do :-
>#question.py
> from myglobals import *
> myglobals.answer = "WTF ?"
>
> will this work?
Why won't you try? In this case you should receive NameError.
--
Regards,
Wojtek Walczak
above assigns the output variable with a return code, i.e. 0 in
> this case. How can I actually capture the data returned from
> subprocess.call, rather than just the return code?
Use subprocess.Popen instead of call.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
es that "look right" to
people.
HTH.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
-questions.html
HINT: the attribute you're accessing is not a callable.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
; a="some string\r\n"
>>> a.rstrip()
'some string'
>>>
but be careful, because it will also cut whitespaces:
>>> a="some string\t \r\n"
>>> a.rstrip()
'some string'
>>>
so maybe you could do
i change the key to something like 'sabir' and
kev['sabir'] = kev['kabir']
del kev['kabir']
> how can i
> change the values of kabir?
kev['sabir'][0] = '[EMAIL PROTECTED]'
*untested*
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
Give it a try. Try to design some functions that let you
view and add new lists/dictionaries to your variables.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
in pp.pids:
...if pp.procs[pid]['cmd'] == 'apache2':
... print pp.procs[pid]['tid']
...
5204
5205
5206
5208
>>>
it prints the PIDs of all the apache2 processes on my system.
Procpy is fine for my own needs, but if I were about to write
a code that is in
some extent you can use regular expressions:
>>> re.findall(re.compile("\".*?\""), s)
['" c1\' d1 \' c2"']
>>> re.findall(re.compile("\'.*?\'"), s)
['\' b1 " c1\'', '\' c2" b2 \'']
>>>
but it won't work in all cases. You can read more here:
http://www.gnosis.cx/TPiP/
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
conflicts in who knows what ways.
Then you can download tar.gz package, compile it, and try it
without installing :-)
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
the normal import call:
import sys
is equal to:
sys = __import__('sys')
If you need, let's say, to search for a module that lies
outside sys.module paths, then use imp's functions.
HTH.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
object class.
Check out point 9.5 in the tutorial.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 25 Aug 2008 06:31:53 -0700 (PDT), Alexandru Mosoi wrote:
> i want to execute a python script using exec open('script.py'). how do
> I pass arguments?
Take a look at subprocess module. It comes with a set of examples.
--
Regards,
Wojtek Walczak,
http://tosh.pl/
developer, but I think that the only way is to
set a timeout on server side. You can't be sure that the client
disconnected, but you can stop CGI script if there's no
action on client side for too long.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
hat\path" then I need to get "c:\that".
>
> Does anyone have ideas?
Read about os.path module. It's all in there:
http://docs.python.org/lib/module-os.path.html
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
port string
def letters():
a, B = (string.letters,) * 2
for i in zip(a, B):
yield i[0]
yield i[1]
l = letters()
print l.next()
print l.next()
print l.next()
--
and the output:
$ python genlet.py
a
a
b
$
Is that what you tried to achieve?
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
generate something if it's accessible anyway:
import string
print string.letters
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
-c?
--
http://mail.python.org/mailman/listinfo/python-list
7;re iterating through the same value in inner and outer loop.
Don't do that. It's hard to predict the behavior of such a code.
Regarding break statement, it breaks only the inner loop
and returns to the outer loop/block.
It would be great if you could reduce your code to a short pie
.write(retval)
should do the job.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
many people, that
we should just forget it.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
omes on c.l.py and asks about it.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
ut couldn't find it.
YOURFUNCTION.func_globals['YOURFUNCTION'].func_defaults
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
//www.python.org/doc/faq/general/
Question 4.22.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
o I overcome this, and make the script skip the empty files?
> (should I use another command?)
> 2) how do I interrupt the code without closing Python? (I have ActivePython)
Try the docs first. You need to read about 'continue' and
'break' statements: http://docs.python.org/
pens if you change:
fpid.write(child.pid)
into:
fpid.write('%d\n' % (child.pid))
I think that the problem here is that fpid.write() fails silently
(probably TypeError), because it takes string as its first argument,
not integer.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
eforge.net/mechanize/
FYI and AFAIK, google doesn't allow to use their search engine
in this way. They even block certain IP addresses it it's constantly
abusing the search engine with too many requests.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
led chilkat and it looks like
this library provides some 3des functionality.
HTH.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
s EOFError attribute?
Try this:
...
except (tarfile.TarError, EOFError):
...
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 18 Aug 2008 15:34:12 -0700 (PDT), Alexnb wrote:
> Also, on a side-note, does anyone know a very simple dictionary site, that
> isn't dictionary.com or yourdictionary.com.
This one is my favourite: http://www.lingro.com/
--
Regards,
Wojtek Walczak,
http://tosh.pl/gmini
On Mon, 18 Aug 2008 21:43:43 + (UTC), Wojtek Walczak wrote:
> On Mon, 18 Aug 2008 13:40:13 -0700 (PDT), Alexnb wrote:
>> Now, I am talking 1000's of these. I need to do something like this. I will
>> have a number, and what I want to do is go through this text file, just
tring4)'
To save some memory use finditer (as long as you don't have to search
for too many of these):
>>> for i in enumerate(pat.finditer(a)):
...if i[0] == 2:
... print i[1].group()
...
(string3)
>>>
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
ne-Python-Books-freebooksandarticles
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
hitespace, so it's not the same as
str.split(' '). Moreover, specifying maxsplit argument whenever possible
seems to be a good practice. Anyway, go ahead with that xsplit thing :-)
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
that
> gets the same result?
What's "that"?
Do you mean _this_:
>>> somestr = "string1 string2 string3"
>>> for i in somestr.split():
...print i
...
string1
string2
string3
>>>
?
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
maybe ctypes module will be helpful
for you.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
t;"The Effects of Moore's Law and Slacking on Large Computations"
>http://arxiv.org/abs/astro-ph/9912202
Kinda buddhist approach. Anyway, it might work out, unless the number
of for loops is increasing in time and in 18 months it may be - let's
say - 20 nested
> assuming each iteration takes a picosecond, it'll take approx 40
> billion years to run the program.
I guess that's exactly why the OP asks the question. He just wants
to start as soon as possible ;-)
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
the one passed to __init__? Try it in __init__ to make sure:
assert filename == 'your_hardcoded_value'
And why won't you try to store the filename as an attribute?
(even though I doubt it could help).
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
ort sys
def printf(mystr):
print mystr
sys.stdout.flush()
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
r small things and it will like you:
>>> getattr(getattr(B, 'a')[0], 'test')
'test'
>>>
it works because:
>>> getattr(B, 'a') == B.a
True
>>> getattr(B, 'a')[0] == B.a[0]
True
>>>
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
this helps.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
ses around the print instruction,
it's not a function. You could also write:
print "%d %d %d" % (x, y, z)
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
pated them correctly/incorrectly."?
Don't count on it. I never really cared about being right or wrong
and I am not one of those guys who are trying to prove something
that actually makes no difference at all. Nice tests, though :)
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
n from
>> > Python/ceval.c
>
> Am I correct in thinking that PyPy would mean low level
> stuff like this will be Python instead of C?
> That would be nice.
I don't know PyPy, but I guess you're right here.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
>
> Chances are that you're wrong.
At the moment my average is about 0.75 of mistake per
post on comp.lang.python (please, bare with me ;-)).
I strongly believe that the statement I made above won't
make this number rise.
:)
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
Dnia Wed, 13 Aug 2008 22:15:48 + (UTC), Wojtek Walczak napisa�(a):
> Then go for it :-) You can prepare a patch and ask on python-dev
> if the developers are interested.
>
> I was never hacking the import things on C level before,
> but a hint: you have to modify import_fro
ck (lambda m: ""), repeated replace, and repeated use of the form
>
> if ch in my_string:
> my_string = my_string.replace(ch, "")
>
> on representative data.
I don't have to, I can anticipate the results. I mentioned above
that using re is the best approach, but if one really wants to use
replace() multiple times (which will be slow, of course), it can
be done a bit cleaner than with str.replace().replace().replace()...
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
thon/ceval.c
My quick attempt:
http://www.stud.umk.pl/~wojtekwa/patches/from-import-py2.5.1.patch
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
ing for os.popen() goes to the bin.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
27;
>>>
Next step would be to define your own replacing function:
def my_replace(mystr, mychars, myrepl):
"""Replace every character from 'mychars' string with 'myrepl' string
in 'mystr' string.
Example:
my_replace('Qwe.Asd/Zxc(', './(', 'XY') -> 'QweXYAsdXYZxcXY'"""
for i in mychars:
mystr = mystr.replace(i, myrepl)
return mystr
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
opriately. Got to investigate it further.
os.popen won't return any deprecation warning in Py2.6beta2 probably
because it is defined in Lib/platform.py and not in Lib/os.py and
I guess that somebody has forgotten to add the warnings in there.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
and it doesn't
> raise any warnings or mention anything in the doc string.
I think that the deprecation warnings were added in Python 2.6.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
the Programming FAQ:
http://www.python.org/doc/faq/programming/
And keep in mind that reload() is removed in Py3k. Hope this helps.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
t; File "tcpsrv.py", line 15, in
> server.bind((host,port))
> File "", line 1, in bind
> socket.error: (19, 'No such device')
What's the value of host variable? AFAIR it should be the name
of the interface you want to bind to ('eth0',
,
not AF_INET. Note that you need root privileges to do so.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
>>> flags_set & flag2
2
>>> flags_set & flag3
0
>>> flags_set & flag4
8
>>> flags_set & flag5
0
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
vailable for subversion, out of the box, that I can import
> in my script?
There is no such module in standard library, but you can try
an external one. Check: http://pysvn.tigris.org/
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
lf.score > other.score:
return 1
return -1
======
Should work fine now.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
# or shadow 'string' module if it's imported.
def calculate_sum_1(string):
result = ''
for i in string:
if i.isdigit():
result += i
else:
result += ' '
return sum([int(i) for i in result.split()])
def calculate_sum_2(string):
Dnia Thu, 7 Aug 2008 14:36:37 -0700 (PDT), szczepiq napisa�(a):
> Pardon me for most likely a dummy question but how do I find out if an
> object is a class?
Use types.ClassType:
>>> class Q:
...pass
...
>>> import types
>>> isinstance(Q, types.ClassTy
ut I wouldn't worry about this.
Pythons 2.x will be around for quite some time (just as python
1.5.x is).
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
Dnia Thu, 7 Aug 2008 12:37:55 -0700 (PDT), Samir napisa�(a):
> Some good online tutorials that I found really helpful include:
You might find it useful:
http://linkmingle.com/list/List-of-Free-Online-Python-Books-freebooksandarticles
--
Regards,
Wojtek Walczak,
http://www.stud.umk
; form-based authentication (using cookies) *and* HTTP basic
> authentication?
Use ClientCookie or even better - mechanize:
http://pypi.python.org/pypi/mechanize/
The docs aren't perfect, but you should easily
find what you are searching for.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.p
rflowError: mktime argument out of range
>>>>
time module is written in C. time.mktime() function is actually
only a wrapper for mktime(3) and it also has its limits. Better
use datetime module instead.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
it's described in the documentation.
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
;>").replace("<","<")
HTMLParser.py:s = s.replace("&", "&") # Must be last
pydoc.py:return replace(text, '&', '&', '<', '<', '>',
'>')
xmlrpclib.py:s = replace(s, "&", "&")
So it could be BaseHTTPServer, cgi, cgitb, difflib, HTMLParser,
pydoc or xmlrpclib. Do you use any of these? Or maybe some other
external module?
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
s of python. Take a look at this
example: http://aima.cs.berkeley.edu/python/utils.html
--
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list
94 matches
Mail list logo