A question for profile

S

slchen

Now, I have a question about profile.
I write a program as below:
file name: pro.py
-------------------------------

import profile
import string,re,sys,random,time
import main,read_dont

#Read the data
S1=sys.argv[1]
S2=sys.argv[2]
T=read_dont.readfile(S1,string.atoi(S2))
print "T[0] is %s" % T[0]


print "Total test pattern bit # is %d" % (len(T)*len(T[0]))

#End Read data ######################


print "hello"
profile.run('main.solver(T,string.atoi(sys.argv[3]))')
-----------------------------------
main and read_dont are two functions which are defined by me.

But when I execute the instruction

python pro.py pattern_1196.v 14 7

, it show some error message
the error message is ~~

Traceback (most recent call last):
File "pro.py", line 3, in ?
import profile
File "/usr/lib/python2.2/profile.py", line 18, in ?
# provided that the above copyright notice appears in all copies,
and
NameError: name 'profile' is not defined

but I have import the module profile,
Is there any error?

Thanks a lot!

Sen-Lung Chen
 
S

slchen

Sorry~~
I found the problem~~
There is an error profile.pyc in the same folder.
some it execute error.

thanks a lot!
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top