I'm seeing different behaviour between code that looks to be the same.
It obviously isn't the same, so I've misunderstood something:
log_names
('access', 'varnish')
log_dates
('20091105', '20091106')
logs = itertools.chain.from_iterable(glob.glob('%sded*/%s*%s.gz' %
(source_dir, log,
Stephen Nelson-Smith sanel...@gmail.com wrote
I'm seeing different behaviour between code that looks to be the same.
It obviously isn't the same, so I've misunderstood something:
In the first instance the two for-loops are inside the chain() call.
In the second you apply the chain inside
I have Python 3.0 and I'm trying to learn from a pdf document. I followed its
instructions but I've encountered a problem in its Pickling chapter. This
is the code I've written:
import pickle, shelve
print('Pickling list.')
variety=['sweet','hot','dill']
shape=['whole','spear','chip']
-- Forwarded message --
From: bibi midi bibsmen...@gmail.com
Date: Tue, Nov 17, 2009 at 11:12 PM
Subject: Re: [Tutor] proxy switcher - was Re: I love python / you guys :)
To: Dave Angel da...@ieee.org
Cc: Luke Paireepinart rabidpoob...@gmail.com, tutor tutor@python.org
Hi guys!
On Thu, Nov 19, 2009 at 1:14 AM, Stephen Nelson-Smith
sanel...@gmail.com wrote:
I have the following method:
def get_log_dates(the_date_we_want_data_for):
t = time.strptime(the_date_we_want_data_for, '%Y%m%d')
t2 = datetime.datetime(*t[:-2])
Use datetime.datetime.strptime() to save a step:
On Thu, Nov 19, 2009 at 3:24 AM, Stephen Nelson-Smith
sanel...@gmail.com wrote:
I'm seeing different behaviour between code that looks to be the same.
It obviously isn't the same, so I've misunderstood something:
log_names
('access', 'varnish')
log_dates
('20091105', '20091106')
logs =
Hi,
I have an elementtree question that probably reflects my inexperience with xml
processing (and/or with Python). The xml file is a stream of the Spss
Clementine program. Each stream consists of, among others, nodes. Each nodes
has properties, among which tooltiptext and label. I want to
Albert-Jan Roskam wrote:
Hi,
I have an elementtree question that probably reflects my inexperience
with xml processing (and/or with Python). The xml file is a stream of
the Spss Clementine program. Each stream consists of, among others,
nodes. Each nodes has properties, among which
Ali Sina wrote:
I have Python 3.0 and I'm trying to learn from a pdf document. I followed its
instructions but I've encountered a problem in its Pickling chapter. This is
the code I've written:
import pickle, shelve
print('Pickling list.')
variety=['sweet','hot','dill']
Kent Johnson wrote:
On Thu, Nov 19, 2009 at 1:14 AM, Stephen Nelson-Smith
sanel...@gmail.com wrote:
I have the following method:
def get_log_dates(the_date_we_want_data_for):
t =ime.strptime(the_date_we_want_data_for, '%Y%m%d')
t2 =atetime.datetime(*t[:-2])
Use
Hi Group,
I have been following the Tutor group for awhile but this is my first
post
Do you have recommendations for handling missing positional arguments? I'm
a huge fan of OptionParser module and use it in several programs to handle
options, but there must be an eligant way of handling
Hey Gang,
Can a function/method be added to a dictionary like so:
myDictionary = {string:processString(parameter),
string2:processString2(parameter),
string3:processString3(parameter)
}
I am basically interested in doing this with a Combobx Event.
2009/11/20 lau...@protopc.com:
Hey Gang,
Can a function/method be added to a dictionary like so:
myDictionary = {string:processString(parameter),
string2:processString2(parameter),
string3:processString3(parameter)
}
I am basically interested
John,
Thank you so much for your help! -- Problem SOLVED!!! -- Your explanation
and example was extremely helpful. I am very grateful.
Lauren :-)
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
Is there a Python command to send data to printer?
I have a Canon MX300 hooked up by USB. I can print from Firefox and
Thunderbird. I am using Ubuntu 9.04 and Python 2.6.2.
I could print to a file and then use gedit to print out the content of
the file but I was wondering if there was an
Say I have this package layout
- \myPackage
- __init__.py
- moduleA.py
- moduleB.py
Is there a way (and I'm sure there is...) to query, for a given package
level, which modules live under it?
I thought I could do it like so:
import myPackage
goodQualityInfo = dir(myPackage)
Hey all,
I have been searching online for ways to copy a zip file to a destination
and extract the zip file with python.
Currently nothing works due to my limited understanding.
I am wondering if my syntax is wrong or am I missing anything?
the code is as such. also if there is a better code, I am
17 matches
Mail list logo