Luke Paireepinart wrote:
Scott Oertel wrote:
Someone asked me this question the other day, and I couldn't think of
any easy way of printing the output besides what I came up with pasted
below.
So what you have is a file with words in it as such:
apple
john
bean
joke
ample
python
nice
Terry Carroll wrote:
On Wed, 29 Aug 2007, Scott Oertel wrote:
Why even have the keys variable at all..
for key in attrs:
print 'Attribute %s has value %s' % (key, attrs[key])
In a prior email thread, the OP indicated that he needed to process the
keys in that particular
Someone asked me this question the other day, and I couldn't think of
any easy way of printing the output besides what I came up with pasted
below.
So what you have is a file with words in it as such:
apple
john
bean
joke
ample
python
nice
and you want to sort and output the text into columns
Alan Gauld wrote:
Scott Oertel [EMAIL PROTECTED] wrote
and you want to sort and output the text into columns as such:
a p j b n
apple python john bean nice
ample joke
and this is what works
'Attribute %s has value %s' % (key, attrs[key])
Why even have the keys variable at all..
for key in attrs:
print 'Attribute %s has value %s' % (key, attrs[key])
-Scott Oertel
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
manually before executing the script. If
you, for example, want to use a python script at boot time, before the
environment is initialized, i strongly recommend using an absolute path.
-Scott Oertel
___
Tutor maillist - Tutor@python.org
http
lmac wrote:
---
The problem with downloading the images is this:
-
http://images.nfl.com/images/globalnav-shadow-gray.gif
Traceback (most recent call last):
File /home/internet/bin/nflgrab.py, line 167, in ?
urllib.urlretrieve(img,img[f:])
File
.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Try using py2exe it works pretty well for compiling .py into a portable
.exe distribution.
http://starship.python.net/crew/theller/py2exe/
-Scott Oertel
che/1.3.33 (Unix) mod_python/2.7.11 Python/2.2.3
-Scott Oertel
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Scott Oertel wrote:
I'm having an issue with mod_python.publisher,
supposedly i should be able to just place this code
def index():
return "This is only a test."
into test.py and when placed into my browser it should run the index
function by default, but ins
Bob Gailer wrote:
At 02:55 PM 8/24/2005, Scott Oertel wrote:
How do I use the built in file objects to insert text into a file at a
certain location?
i.e.
something, 2, chance, weee
nothing, happened, crap, nice
need to search for something and insert, what, before it
Here's
Kent Johnson wrote:
Scott Oertel wrote:
The next problem I have though is creating the dict,
i have a loop, but i can't figure out how to compile the dict, it is
returning this: ('Joey Gale', ('Scott Joe', 'This is lame' )))
listofnames = []
while (cnt number[1][0
How do I use the built in file objects to insert text into a file at a
certain location?
i.e.
something, 2, chance, weee
nothing, happened, crap, nice
need to search for something and insert, what, before it
thanks for the feedback you guys are great :)
-Scott Oertel
-Py2.4
hon.org/mailman/listinfo/tutor
Thanks again,
I figured it out with the index function of the file objects, I didn't
know that you could search for a word and find the exact pos of it,
that was the tiny bit of information I was looking for.
-Scott Oertel
__
.
-Scott Oertel
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
, it's perfect for what I'm doing, I wasn't
aware of the has_key() or get(), this is very usefull.
-Scott Oertel
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Scott Oertel wrote:
Byron wrote:
Luis N wrote:
Ideally, you would put your names into a list or dictionary to make
working with them easier. If all you're trying to do is count them
(and your list of names is long), you might consider a dictionary
which you would
17 matches
Mail list logo