at
you have to either A) make sure the environment is initialized, or B)
initialize the environment 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.
-Sc
quot;for" loop causes the
>> dictionary keys to be read in a certain order. How could I take away the
>> first "for" loop and replace it with something else to do the same general
>> function?
>>
>
> for key in keys:
> print 'Attribute %s has
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, th
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 as
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
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 suc
s my first post to this list, I hope I
included enough information.
-Scott Oertel
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
or the snipplet, 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
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
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 = []
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 :)
//mail.python.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
___
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
>>
&g
x27;m running Apache/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, bu
stribution.
http://starship.python.net/crew/theller/py2exe/
-Scott Oertel
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
I have a small problem with one of my scripts currently, I'm using the
config parser to open a config.ini file, but this program is going to be
designed to be used as a cron job, currently i made a work around..
./program.py config.ini is how you run it from the command line
I'm looking for an
Christopher Arndt wrote:
Scott Oertel schrieb:
I'm looking for an easy way to find the current directory location of my
program so I can include the config.ini file correctly without having to
pass command line args.
So, do you want to find out, where your scri
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 "/usr/
d I can go back to using wxPython instead. Boa constructor
always crashes on me in linux, on windows it's nice, but I make one
small change in the code and boaconstructor will freak out and not be
able to read anything.
that's just my experience.
-- scott oertel
gawr.com :)
___
21 matches
Mail list logo