SyntaxError on progress module

Cecil Westerhof Cecil at decebal.nl
Wed May 27 11:18:48 EDT 2015


Op Wednesday 27 May 2015 16:51 CEST schreef Mark Lawrence:

> On 27/05/2015 15:11, Cecil Westerhof wrote:
>> Op Wednesday 27 May 2015 15:44 CEST schreef Mark Lawrence:
>>
>>> On 27/05/2015 09:42, Cecil Westerhof wrote:
>>>> Op Wednesday 27 May 2015 09:30 CEST schreef alb:
>>>>
>>>>> But here I have another question, as a python novice is there
>>>>> really any reason for me to use any particular version of
>>>>> Python?
>>>>>
>>>>> Should I start directly with the newest? What about 2.7?
>>>>
>>>> In principal you should use the ‘latest’ 3. The only problem is
>>>> that a lot of libraries are not converted to 3 yet. If you need
>>>> one of those, then you have ‘no choice’ and have to use 2.7. But
>>>> I would recommend to use ‘from __future__' to make the 2.7 code
>>>> as much as possible 3 compliant.
>>>>
>>>
>>> Please define "a lot" whilst bearing in mind green against red
>>> here https://python3wos.appspot.com/
>>
>> I just started using Python again and the first ‘real’ program I
>> wrote I had to write with Python 2 because the needed library
>> (libturpial, that is not listed on your link) works only with
>> Python 2. A short search about which of the two to use gives
>> similar answers to mine. And as far as I can see in my
>> neighbourhood Python 2 is almost exclusively used because used
>> libraries are only available in Python 2.
>>
>> This is not a scientifically substantiated argument, but for me
>> good enough to use a lot.
>>
>
> Have you actaully tried running libturpial with Python 3 or have you
> simply taken somebody or something's word for it? I've taken code in
> the past that was "only Python 2", run it thought the 2to3 fixer and
> job done. Perhaps you could do the same. Perhaps you've already
> tried. Again, you're the only person who actually knows.

Of-course I tried: that is why I used “had to”. The library itself and
libraries it depends on are only existing in a 2 version (at the
moment). I write code that should work in 2 and 3 both as long as 2 is
still a significant part. I call programs with python3 (even while it
is 10 to 20 percent slower) and only when that is not possible I use
Python 2. (Except to test if code also works with Python 2.)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list