_option("-q", ...
The arguments are everything left over. In this case, they are not
used, but they are required. The following runs without issue:
$ python parser.py junk
$ python parser.py -v junk
reading None...
The bottom line is the example is just an example, not something you
gt;>
>> Does this help?
>
> Another approach is to use dictionaries for string
> replacement.
>
>>>> subst = {'some': 'thing'}
>>>> print "%(some)s%(some)s%(some)s" % subst
> thingthingthing
>
As an alternate to r
t if [theme in VALID_THEMES] becomes an index to the tuple:
--> (VALID_THEMES[0], theme1)[1]
'moon'
--> (VALID_THEMES[0], theme1)[0]
'sun'
But we got [True] and [False]:
--> True == 1
True
--> False == 0
True
So in words, the code returns the
test.py
>
> This is clearly executable by brian, and clearly being executed by
> brian. The shebang line is correct (#!/usr/bin/python).
>
[...]
Good call. I jumped on the answer without making sure I clearly read
all the information provided.
--
Carlos Hanson
>
> Carlos Han
is not executable, you would execute it as
follows:
$ python shebangtest.py
As you found with `which python`, python is in /usr/bin, so executing
the script is actually
$ /usr/bin/python shebangtest.py
Therefore, the shebang line needs to be as follows:
#! /usr/bin/pyth
a second may be present if the system clock provides
them.
>>> t1 = time()
>>> t2 = t1 + 120*24*60*60
>>> now = time()
>>> now > t1 and now < t2
True
>>> ctime(t1)
'Fri Oct 20 09:09:26 2006'
>>> ctime(t2)
'Sat Feb 17 08:09:2
member.size, member.mtime, member.name)
...
420 chanson/chanson 0 1160505068 file.1
420 chanson/chanson 0 1160505071 file.2
420 chanson/chanson 0 1160505075 file.3
--
Carlos Hanson
Web and System Administrator
Tigard-Tualatin School District
503.431.4053
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
n file object:
for i in routers:
f = file(i, 'w')
f.close()
> Thanks for your time.
> ___________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
--
Carlos Hanson
Web Specialist
Tigard-Tualatin School District
503.4