By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,702 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,702 IT Pros & Developers. It's quick & easy.

NumTut corrupted

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
"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

P: n/a
"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

P: n/a
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.