ontinue..." to
standard output, *then* sends "\r\n", but extra carriage returns don't
hurt, so the first option is probably viable.
This is probably something that Expect could handle pretty easily, but
I'm just into learning Python for the time being.
--
Adam Monsen
htt
Brett Cannon fixed this bug last week. Thanks, Brett!
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
;in A.f()"
By "wrong" I mean, is there any reason why this is just a Bad Idea?
Seems helpful to me, if I change the name of the 'B' class, I don't
have to change super() calls as well.
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
10, 17, 26, 0, 2, 222, 1)
Works (unsuprisingly) as advertised at the bottom of this page:
http://docs.python.org/lib/module-time.html
And now I'm a little closer to understanding why. :)
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
url:
http://groups.google.com/group/comp.lang.python/browse_frm/thread/ce4909280561458b/
).
I did notice that the Python docs mention %Z is deprecated, so
http://snipurl.com/hoqz is possibly the best solution available for
now.
Thoughts?
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
o that bug.
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
attr_matches = attrs_re.finditer(d.get('attrs', None))
for match in attr_matches:
da = match.groupdict()
name = da.get('name', None)
a[name] = da.get('value', None)
ancs.append(a)
return ancs
if __name__ == '__mai
t f.read()
>From this code I get the following exception:
"IOError: [Errno socket error] timed out"
...and that fits my needs nicely.
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
Nice!!
Since that works, this also works (any socket operations appear to
raise an IOError):
import socket
socket.setdefaulttimeout(0)
Thanks!
-Adam
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
#x27; % vals
> What's wrong with the obvious version:
[...]
Oh, that looks nice and clean. I like it.
I also found a recipe in the Python cookbook that works great for
"dumping" objects:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/137951
(shortened: http://snipurl.com/
_)
return 'name="%(name)s" value="%(value)s' % vals
j = J()
j.name = "j object"
print j
>8
A couple of questions:
* is there a simpler or more elegant way to do this?
* how can I get this to work for new-style
I know very little about socket programming and even less about
sockey.py... any idea what behavior would have to be modified?
Further complicating matters (for me), it appears some of the socket
programming code is in C, and my C skills are lacking.
--
Adam Monsen
http://adammonsen.com
ctags indexes procedures/variables in source code, perhaps it would
help: http://ctags.sf.net/
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
st disabling networking within that virtual
machine would possibly work, too.
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
The 9-integer time tuple could be fetched using the code posted here:
http://snipurl.com/hcvs
same URL, not snipped:
http://groups.google.com/group/comp.lang.python/msg/65d8f116dfd59dd1
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
ch back to previous locale
locale.setlocale(locale.LC_TIME, old_loc)
-->8--
If I try to do further date parsing in the same scope (with a different
locale), it fails. Let me know if you have any ideas about why.
--
Adam Monsen
http
last):
File "", line 1, in ?
File "/usr/lib/python2.4/_strptime.py", line 292, in strptime
raise ValueError("time data did not match format: data=%s fmt=%s"
%
ValueError: time data did not match format: data=10 August 2005 at
17:26 fmt=%d %B %Y at %H:
Excellent! Thank you, Fredrik!
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
uot; for times in the Netherlands?
Thank you,
-Adam
References:
1. http://docs.python.org/lib/datetime-datetime.html
2. http://en.wikipedia.org/wiki/Netherlands
3. http://en.wikipedia.org/wiki/Central_European_Time
4. http://pytz.sf.net
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
quot;%d %B %Y om %H:%M")
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.4/_strptime.py", line 292, in strptime
raise ValueError("time data did not match format: data=%s fmt=%s"
%
ValueError: time data did not match format: data=
e month name using
a translation table for English to Dutch month names.
--
Adam Monsen
http://adammonsen.com/
(crossposted to Seattle Python Users List)
--
http://mail.python.org/mailman/listinfo/python-list
21 matches
Mail list logo