Bad magic number?
Volucris
volucris at hotmail.com
Mon May 7 00:09:20 EDT 2001
The following error happens when importing mp3scan.py:
Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license" for more
information.
IDLE 0.6 -- press F1 for help
>>> import mp3scan
Traceback (innermost last):
File "<pyshell#0>", line 1, in ?
import mp3scan
ImportError: Bad magic number in
C:\Python20\mp3scan.pyc
>>>
------mp3scan.py-------
res = raw_input('Press ENTER to begin.')
if res != 'q':
print '\n\nScanning...\n\n'
import os
def test(of, dir, files):
for file in files:
if file[-3:] == 'mp3':
of.write(os.path.join(dir, file) + '\n')
f = open('c:\\mp3scan_results.txt', 'w')
os.path.walk('c:\\', test, f)
f.close()
print '\nScan complete. Check \'C:\\mp3scan_results.txt\' for
results.\n'
res = raw_input('Press ENTER to quit.')
---end mp3scan.py------
I don't have access to the computer it was run on( it's a friend's), but I
think it's Win98. I e-mailed him the pyc. Anyone know what a 'magic number'
is?
greg
More information about the Python-list
mailing list