![](https://secure.gravatar.com/avatar/49288613489b56b1c264e4a88c15c762.jpg?s=120&d=mm&r=g)
This one is driving me nuts... I can use all of scipy's functionality within the Python Shell, but I can not import and use the plt function from within my path. However, I can import most of the other functions within the scipy module. I have tried appending the sys.path, changing the registry, modifing the autoexec file. I am way confused !!! Examples: 1. From within the Shell... Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. IDLE Fork 0.8 -- press F1 for help
sys.path ['C:\\Python21\\Tools\\idle_VPython', 'C:\\Python21\\Programs\\Demos', 'C:\\PYTHON21\\DLLs', 'C:\\PYTHON21\\lib', 'C:\\PYTHON21\\lib\\plat-win', 'C:\\PYTHON21\\lib\\lib-tk', 'C:\\PYTHON21', 'C:\\PYTHON21\\Numeric'] from scipy import plt import gui_thread plt.plot((1,2,3)) <wxPython imported>
<C wxFrame instance at _1f24440_wxFrame_p>
**** Works Fine **** 2. From my test script..... # import the necessary modules import sys #sys.path.append('C:\Python21\wxPython') sys.path.append('C:\Python21\scipy') #sys.path.append('C:\Python21\scipy\plt') sys.path.append('C:\PYTHON21\scipy\gui_thread') print '\n', sys.path, '\n' import gui_thread from scipy import plt from scipy import * print '\n', dir(scipy), '\n' # create some data to plot x = arange(0,5,.5) y = special.j1(x) plt.plot(x,y) # now add some titles plt.title('First Order Bessel Function') plt.xtitle('x axis') plt.ytitle('y axis') # and x-axis bounds equal to that of the data plt.xaxis('fit') 2a. The output..... ['c:\\python21', 'C:\\Python21\\Programs\\Demos', 'C:\\PYTHON21\\DLLs', 'C:\\PYTHON21\\lib', 'C:\\PYTHON21\\lib\\plat-win', 'C:\\PYTHON21\\lib\\lib-tk', 'C:\\PYTHON21', 'C:\\PYTHON21\\Numeric', 'C:\\Python21\\scipy', 'C:\\PYTHON21\\scipy\\gui_thread'] Traceback (innermost last) File "c:\python21\test02.py", line 14, in ? from scipy import plt SystemError: C:\Code\2.1.1\dist\src\Objects\listobject.c:69: bad argument to internal function Program disconnected. **** Does NOT Work**** Anyhow, I suspect that this is a basic problem, but it has me stumped !!! Thanks !!! and best regards Jay