NumTut corrupted

R

r.e.s.

No matter which site I download it from,
NumTut.tgz appears to be corrupted.
Anyone else having this problem?

Thanks.
 
P

Peter Hansen

r.e.s. said:
No matter which site I download it from,
NumTut.tgz appears to be corrupted.
Anyone else having this problem?

Always describe the symptoms of a problem... what precise
behaviour (i.e. what extraction program, platform etc.) are
you encountering that leads you to believe it's corrupted?
 
R

r.e.s.

Always describe the symptoms of a problem... what precise
behaviour (i.e. what extraction program, platform etc.) are
you encountering that leads you to believe it's corrupted?

Quite right, sorry.

I resolved the problem, but will explain what happened
in case others encounter something similar ...

The file called NumTut.tgz at the SourceForge.net
download server is, when downloaded, automatically
receiving the wrong file extension by winXP .
(WinZip then produces a file that looks like a .py
file corrupted by lots of 'unprintable' characters.)

That is, clicking NumTut.tgz for download results in
"You are requesting file: /numpy/NumTut.tgz
Please select a mirror"

but the winXP File Download window that comes up says
File name: NumTut.gz (sic)
File type: WinZip File

If renamed back to .tgz, WinZip decompresses it
properly, and I see that it's actually a number of
files which are python-importable when placed in
the folder ...\Numerical\NumTut.

(Also for other files from that site, I've sometimes
had to re-download when the file is found not to be
in recognizable format. This problem seems to occur
only for files downloaded from SourceForge, btw.)

=====
A related python question, if I may ...

With the various .py files in \Numerical\NumTut,
*none* of which are named NumTut.py, why does this
work? ...

Surely import doesn't use the folder name? As you
can see, I'm a beginner at python.

Thanks.
 
M

Martin Franklin

...

Quite right, sorry.

I resolved the problem, but will explain what happened
in case others encounter something similar ...

The file called NumTut.tgz at the SourceForge.net
download server is, when downloaded, automatically
receiving the wrong file extension by winXP .
(WinZip then produces a file that looks like a .py
file corrupted by lots of 'unprintable' characters.)

That is, clicking NumTut.tgz for download results in
"You are requesting file: /numpy/NumTut.tgz
Please select a mirror"

but the winXP File Download window that comes up says
File name: NumTut.gz (sic)
File type: WinZip File

If renamed back to .tgz, WinZip decompresses it
properly, and I see that it's actually a number of
files which are python-importable when placed in
the folder ...\Numerical\NumTut.

(Also for other files from that site, I've sometimes
had to re-download when the file is found not to be
in recognizable format. This problem seems to occur
only for files downloaded from SourceForge, btw.)

=====
A related python question, if I may ...

With the various .py files in \Numerical\NumTut,
*none* of which are named NumTut.py, why does this
work? ...


Surely import doesn't use the folder name? As you
can see, I'm a beginner at python.

Yes it is using the folder name. In this case there would be a file
named __init__.py inside the NumTut folder and the existance of this
file makes that folder a python package. For more on python packages
(and more):

http://www.python.org/doc/current/tut/node8.html#SECTION008400000000000000000

(Above link may get wrapped by some news/mail readers)



Regards
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top