[Tutor] inserting path to open a file from a variable

Felix Dietrich felix.dietrich at sperrhaken.name
Fri May 29 04:57:04 CEST 2015


Mark Lawrence <breamoreboy at yahoo.co.uk> writes:

> On 29/05/2015 01:16, Felix Dietrich wrote:
>
>> True, but the /optparse/ module does not appear to be part of Python
>> 2.6. ("new in version 3.2")
>
> If you mean argparse you're correct, but it's in 2.7.  My point is
> that there's not much use writing code now with a deprecated module,
> especially if you want to move onward and upward to python 3.4 or even
> 3.5 in the future and get all the new batteries :)

Yes, i meant /argparse/ and I should have checked the documentation more
thoroughly; I only noticed that it was not part of 2.6 and saw the note
at the top of the /Python 3/ documentation.

I agree in general that it is better to avoid using deprecated modules.
Still, if one is stuck with 2.6 – one does not always get the choice of
new fancier batteries. ;)

--
Felix Dietrich


More information about the Tutor mailing list