look like anything in the standard Python
library will help me with that.
I suppose I could yank some code from Mailman's pipermail or something
for identifying discussion threads, but I was wondering if anyone had
any other suggestions before I reinvent the wheel.
Thanks,
Skye
--
http://mail.pyt
On Sep 19, 7:22 pm, Schif Schaf wrote:
> The other day I needed to convert a date like "August 2009" into a
> "seconds-since-epoch" value (this would be for the first day of that
> month, at the first second of that day).
You could use Time::Piece:
[ss...@localhost ~]$ perl -lMTime::Piece -e'$t=
Very cool - I'm liking the pythonic way of doing things more and
more.
The logger namespace/singleton idea makes great sense!
I see how the module variables make globals irrelevant, thanks!
Skye
--
http://mail.python.org/mailman/listinfo/python-list
s.python.org/lib/module-logging.html
Thanks! It looks like subclassing the logging module would be a much
better idea :)
Skye
--
http://mail.python.org/mailman/listinfo/python-list
OK, sounds good. So if not bitfields, what would be a good Python-y
way to do it?
Flip booleans in a "debug config" dictionary or something?
Skye
--
http://mail.python.org/mailman/listinfo/python-list
_GENERAL 0x0001
#define DEBUG_CONFIG 0x0002
#define DEBUG_OPTIONS 0x0004
etc etc
So I guess my questions are:
1. there doesn't seem to be a way to define global constants like in
other languages?
2. any special voodoo to use bitfields in Python?
Thanks!
Skye
--
http://mail.python.org/mailman/listinfo/python-list
Ohh, it's a function _() call. Now it makes sense.
Of course Python would be consistent... I was expecting trickery!
It's actually from the Mailman source, def _(s) is a string function
for i18n
Thanks,
Skye
--
http://mail.python.org/mailman/listinfo/python-list
What is this doing?
print >> fd, _(__doc__)
I'm guessing line-splitting __doc__ into a list, but what's that
leading underscore do?
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
and the
intended conversion to/from Python values. This can be used in
handling binary data stored in files or from network connections,
among other sources.
I freakin' love Python!!
Skye
--
http://mail.python.org/mailman/listinfo/python-list
uot; * size.value)
libc.sysctlbyname("net.inet.ip.stats", buf, byref(size), None, 0)
So now that I've got the data, can you point me towards docs
explaining how to layout struct ipstat?
Thanks,
Skye
--
http://mail.python.org/mailman/listinfo/python-list
How do I access the sysctl(3) call from Python on BSD?
Specifically I want to retrieve:
$ sysctl -d net.inet.ip.stats
net.inet.ip.stats: IP statistics (struct ipstat, netinet/ip_var.h)
So I'll need some way of getting to struct ipstat from Python as well
Thanks,
Skye
--
http://mail.pytho
> [EMAIL PROTECTED] wrote:
> > is there a simple way in perl, python, or awk/shell/pipe, that gets
> > the user agent field in a apache log?
> Something like:
> # cut -d '"' -f 6 < httpd-access.log
> ?
> --
> mph
Doesn't it feel like autosplit mode never gets any run time?
perl -laF'"' -ne'print
12 matches
Mail list logo