[Tutor] Installing the uncertainties module

Lie Ryan lie.1296 at gmail.com
Sun Oct 30 06:06:16 CET 2011


On 10/30/2011 03:55 PM, Richard D. Moores wrote:
> On Sat, Oct 29, 2011 at 21:37, Richard D. Moores<rdmoores at gmail.com>  wrote:
>>
>>
>> On Sat, Oct 29, 2011 at 18:31, Richard D. Moores<rdmoores at gmail.com>  wrote:
>>>
>>> The uncertainties module (<http://packages.python.org/uncertainties/>)
>>> is now available for 64-bit Python 3.2. I've downloaded
>>> uncertainties-1.8.tar.gz. I need some utility that will handle both
>>> .gz and .tar, I presume. Looking for recommendations.
>>>
>>> Dick Moores
>>> Python 3.2.2
>>> 64-bit Win 7
>>
>> Thanks for the suggestions. Right after I posted, I remembered<http://www.snapfiles.com/freeware/freeware.html>, and went with  Peazip, which did the job.
>> I am curious about how I could have done this just with  the tarfile module. I'll look into that.
>
> Hm. Problem:
>
>>>> import tarfile
>>>> tar = tarfile.open("C:\Users\Richard\Desktop\uncertainties-1.8.tar.gz")
>    File "<stdin>", line 1
> SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes
> in position 2-4: truncated \UXXXXXXXX escape
>

use forward slash for file names even in Windows, or you had to escape 
the backslashes 'C:\\Users\\Richard\\Desktop\\uncertainties-1.8.tar.gz' 
or use raw string r"C:\Users\Richard\Desktop\uncertainties-1.8.tar.gz"



More information about the Tutor mailing list