[SciPy-user] gui_thread

daishi at egcrc.net daishi at egcrc.net
Tue Jul 29 22:23:18 EDT 2003


I'm having some problems following the tutorial found here:
	http://www.scipy.org/site_content/tutorials/plot_tutorial
In particular, when in the Python interpreter I do
	>>> import gui_thread
nothing seems to happen - I simply get an interpreter prompt.
I took a look at
	gui_thread/__init__.py,
and it appears that there are only import statements -
is there something that I'm missing?

I noticed that in a previous version of __init__.py there
was a call to main.start(), so I tried re-inserting that
into the file, but this simply hangs the interpreter.
(The interpreter must be killed from another terminal).

What is somewhat odd is that if I leave the code as is
(i.e., without the explicit call to main.start()), and do:
	>>> import gui_thread
	>>> gui_thread.main.start()
Things seem to work as advertised. I.e.,
	<Importing wxPython...  done.>
	>>> from scipy import plt
	>>> plt.plot(range(3))
	<scipy.plt.wxplt.plot_frame instance; proxy of C++ wxFrame instance at _8664858_wxFrame_p>
	>>>
shows an appropriate window.

Is there a reason why calling main.start() from the interpreter
behaves differently then when called from within the __init__.py?
(I realize the contexts are different, but having looked at what
main.start() does, it's not clear to me why that would matter).

On a separate note, trying to use Chaco results in the following:
 >>> from chaco import wxplt
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/local/lib/python2.2/site-packages/chaco/wxplt.py", line 19, in ?
     from wxplot        import *
   File "/usr/local/lib/python2.2/site-packages/chaco/wxplot.py", line 17, in ?
     from wxplot_window import PlotWindow, PlotTraitSheet
   File "/usr/local/lib/python2.2/site-packages/chaco/wxplot_window.py", line 25, in ?
     from wxplot_trait_sheet import TraitPanel, TraitSheet, trait_sheet_handler
   File "/usr/local/lib/python2.2/site-packages/chaco/wxplot_trait_sheet.py", line 18, in ?
     from traits.wxtrait_sheet import *
   File "/usr/local/lib/python2.2/site-packages/traits/__init__.py", line 20, in ?
     from traits          import HasTraits, HasDynamicTraits, Trait, Disallow, \
   File "/usr/local/lib/python2.2/site-packages/traits/traits.py", line 100, in ?
     from trait_delegates import TraitDelegate
   File "/usr/local/lib/python2.2/site-packages/traits/trait_delegates.py", line 38, in ?
     class TraitDelegate:
   File "/usr/local/lib/python2.2/site-packages/traits/trait_delegates.py", line 40, in TraitDelegate
     def __init__ ( self, delegate = None, mutate_or_prefix = False ):
NameError: name 'False' is not defined
 >>>

Does one need Python 2.3 to use Chaco? (I know that wxPython uses
'True' and 'False' without requiring 2.3 - I believe it's dynamically
bound when one does 'import wx'?)

Thanks in advance for any insight,
d



Some system info follows:
------
os.name='posix'
------
sys.platform='linux2'
------
sys.version:
2.2 (#1, Feb 26 2002, 15:49:15)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-81)]
------
sys.prefix:
/usr/local
------
Found Numeric version '21.3' in /usr/local/lib/python2.2/site-packages/Numeric/Numeric.pyc
------
Found f2py2e version '2.35.229-1492' in /usr/local/lib/python2.2/site-packages/f2py2e/f2py2e.pyc
------
Found scipy_distutils version '0.2.0_alpha_3.288' in '/usr/local/lib/python2.2/site-packages/scipy_distutils/__init__.pyc'
Importing scipy_distutils.command.build_flib ... ok
------
atlas_info:
   FOUND:
     libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
     library_dirs = ['/usr/local/lib']

blas_info:
   FOUND:
     libraries = ['blas']
     library_dirs = ['/usr/lib']

blas_src_info:
   NOT AVAILABLE

dfftw_info:
   NOT AVAILABLE

dfftw_threads_info:
   NOT AVAILABLE

djbfft_info:
   NOT AVAILABLE

fftw_info:
   FOUND:
     libraries = ['rfftw', 'fftw']
     library_dirs = ['/usr/local/lib']
     define_macros = [('SCIPY_FFTW_H', None)]
     include_dirs = ['/usr/local/include']

fftw_threads_info:
   NOT AVAILABLE

lapack_info:
   FOUND:
     libraries = ['lapack']
     library_dirs = ['/usr/local/lib']

lapack_src_info:
   NOT AVAILABLE

sfftw_info:
   NOT AVAILABLE

sfftw_threads_info:
   NOT AVAILABLE

x11_info:
   FOUND:
     libraries = ['X11']
     library_dirs = ['/usr/X11R6/lib']
     include_dirs = ['/usr/X11R6/include']
------
Gnu
  version='0.5.26'
  F77='g77'
  F77FLAGS=' -Wall -fno-second-underscore  -fPIC '
  F77OPT=' -O3 -funroll-loops  -march=i686  -malign-double -fomit-frame-pointer '
  LIBS='-lg2c'




More information about the SciPy-User mailing list