468,119 Members | 1,804 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

NumTut corrupted

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

Thanks.
--
r.e.s.
Jul 18 '05 #1
3 2033
"r.e.s." wrote:

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?
Jul 18 '05 #2
"Peter Hansen" wrote ...
"r.e.s." wrote:

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?


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? ...
from NumTut import *


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

Thanks.
--
r.e.s.
Jul 18 '05 #3
On Tue, 2003-12-02 at 04:34, r.e.s. wrote:
"Peter Hansen" wrote ...
"r.e.s." wrote:

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?


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? ...
>>> from NumTut import *


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/tu...00000000000000

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

Regards
Martin

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Kevin MacKenzie | last post: by
1 post views Thread by WKC | last post: by
reply views Thread by Anup Jishnu | last post: by
3 posts views Thread by Bob Hynes | last post: by
3 posts views Thread by Colleyville Alan | last post: by
1 post views Thread by Gary Wessle | last post: by
9 posts views Thread by advance scout | last post: by
13 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.