Ñò
\©äJc        !   @   s.  d  Z  d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k i Z	 e i i
 d d ƒ e i Z d d k l Z l Z l Z l Z l Z l Z l Z l Z l Z l Z l Z d d k l Z l Z l Z l Z l Z l Z l  Z  l! Z! l" Z" l# Z# l$ Z$ d d k% l& Z& d d k' l( Z( y d d	 k) l* Z* Wn e+ j
 o e, Z* n Xd d
 k- l. Z. d d k/ l0 Z0 d d k1 l2 Z2 d d k3 l4 Z4 d d k5 l6 Z6 d d k7 l8 Z8 d d k9 l: Z: d d k; l< Z< d d k= l> Z> d d k? l@ Z@ d d kA lB ZB d d kC lD ZD lE ZE lF ZF lG ZG lH ZH lI ZI lJ ZJ lK ZK lL ZL d d kM lN ZN lO ZO lP ZP lQ ZQ lR ZR lS ZS d d kT lU ZU d d kV lW ZW lX ZX lY ZY eQ d ƒ ZZ d „  Z[ d „  Z\ d Z] d e f d „  ƒ  YZ^ d „  Z_ d  „  Z` d! „  Za d" „  Zb d# „  Zc ed d$ j o ec ƒ  n d S(%   s  
Spyder, the Scientific PYthon Development EnviRonment
=====================================================

Developped and maintained by Pierre Raybaut

Copyright Â© 2009 Pierre Raybaut
Licensed under the terms of the MIT License
(see spyderlib/__init__.py for details)
iÿÿÿÿNi    t    (   t   QApplicationt   QMainWindowt   QSplashScreent   QPixmapt   QMessageBoxt   QMenut   QIcont   QLabelt   QCursort   QColort   QFileDialog(   t   SIGNALt   PYQT_VERSION_STRt   QT_VERSION_STRt   QPointt   Qtt   QLibraryInfot   QLocalet   QTranslatort   QSizet
   QByteArrayt   QObject(   t   __version__(   t   encoding(   t   WinUserEnvDialog(   t   PathManager(   t   Console(   t   WorkingDirectory(   t   Editor(   t
   HistoryLog(   t	   DocViewer(   t	   Workspace(   t   Explorer(   t   ExternalConsole(   t   FindInFiles(   t   Pylint(	   t   create_actiont   add_actionst   get_std_icont   add_module_dependent_bookmarkst   add_bookmarkt   create_program_actiont
   keybindingt	   translatet   create_python_gui_script_action(   t   get_icont   get_image_patht   CONFt   get_conf_patht	   DATA_PATHt   DOC_PATH(   t   run_python_gui_script(   t   load_sessiont   save_sessiont   reset_sessions   .temp.session.tarc          C   sÛ   d }  t  i t i d ƒ } t  i | ƒ o— t i d j of g  } t i | ƒ D]$ } t i	 d | ƒ o | | qO qO ~ } | o t  i | | d ƒ }  q¡ n |  p t  i | d ƒ }  qÂ n t  i
 |  ƒ o |  Sd S(   sc   
    Return Python documentation path
    (Windows: return the PythonXX.chm path if available)
    R    t   Doct   nts   (?i)Python[0-9]{3}.chmi    s
   index.htmlN(   t   ospt   joint   syst   prefixt   isdirt   ost   namet   listdirt   ret   matcht   isfile(   t
   python_doct   doc_patht   _[1]t   patht
   python_chm(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   get_python_doc_pathB   s    'c          C   s;   t  ƒ  }  t i d j o t i |  ƒ n t i |  ƒ d S(   sS   
    Open Python documentation
    (Windows: open .chm documentation if found)
    R9   N(   RJ   R?   R@   t	   startfilet
   webbrowsert   open(   RE   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   open_python_docT   s    	sZ  
QSplitter::handle {
    margin-left: 4px;
    margin-right: 4px;
}

QSplitter::handle:horizontal {
    width: 1px;
    border-width: 0px;
    background-color: lightgray;
}

QSplitter::handle:vertical {
    border-top: 2px ridge lightgray;
    border-bottom: 2px;
}

QMainWindow::separator:vertical {
    margin-left: 1px;
    margin-top: 25px;
    margin-bottom: 25px;
    border-left: 2px groove lightgray;
    border-right: 1px;
}

QMainWindow::separator:horizontal {
    margin-top: 1px;
    margin-left: 5px;
    margin-right: 5px;
    border-top: 2px groove lightgray;
    border-bottom: 2px;
}
t
   MainWindowc        	   B   s  e  Z d  Z e d ƒ Z d d e d d ƒ d f d d e d d ƒ d f d	 d
 e d d ƒ d f d d e d d ƒ d f d d e d d ƒ d f f Z e d d e d „ Z d „  Z	 d d „ Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d  „  Z d! „  Z d" „  Z d# „  Z d$ „  Z e d% „ Z d& „  Z d' „  Z e d( „ Z d) „  Z d* „  Z e e d+ „ Z d, „  Z d- „  Z d. „  Z  d/ „  Z! d0 „  Z" d1 „  Z# d2 „  Z$ d3 „  Z% d4 „  Z& d5 „  Z' d6 „  Z( d7 „  Z) d8 „  Z* d9 „  Z+ d: „  Z, d; „  Z- e d< „ Z. d= „  Z/ RS(>   s   Spyder main windows   .patht   PyQt4sC   http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.htmlRO   s   PyQt4 Reference Guides   qt.pngsG   http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/classes.htmls   PyQt4 API Referencet   xys   http://www.pythonxy.coms   Python(x,y)s   pythonxy.pngt   numpys   http://docs.scipy.org/doc/s   Numpy and Scipy documentations	   scipy.pngt
   matplotlibs/   http://matplotlib.sourceforge.net/contents.htmls   Matplotlib documentations   matplotlib.pngR    c            s<  t  t ˆ  ƒ i ƒ  | ˆ  _ | ˆ  _ | i ˆ  _ | i ˆ  _ | i ˆ  _ | i	 ˆ  _	 ˆ  i
 d ƒ ˆ  i t ƒ g  ˆ  _ t i ˆ  i ƒ oZ t i ˆ  i ƒ \ ˆ  _ } g  } ˆ  i D]! } t i | ƒ o | | q´ q´ ~ ˆ  _ n ˆ  i ƒ  ˆ  i ƒ  t ˆ  ˆ  i d ƒ d ‡  f d †  ƒˆ  _ t ˆ  ˆ  i d ƒ d  d d ˆ  i d ˆ  i d ƒ ƒˆ  _ t ˆ  ˆ  i d	 ƒ d  d
 d ˆ  i d ˆ  i d ƒ ƒˆ  _ t ˆ  ˆ  i d ƒ d  d d ˆ  i d ˆ  i d ƒ ƒˆ  _ d  ˆ  _  d  ˆ  _! d  ˆ  _" d  ˆ  _# d  ˆ  _$ d  ˆ  _% d  ˆ  _& d  ˆ  _' d } | o | d | 7} n ˆ  i( | ƒ ˆ  i) t* d ƒ ƒ t+ t, d ƒ d ƒ }	 t- |	 ƒ ˆ  _. ˆ  i. i/ ƒ  }
 |
 i0 d ƒ |
 i1 t ƒ ˆ  i. i2 |
 ƒ ˆ  i	 p' ˆ  i. i3 ƒ  ˆ  i4 ˆ  i d ƒ ƒ n g  ˆ  _5 t6 ˆ  _7 d  ˆ  _8 d  ˆ  _9 d  ˆ  _: d  ˆ  _; d  ˆ  _< d  ˆ  _= ˆ  i
 d ƒ d  S(   Ns   Start of MainWindow constructors   Reload last sessiont	   triggeredc              s   ˆ  i  t ƒ S(    (   R5   t   TEMP_SESSION_PATH(    (   t   self(    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   <lambda>´   s    s   Load session...s   fileopen.pngt   tips   Load Spyder sessions   Save session and quit...s   filesaveas.pngs)   Save current session and quit applications   Path manager...s   folder_new.pngs   Open Spyder path managert   Spyders    (%s)s
   spyder.svgs
   splash.pngt   pngi   s   Initializing...s   End of MainWindow constructor(>   t   superRO   t   __init__t   commandst   messaget   working_directoryt   init_workdirt   debugt   profilet   lightt   debug_printt   setDockNestingEnabledt   TrueRH   R:   RD   t   spyder_pathR   t	   readlinesR>   t   remove_path_from_sys_patht   add_path_to_sys_pathR%   t   trt   load_temp_session_actiont   NoneR5   t   load_session_actionR6   t   save_session_actiont   path_manager_callbackt   spyder_path_actiont   consolet   editort	   workspacet   explorert	   docviewert
   historylogt
   extconsolet   findinfilest   setWindowTitlet   setWindowIconR.   R   R/   R   t   splasht   fontt   setPixelSizet   setBoldt   setFontt   showt
   set_splasht
   widgetlistt   Falset   already_closedt   window_sizet   last_window_statet   last_plugint   fullscreen_flagt   next_session_namet   save_session_name(   RV   R]   t   intitleR^   t   optionst   _RG   R@   t   titlet   pixmapR}   (    (   RV   s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR\   ™   s€    			?

														
								c         C   s   |  i  o t | IJn d S(   s   Debug printsN(   Ra   t   STDOUT(   RV   R^   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRd   ô   s    
i   c         C   s6   |  i  | ƒ } | i | ƒ | i t | | ƒ ƒ | S(   N(   t
   addToolBart   setObjectNamet   setIconSizeR   (   RV   R   t   object_namet   iconsizet   toolbar(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   create_toolbarù   s    c   $         sy  ˆ  i  d ƒ ˆ  i pt d d ƒ } t ˆ  | d d | d ˆ  i ƒˆ  _ t ˆ  t d d ƒ d d	 d ˆ  i ƒˆ  _ t d d
 ƒ } t ˆ  | d d | d ˆ  i ƒˆ  _	 t ˆ  ˆ  i
 d ƒ d d d ˆ  i d ˆ  i
 d ƒ ƒˆ  _ ‡  f d †  } | d d ƒ ˆ  _ | d d ƒ ˆ  _ | d d ƒ ˆ  _ | d d ƒ ˆ  _ | d d ƒ ˆ  _ t ˆ  t d d ƒ d t d  ƒ d ˆ  i d! d" ƒˆ  _ t ˆ  t d d# ƒ d$ t d% ƒ d t d& ƒ d ˆ  i d! d' ƒˆ  _ ˆ  i ˆ  i d¢ ˆ  i ˆ  i ˆ  i ˆ  i d¢ ˆ  i g	 ˆ  _ ˆ  i ˆ  i ˆ  i	 g ˆ  _ n d¢ } ˆ  i pþˆ  i ˆ  i
 d( ƒ d) ƒ } t ˆ  d* d$ d+ d ˆ  i ƒˆ  _ ˆ  i ƒ  | i ˆ  i ƒ t ˆ  ˆ  i
 d, ƒ d$ d- d ˆ  i ƒˆ  _  | i ˆ  i  ƒ | i! ƒ  ˆ  i" ƒ  i# ˆ  i
 d. ƒ ƒ ˆ  _$ ˆ  i% ˆ  i$ t& d/ ƒ ˆ  i' ƒ ˆ  i" ƒ  i# ˆ  i
 d0 ƒ ƒ ˆ  _( t) ˆ  i( ˆ  i ƒ ˆ  i" ƒ  i# ˆ  i
 d1 ƒ ƒ ˆ  _* t) ˆ  i* ˆ  i ƒ ˆ  i+ ƒ  } | i, d2 ƒ | i- ˆ  i
 d3 ƒ d4 ƒ t. i/ d5 d6 ƒ os ˆ  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  i} ƒ  ˆ  _~ ˆ  i~ i ˆ  i
 du ƒ ƒ t) ˆ  i~ d¢ ˆ  i ˆ  i  f ƒ ˆ  i" ƒ  i# ˆ  i~ ƒ ˆ  i" ƒ  i# ˆ  i
 dv ƒ ƒ } g  } t ˆ  ˆ  i
 dw ƒ d t dx ƒ d dy „  ƒˆ  _€ | i? ˆ  i€ ƒ y t i‚ dz ƒ Wn@ tƒ j
 o4 ˆ  i€ i„ t… ƒ ˆ  i€ i† ˆ  i€ i‡ ƒ  d{ ƒ n Xd¢ g } tˆ ˆ  ˆ  i
 d| ƒ d} d~ ƒ } tˆ ˆ  ˆ  i
 d ƒ d€ d ƒ } t‰ ˆ  ˆ  i
 d‚ ƒ dƒ d„ tŠ i‹ d… d† d‡ d‡ ƒ ƒ } x/ | | | f D] } | o | i? | ƒ qÒqÒWtŒ | ƒ dˆ j o | | 7} n t) | | ƒ t) | | ƒ ˆ  i" ƒ  i# d‰ ƒ } | i t ˆ  ˆ  i
 dŠ ƒ i d‹ ƒ d tŽ dŒ ƒ d ˆ  i ƒƒ tŠ i‹ t d ƒ } tŠ i‘ | ƒ p tŠ i‹ t dŽ ƒ } n t’ ˆ  | | ˆ  i
 d ƒ d$ d d tŽ d‘ ƒ ƒt“ ƒ  d¢ j	 oA t ˆ  ˆ  i
 d’ ƒ d t d“ ƒ d t” ƒ} t) | d¢ | f ƒ n tˆ ˆ  ˆ  i
 d” ƒ d• d– ƒ } | o | i | ƒ n t• ˆ  | ˆ  i– ƒ n ˆ  i  d— ƒ ˆ  i o d˜ n d™ dš } t. i/ d› | dœ ƒ \ } } ˆ  i— t˜ | | ƒ ƒ ˆ  i™ ƒ  ˆ  _š t. i/ d› | d ƒ \ }  }! ˆ  i› tœ |  |! ƒ ƒ ˆ  i p™ t t. i/ d› | dž ƒ ƒ }" ˆ  iž tŸ ƒ  i  |" ƒ ƒ t. i/ d› | dŸ ƒ o ˆ  i¡ t¢ i£ ƒ n t. i/ d› | d  ƒ o ˆ  i¡ t¢ i¤ ƒ n ˆ  i¥ ƒ  n ˆ  i¦ i§ ƒ  xH ˆ  i" ƒ  i¨ ƒ  D]4 }# t© |# tª ƒ o |# | j o |# i« t… ƒ qãqãWxJ ˆ  i" ƒ  i¨ ƒ  D]6 }# t© |# tª ƒ o  ˆ  i% |# t& d/ ƒ ˆ  i¬ ƒ q.q.Wˆ  i  d¡ ƒ d¢ S(£   s   Setup main windows!   *** Start of MainWindow setup ***t   FindReplaces	   Find texts   Ctrl+Fs   find.pngRT   s	   Find nextt   F3s   findnext.pngs   Replace texts   Ctrl+Hs   replace.pngs   &Find in filess
   Ctrl+Alt+Fs	   findf.pngRX   s   Search text in multiple filesc            sI   t  ˆ  t d |  ƒ d t |  ƒ d t | ƒ d ˆ  i d |  i ƒ  d t ƒS(   Nt   SimpleEditort   shortcutt   iconRT   t   datat   window_context(   R%   R,   R+   R.   t   global_callbackt   lowerR„   (   t   textt	   icon_name(   RV   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   create_edit_action  s    	t   Undos   undo.pngt   Redos   redo.pngt   Copys   editcopy.pngt   Cuts   editcut.pngt   Pastes   editpaste.pngR›   t   DeleteR   s   editdelete.pngRž   t   deletes
   Select allRœ   t	   SelectAlls   selectall.pngt	   selectAlls   Main toolbart   main_toolbarR    s   Ctrl+Alt+Shift+Ms   Fullscreen modet   F11s   &Files   aboutToShow()s   &Edits   &Searcht	   StatusBars   Welcome to Spyder!iˆ  Rt   t   enables   Loading workspace...s   focus_changed()s   redirect_stdio(bool)s   &Quits   Ctrl+Qs   exit.pngt   Quits	   refresh()s   Loading editor plugin...s   edit_goto(QString,int)s   open_dir(QString)s5   open_external_console(QString,QString,bool,bool,bool)s'   external_console_execute_lines(QString)s   &Sources   File toolbart   file_toolbars   Analysis toolbart   analysis_toolbars   Run toolbart   run_toolbars   Edit toolbart   edit_toolbars%   Current user environment variables...s   win_env.pngs\   Show and edit current user environment variables in Windows registry (i.e. for all sessions)t   find_in_filess   find_files(QString)s   refresh_findinfiles()s   Find toolbart   find_toolbars   Loading workspace plugin...s   Workspace toolbart
   ws_toolbarRu   s   set_previous_enabled(bool)s   set_next_enabled(bool)s   open_previous_dir()s   open_next_dir()s   open_parent_dir()s   edit(QString)s   removed(QString)s   renamed(QString,QString)s   import_data(QString)s   run(QString)c            s.   ˆ  i  t |  ƒ t i t |  ƒ ƒ t t t ƒ S(    (   t   open_external_consolet   unicodeR:   t   dirnameR„   (   t   fname(   RV   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRW   ã  s    s   refresh_explorer()c              s   ˆ  i  i d  t ƒ S(   t   force_current(   Ru   t   refreshRf   (    (   RV   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRW   ê  s    s   refresh_explorer(QString)c              s   ˆ  i  i d  t ƒ S(   R¾   (   Ru   R¿   Rf   (    (   RV   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRW   ñ  s    Rw   s   Loading history plugin...Rv   s   Loading docviewer plugin...t   pylints   Loading pylint plugin...s   run_pylint(QString)s   Setting up main window...iþÿÿÿs   Restart Python interpretersš   Start a new Python shell: this will remove all current session objects, except for the workspace data which may be transferred from one session to anothers   restart.pngt   existing_menus   &Views   &Toolss   Python(x,y) launchers   pythonxy.pngc           S   s   t  d  d ƒ S(   RQ   t   xyhome(   R4   (    (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRW   =  s    RQ   s2   
Please install Python(x,y) to enable this features   Qt Designers   qtdesigner.pngt   designers   Qt Linguists   qtlinguist.pngt   linguists   Qt exampless   qt.pngRP   t   examplest   demost   qtdemoi   t   ?s   About %1...RY   t   MessageBoxInformations   Spyderdoc.chms
   index.htmls   Spyder documentationt   F1t   DialogHelpButtons   Python documentations
   python.pngs   Qt Assistants   qtassistant.pngt	   assistants   Setting up window...t   lightwindowt   windowt   /t   maint   sizet   positiont   statet   is_maximizedt   is_fullscreens   *** End of MainWindow setup ***N(­   Rd   Rc   R,   R%   t   findt   find_actiont	   find_nextt   find_next_actiont   replacet   replace_actionRk   t   findinfiles_callbackt   findinfiles_actiont   undo_actiont   redo_actiont   copy_actiont
   cut_actiont   paste_actionR.   R    t   delete_actionR+   t   selectall_actionRm   t   edit_menu_actionst   search_menu_actionsR˜   t   maximize_dockwidgett   maximize_actiont#   _MainWindow__update_maximize_actiont	   addActiont   toggle_fullscreent   fullscreen_actiont   addSeparatort   menuBart   addMenut	   file_menut   connectR   t   update_file_menut	   edit_menuR&   t   search_menut	   statusBarR“   t   showMessageR0   t   getR‚   R    Rt   t   plugin_focus_changedt   redirect_interactiveshell_stdiot	   namespaceR   R]   R^   Ra   t   closingRb   Rr   t   setCentralWidgetRƒ   t   appendt   add_dockwidgett   quitt   quit_actionR   R`   t   workdirR’   t   shellR¿   R   Rs   t   loadt   chdirRº   t'   execute_python_code_in_external_consolet   add_to_menubart   file_toolbar_actionst   analysis_toolbar_actionst   run_toolbar_actionst   edit_toolbar_actionst   file_menu_actionsRl   Rn   Ro   Rq   R   t   win_envR#   Ry   t   set_search_textt
   refreshdirt   add_to_toolbart   set_interpretert   interpreterR!   Ru   t   get_valid_typest   set_editor_valid_typest   previous_actiont
   setEnabledt   next_actiont   previous_directoryt   next_directoryt   parent_directoryt   removedt   renamedt   import_datat   refresh_folderR   Rw   t   set_historylogR   Rv   t   set_docviewerR$   RÀ   t   analyzet   menu_actionst   restart_interpreterR"   Rx   t   createPopupMenut	   view_menut   setTitlet	   xy_actiont   impt   find_modulet   ImportErrort   setDisabledRf   t
   setToolTipt   toolTipR*   R-   R:   R;   t   lent   argR'   t   aboutR3   RD   R)   RJ   RN   R(   t	   BOOKMARKSt   resizeR   RÑ   R†   t   moveR   t   strt   restoreStateR   t   fromHext   setWindowStateR   t   WindowMaximizedt   WindowFullScreent%   _MainWindow__update_fullscreen_actionR|   t   hidet   childrent
   isinstanceR   t   setTearOffEnabledt   update_edit_menu($   RV   t   _textR¤   Rú   R®   t   statusR³   R´   Rµ   R¶   t   file_actionst   winenv_actiont   toolbar_search_actionsR¸   R¹   t   valid_typest   restart_actiont   console_menut
   tools_menut   tools_actionst   additactt   qtdactt   qtlactt   qteactt   actt	   help_menut
   spyder_doct	   pydoc_actt   qtaactR=   t   widtht   heightt   posxt   posyt   hexstatet   child(    (   RV   s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   setupÿ   sˆ   
					
	

!
!!






	
	

					
			




	 	
  c         C   s   |  i  i i ƒ  d S(   s&   Give focus to interactive shell widgetN(   Rr   R  t   setFocus(   RV   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt!   give_focus_to_interactive_console–  s    c         C   s]   t  i ƒ  } d d k l } d d k l } t | | ƒ o | St | | ƒ o | i Sd S(   s2   Return Python shell widget which has focus, if anyiÿÿÿÿ(   t   PythonShellWidget(   t   ExternalPythonShellN(   R   t   focusWidgett   spyderlib.widgets.shellR[  t+   spyderlib.widgets.externalshell.pythonshellR\  R<  R  (   RV   t   widgetR[  R\  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   __focus_shellš  s    c         C   sU   |  i  ƒ  |  i ƒ  |  i ƒ  } | d j	 o$ |  i d j	 o |  i i | ƒ n d S(   s,   Focus has changed from one plugin to anotherN(   R>  t   update_search_menut   _MainWindow__focus_shellRm   Rv   t	   set_shell(   RV   R  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRø   ¤  s
    

c         C   s   |  i  i t i t ƒ ƒ d S(   s   Update file menuN(   Rl   R  R:   RD   RU   (   RV   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRò   ¬  s    c         C   s   t  i ƒ  } d d k l } d d k l } d  } t | | | f ƒ o= t | | ƒ } | i ƒ  } | o | } | | | f } n | | f S(   Niÿÿÿÿ(   t   ShellBaseWidget(   t   TextEditBaseWidget(	   R   R]  R^  Re  t   spyderlib.widgets.qscibaseRf  Rm   R<  t
   isReadOnly(   RV   R`  Re  Rf  t   textedit_propertiesRr   t   not_readonlyt   readwrite_editor(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   __focus_widget_properties°  s    c         C   sd  |  i  ƒ  i ƒ  o d Sx$ |  i i ƒ  D] } | i t ƒ q( W|  i ƒ  \ } } t | t ƒ o |  i	 i t
 ƒ d S| d j o d S| \ } } } | o | o |  i i ƒ  o d S|  i i t
 ƒ |  i i | o
 | i ƒ  ƒ |  i i | o
 | i ƒ  ƒ | i ƒ  } |  i i | ƒ |  i i | o | ƒ |  i	 i | ƒ |  i i | o | ƒ d S(   s   Update edit menuN(   Rî   t   hasFocusRó   t   actionsR  R„   t$   _MainWindow__focus_widget_propertiesR<  R    Râ   Rf   Rm   Rs   t   is_file_openedRä   RÞ   t   isUndoAvailableRß   t   isRedoAvailablet   hasSelectedTextRà   Rá   Rã   (   RV   RW  R`  Ri  Rr   Rj  Rk  t   has_selection(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR>  ¼  s0      c         C   s¿   |  i  ƒ  i ƒ  o d Sx- |  i |  i |  i g D] } | i t ƒ q1 W|  i ƒ  \ } } | d j o d S| \ } } } |  i i t	 ƒ |  i i t	 ƒ |  i i | ƒ |  i i | ƒ d S(   s   Update search menuN(
   Rî   Rm  R×   RÙ   RÛ   R  R„   Ro  Rm   Rf   (   RV   RW  RŽ   Ri  Rk  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRb  á  s    
 c         C   sX   |  i  | ƒ |  i i ƒ  |  i i | t i t i Bt i Bt t i	 ƒ ƒ t
 i ƒ  d S(   s   Set splash messageN(   Rd   R|   R   Rö   R   t   AlignBottomt   AlignCentert   AlignAbsoluteR
   t   whiteR   t   processEvents(   RV   R^   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR‚   ô  s
    c         C   s,   |  i  t ƒ o | i ƒ  n | i ƒ  d S(   s   closeEvent reimplementationN(   Rû   Rf   t   acceptt   ignore(   RV   t   event(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt
   closeEventü  s    c         C   s@   |  i  ƒ  o |  i o |  i ƒ  |  _ n t i |  | ƒ d S(   s   Reimplement Qt methodN(   t   isMaximizedR‰   RÑ   R†   R   t   resizeEvent(   RV   R|  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR    s    c         C   sr  |  i  o t S|  i } |  i o d n d d } t i d | d | i ƒ  | i ƒ  f ƒ t i d | d |  i ƒ  ƒ t i d | d |  i	 ƒ  ƒ |  i
 ƒ  } t i d | d | i ƒ  | i ƒ  f ƒ |  i pg |  i d	 t ƒ |  i ƒ  } t i d | d
 t | i ƒ  ƒ ƒ t i d | d |  i ƒ  i ƒ  ƒ n x& |  i D] } | i | ƒ p t SqFWt |  _  t S(   s
   Exit tasksRÍ   RÎ   RÏ   RÐ   RÑ   RÔ   RÕ   RÒ   t   restoreRÓ   t	   statusbar(   R…   Rf   R†   Rc   R0   t   setRR  RS  R~  t   isFullScreent   post   xt   yRç   t	   saveStateR3  t   toHexRõ   t   isHiddenRƒ   Rû   R„   (   RV   t
   cancelableRÑ   R=   R„  t   qbaR`  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRû   	  s*    
	))
#
 		c         C   sg   | i  ƒ  \ } } |  i | | ƒ d d k l } t | | ƒ o | i t ƒ n |  i i | ƒ d S(   s$   Add QDockWidget and toggleViewActioniÿÿÿÿ(   t   MatplotlibFigureN(	   t   create_dockwidgett   addDockWidgett   spyderlib.plugins.figureRŒ  R<  t   setFloatingRf   Rƒ   Rý   (   RV   RW  t
   dockwidgett   locationRŒ  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRþ      s    c         C   s–   |  i  d  j o( |  i d ƒ } |  i d ƒ } d } n% |  i d ƒ } |  i d ƒ } d } |  i i | ƒ |  i i t | ƒ ƒ |  i i | ƒ d  S(   Ns   Maximize current plugins;   Maximize current plugin to fit the whole application windows   maximize.pngs   Restore current pluginsV   Restore current plugin to its original size and position within the application windows   unmaximize.png(   R‡   Rm   Rk   Rè   t   setTextt   setIconR.   R+  (   RV   R¢   RX   R   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   __update_maximize_action,  s    
c         C   sM  |  i  d j o» | o d S|  i ƒ  |  _  t i ƒ  } x; |  i D]0 } | i i ƒ  | i | ƒ o | |  _	 qA qA W|  i	 i i
 ƒ  i t ƒ |  i |  i	 ƒ t |  i	 _ |  i	 i ƒ  |  i	 i t ƒ nu |  i	 i i |  i	 ƒ |  i	 i i
 ƒ  i t ƒ |  i d ƒ t |  i	 _ |  i |  i  ƒ d |  _  |  i	 i ƒ  i ƒ  |  i ƒ  d S(   s¢   
        Shortcut: Ctrl+Alt+Shift+M
        First call: maximize current dockwidget
        Second call (or restore=True): restore original window layout
        N(   R‡   Rm   R‡  R   R]  Rƒ   R‘  R:  t   isAncestorOfRˆ   t   toggleViewActionR*  Rf   Rü   t   ismaximizedR   t   visibility_changedt	   setWidgetR  R„   R4  t   get_focus_widgetRY  Ré   (   RV   R€  t   focus_widgett   plugin(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRç   ;  s.    
 	c         C   s7   |  i  ƒ  o
 d } n d } |  i i t | ƒ ƒ d  S(   Ns   window_nofullscreen.pngs   window_fullscreen.png(   Rƒ  Rì   R”  R.   (   RV   R   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   __update_fullscreen_action^  s    
c         C   sE   |  i  ƒ  o t |  _ |  i ƒ  n t |  _ |  i ƒ  |  i ƒ  d  S(   N(   Rƒ  R„   R‰   t
   showNormalRf   t   showFullScreenR9  (   RV   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRë   e  s    		
c         C   s   | i  } | d j	 ov | p | i ƒ  } n | d j o' |  i ƒ  i | ƒ } t | | ƒ | S| i ƒ  d } t | | d d | ƒn d S(   s   Add menu and actions to menubari    t   insert_beforeN(   N(   R!  Rm   t   get_widget_titleRî   Rï   R&   Rn  (   RV   R`  R   RÁ   Rn  t   menut   first_action(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR  n  s    	c         C   s+   | i  } | d j	 o t | | ƒ n d S(   s   Add widget actions to toolbarN(   t   toolbar_actionsRm   R&   (   RV   R—   R`  Rn  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR  }  s    	c      	   C   sÉ   y d d k  l } d | } Wn t j
 o d } n Xt i |  |  i d ƒ i d ƒ |  i d ƒ i d ƒ i t ƒ i t i	 ƒ  ƒ i t
 ƒ i t ƒ i | ƒ i t i ƒ  ƒ i d ƒ i d	 ƒ ƒ d
 S(   s   About Spyderiÿÿÿÿ(   t   QSCINTILLA_VERSION_STRs   , QScintilla R    s   About %1RY   sØ  <b>%1 %2</b>
            <br>Scientific PYthon Development EnviRonment
            <p>Copyright &copy; 2009 Pierre Raybaut
            <br>Licensed under the terms of the MIT License
            <p>Developed and maintained by %8Pierre Raybaut%9
            <p>Many thanks to %8Christopher Brown%9 (beta-tester from the 
            very beginning), 
            %8Alexandre Radicchi%9 (especially for his contributions to the 
            <i>Workspace</i> plugin and the <i>DictEditor</i> widget), 
            %8Ludovic Aubry%9 (for his great ideas, suggestions and 
            technical solutions - without him, the <i>external console</i> 
            wouldn't have so many features)
            and all the Spyder beta-testers and regular users.
            <p>Integrated Python code analysis powered by %8pyflakes%9:
            <br>Copyright (c) 2005 Divmod, Inc., http://www.divmod.com/
            <p>Most of the icons are coming from the %8Crystal Project%9:
            <br>Copyright &copy; 2006-2007 Everaldo Coelho
            <p>Spyder is based on spyderlib module v%2
            <br>Bug reports and feature requests: 
            <a href="http://spyderlib.googlecode.com">Google Code</a><br>
            Discussions around the project: 
            <a href="http://groups.google.com/group/spyderlib">Google Group</a>
            <p>This project is part of 
            <a href="http://www.pythonxy.com">Python(x,y) distribution</a>
            <p>Python %3, Qt %4, PyQt %5%6 on %7s    <span style='color: #444444'><b>s   </b></span>N(   t
   PyQt4.QsciR¦  R)  R   R/  Rk   R.  R   t   platformt   python_versionR   R   t   system(   RV   t   qsci(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR/  ƒ  s    		!c         C   së   t  i ƒ  } d d k l } d d k l } d d k l } t | | | f ƒ p d S| |  i	 i
 j o |  i	 } nq | |  i i j o |  i } nQ t | | ƒ o | i ƒ  o |  i } n' t | | ƒ o |  i } n
 |  i } | S(   sb   Return editor plugin which has focus:
        console, extconsole, editor, docviewer or historylogiÿÿÿÿ(   Rf  (   t
   QsciEditor(   Re  N(   R   R]  Rg  Rf  t   spyderlib.widgets.qscieditorR¬  R^  Re  R<  Rr   R  Rv   Rs   Rh  Rw   Rx   (   RV   R`  Rf  R¬  Re  R  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   get_current_editor_pluginª  s     	c         C   s?   |  i  ƒ  } | d j	 o" | i i ƒ  | i i i ƒ  | Sd S(   s   Global find callbackN(   R®  Rm   t   find_widgetR   t   search_textRY  (   RV   R  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRÖ   ¿  s
    c         C   s.   |  i  ƒ  } | d j	 o | i i ƒ  n d S(   s   Global find next callbackN(   R®  Rm   R¯  RØ   (   RV   R  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRØ   Ç  s    c         C   s.   |  i  ƒ  } | d j	 o | i i ƒ  n d S(   s   Global replace callbackN(   RÖ   Rm   R¯  t   show_replace(   RV   R  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRÚ   Í  s    c         C   s   t  i ƒ  } |  i i p' |  i i i t ƒ |  i i i ƒ  n d d k l	 } d } t
 | | ƒ o | i ƒ  o | i ƒ  } n |  i t d ƒ | ƒ d S(   s   Find in files callbackiÿÿÿÿ(   Rf  R    s   find_files(QString)N(   R   R]  Ry   R˜  R‘  t
   setVisibleRf   t   raise_Rg  Rf  R<  Rs  t   selectedTextt   emitR   (   RV   R`  Rf  R¢   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRÜ   Ó  s    c         C   s¦   t  i ƒ  } |  i ƒ  } t | i ƒ  i ƒ  ƒ } d d k l } t | | ƒ o t	 | | ƒ ƒ  n? t | t
 ƒ o. t |  i | ƒ o t	 |  i | ƒ ƒ  q¢ n d S(   s   Global callbackiÿÿÿÿ(   Rf  N(   R   R]  t   senderR»   Rž   t   toStringRg  Rf  R<  t   getattrR    t   hasattrRt   (   RV   R`  t   actiont   callbackRf  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR    ß  s    c         C   sû   t  i |  |  i d  ƒ |  i d ƒ t  i t  i Bƒ } | t  i j o d S|  i i ƒ  } | oR t  i |  |  i d ƒ |  i d ƒ t  i t  i Bƒ } | t  i j o
 d } q± n |  i	 i
 i | ƒ } |  i i | ƒ |  i	 i p |  i	 i i ƒ  n d S(   s   Restart Python interpreters¿   Python interpreter will be restarted: all the objects created during this session will be lost (that includes imported modules which will have to be imported again).

Do you want to continue?NR    s-   Do you want to keep workspace data available?(   R   t   warningRk   t   Yest   NoRt   t   get_namespacet   questionRm   Rr   R  t   start_interpreterR  R˜  R‘  R³  (   RV   t   answerRú   R  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR"  ë  s     c         C   s/   | o |  i  i i ƒ  n |  i  i i ƒ  d  S(   N(   Rr   R  t   redirect_stdst   restore_stds(   RV   RÓ   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRù   þ  s    c         C   sC   |  i  i t ƒ |  i  i ƒ  |  i  i t | ƒ | | | | ƒ d S(   s   Open external consoleN(   Rx   R²  Rf   R³  t   startR»   (   RV   R½   t   wdirt   ask_for_argumentst   interactRa   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRº     s    c         C   s1   |  i  i t ƒ |  i  i ƒ  |  i  i | ƒ d S(   s!   Execute lines in external consoleN(   Rx   R²  Rf   R³  t   execute_python_code(   RV   t   lines(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR    s    c         C   s1   x* t  |  i ƒ D] } t i i d | ƒ q Wd S(   s   Add Spyder path to sys.pathi   N(   t   reversedRH   R<   t   insert(   RV   RH   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRj     s     c         C   s6   t  i } x& | d |  i j o | i d ƒ q Wd S(   s    Remove Spyder path from sys.pathi   N(   R<   RH   t   pop(   RV   t   sys_path(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRi     s    	 c         C   sf   |  i  ƒ  t |  |  i ƒ } |  i | t d ƒ |  i ƒ | i ƒ  |  i ƒ  t i	 |  i |  i
 ƒ d S(   s   Spyder path managers   redirect_stdio(bool)N(   Ri   R   RH   Rñ   R   Rù   t   exec_Rj   R   t
   writelinesRg   (   RV   t   dialog(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRp     s    



c         C   s   t  |  ƒ } | i ƒ  d S(   s/   Show Windows current user environment variablesN(   R   RÏ  (   RV   t   dlg(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR  '  s    c         C   s˜   | d j om |  i t ƒ t i |  |  i d ƒ t i ƒ  |  i d ƒ d ƒ } |  i t ƒ | o t	 | ƒ } qz d Sn |  i
 ƒ  o | |  _ n d S(   s   Load sessions   Open sessions   Spyder sessionss    (*.session.tar)N(   Rm   Rù   R„   R   t   getOpenFileNameRk   R?   t   getcwduRf   R»   t   closeRŠ   (   RV   t   filename(    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR5   ,  s    	c         C   s}   |  i  t ƒ t i |  |  i d ƒ t i ƒ  |  i d ƒ d ƒ } |  i  t ƒ | o$ |  i ƒ  o t	 | ƒ |  _
 qy n d S(   s!   Save session and quit applications   Save sessions   Spyder sessionss    (*.session.tar)N(   Rù   R„   R   t   getSaveFileNameRk   R?   RÔ  Rf   RÕ  R»   R‹   (   RV   RÖ  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR6   ;  s    	(0   t   __name__t
   __module__t   __doc__R1   Rg   R,   R0  Rm   R\   Rd   R˜   RX  RZ  Rc  Rø   Rò   Ro  R>  Rb  R‚   R}  R  R„   Rû   Rþ   Ré   Rç   R9  Rë   R  R  R/  R®  RÖ   RØ   RÚ   RÜ   R    R"  Rù   Rº   R  Rj   Ri   Rp   R  R5   R6   (    (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRO   „   sp   [		ÿ ˜		
				%						#					'													
	c    
         sÀ  d d k  }  |  i d ƒ } | i d d d d d d	 d
 t d d ƒ| i d d d d
 d d d ƒ| i d d d d d	 d
 t d d ƒ| i d d d d d
 d d d ƒ| i d d d d d
 d d d ƒ| i d d d d d
 d d d ƒ| i d  d! d d" d d	 d
 t d d# ƒ| i d$ d% d d& d d	 d
 t d d' ƒ| i d( d) d d* d d	 d
 t d d+ ƒ| i d, d d- d d	 d
 t d d. ƒ| i d/ d0 d d1 d d	 d
 t d d2 ƒ| i d3 d d4 d d	 d
 t d d5 ƒ| i ƒ  \ } } g  ‰ g  ‰ g  ‰  | i oX ˆ i d& ƒ ˆ d6 g 7‰ ˆ  i d7 ƒ | i p ˆ i d8 ƒ n t | _	 t | _
 n | i	 oH | i p ˆ i d" ƒ n ˆ d9 d: d; d< g 7‰ ˆ  i d= d> g ƒ n | i
 oU | i p$ ˆ i d* ƒ ˆ d9 d; d< g 7‰ n ˆ d? g 7‰ ˆ  i d> d9 d? g ƒ n | i o{ xx | i i d@ ƒ D]` } | i ƒ  } y, t | ƒ ˆ i | ƒ ˆ  i dA | ƒ Wq+t j
 o dB | GHq+q+Xq+Wn ‡ ‡  ‡ f dC †  } | i o | d- dD ƒ n | i d j	 o | i } dE } n t i i dF ƒ } dF } | oC t i | ƒ o3 ˆ  i dG | ƒ ˆ i | dH t i | ƒ ƒ n d } ˆ o; dI t ˆ ƒ dJ j o dK n d } | dL i ˆ ƒ 7} n d }	 ˆ o dL i ˆ ƒ }	 n ˆ  |	 | | f S(M   sD   
    Convert options into commands
    return commands, message
    iÿÿÿÿNRY   s   -ls   --lightt   destRc   Rº  t
   store_truet   defaultt   helps(   Light version (all add-ons are disabled)s	   --sessiont   startup_sessionR    s   Startup sessions   --resetR7   s   Reset to default sessions   -ws	   --workdirR_   s   Default working directorys   -ss	   --startupt   startups(   Startup script (overrides PYTHONSTARTUP)s   -ms	   --modulest   module_lists#   Modules to import (comma separated)s   -bs   --basicst   basicssG   Import numpy, scipy and matplotlib following official coding guideliness   -as   --allt   allsE   Option 'basics', 'pylab' and import os, sys, re, time, os.path as osps   -ps   --pylabt   pylabs7   Import pylab in interactive mode and add option --numpys   --mlabt   mlabs8   Import mlab (MayaVi's interactive 3D-plotting interface)s   -ds   --debugRa   s$   Debug mode (stds are not redirected)s	   --profileRb   s?   Profile mode (internal test, not related with Python profiling)s*   import (sys, time, re, os, os.path as osp)s(   import sys, time, re, os, os.path as ospR?   s   import numpy as nps   import scipy as sps   import matplotlib as mpls   import matplotlib.pyplot as plts   import numpy as np, scipy as sps2   import matplotlib as mpl, matplotlib.pyplot as plts   from pylab import *t   ,s   import s"   Warning: module '%s' was not foundc            s5   ˆ i  | ƒ ˆ i  d |  | f ƒ ˆ  i  |  ƒ d  S(   Ns   %s (%s)(   Rý   (   R@   t   command(   t   intitlelistR]   t   messagelist(    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt	   addoption¥  s    s!   from enthought.mayavi import mlabs   Startup scriptt   PYTHONSTARTUPs   execfile(r"%s")s    (%s)s
   Option%s: i   t   ss   , (   t   optparset   OptionParsert
   add_optionR„   Rm   t
   parse_argsRã  Rý   Rf   Râ  Rä  t   extendRá  t   splitt   stript
   __import__R)  Rå  Rà  R?   t   environR÷   R:   RD   t   basenameR-  R;   (
   Rí  t   parserR   t   _argst   modRê  RÖ  t   msgR^   RŒ   (    (   R]   Ré  Rè  s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   get_optionsG  s¼    

	


	

	
 
	
	
"$c             s]  t  t i ƒ ‰  d t  f ‡  f d †  ƒ  Y}  d d k l } |  | _  t ƒ  \ } } } } g  d „ } | t _ d } d } t i	 d d ƒ o„ t
 i ƒ  i ƒ  }	 t ƒ  } | i d |	 t i t i ƒ ƒ o ˆ  i | ƒ n t ƒ  } | i d	 |	 t ƒ o ˆ  i | ƒ qn y d d
 k l }
 d |
 _ Wn t j
 o n Xˆ  | | | | | | f S(   s.   Initialize Qt and collect command line optionst   FakeQApplicationc              s,   e  Z d  Z ‡  f d †  Z e d „  ƒ Z RS(   s   Spyder's fake QApplicationc            s
   ˆ  }  d  S(   N(    (   RV   t   args(   t   app(    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR\   Î  s    c           S   s   d S(   s5   Do nothing because the Qt mainloop is already runningN(    (    (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRÏ  Ð  s    (   RØ  RÙ  RÚ  R\   t   staticmethodRÏ  (    (   Rþ  (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRü  Ì  s   iÿÿÿÿ(   t   QtGuic         S   s   d  S(   N(    (   R.  (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   fake_sys_exitÝ  s    RÐ   t   translationt   qt_t   spyder_(   t	   ETSConfigt   qt4N(   R   R<   t   argvRP   R   Rû  t   exitRm   R0   R÷   R   Rª  R@   R   R  R   R’  t   TranslationsPatht   installTranslatorR2   t   enthought.etsconfig.apiR  t   toolkitR)  (   Rü  R   R]   RŒ   R^   R   R  t   qt_translatort   app_translatort   localeR  (    (   Rþ  s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt
   initializeÇ  s2    					c            s£  t  | | | | ƒ ‰ | i p
 | i oNd d k l } t i d d ƒ | d <t | d <d | d <t t	 ƒ  i
 ƒ  i t	 ƒ  i ƒ  ƒ i ƒ  ƒ } t i d d	 | ƒ | d
 <d d k l ‰ d d k l ‰ d d k ‰ d ˆ i f ‡ ‡ ‡ ‡ f d †  ƒ  Y}	 |	 ˆ _ y d d k l ‰  Wn% t j
 o }
 t |
 IJd ‰  n Xd ˆ i f ‡ ‡ ‡  ‡ f d †  ƒ  Y‰ ˆ ˆ _ n ˆ i ƒ  ˆ i ƒ  ˆ i ƒ  |  i ƒ  ˆ S(   s|   
    Create and show Spyder's main window
    Patch matplotlib for figure integration
    Start QApplication event loop
    iÿÿÿÿ(   t   rcParamst   figures	   font/sizes	   font.sizet   interactivet   Qt4Aggt   backendt	   facecolors   figure.facecolor(   t   backend_qt4(   RŒ  Nt   FigureManagerQTc              s&   e  Z d  Z ‡ ‡ ‡ ‡  f d †  Z RS(   s0   
            Patching matplotlib...
            c            s7  ˆ i  o d ˆ i ƒ  GHn ˆ i i ˆ  | | ƒ | ˆ  _ t i d d t ƒ } | o ˆ ˆ | | ƒ ˆ  _ n! t	 ƒ  ˆ  _ ˆ  i i
 d | ƒ ˆ  i i t i ƒ t i ˆ i d d d ƒ } ˆ  i i t | ƒ ƒ ˆ  i i t i ƒ ˆ  i i ƒ  t i ˆ  i t d ƒ ˆ  i ƒ t ˆ  i _ ˆ  i ˆ  i ˆ  i ƒ ˆ  _ ˆ  i i ˆ  i ƒ t i ˆ  i t d	 ƒ ˆ  i i ƒ  i  ƒ | p ˆ  i i! ˆ  i ƒ n ˆ i" ƒ  o< | o$ ˆ i# ˆ  i ƒ ˆ i$ i% i ƒ  qÞˆ  i i& ƒ  n ‡  f d
 †  ˆ  i i' _& ˆ  i i' i( d ƒ ˆ  i _) ‡  f d †  } ˆ  i i' i* | ƒ d  S(   Ns   FigureManagerQT.%sR  t   dockables	   Figure %dt   datapatht   imagess   matplotlib.pngs   destroyed()R^   c             s   ˆ  i  i ƒ  S(    (   RÎ   R   (   Rý  (   RV   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRW   E  s    io   c            s%   ˆ  i  d  j o ˆ  i  i ƒ  n d  S(   N(   R—   Rm   t   update(   t   fig(   RV   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   notify_axes_changeI  s     (+   t   DEBUGt   fn_namet   FigureManagerBaseR\   t   canvasR0   R÷   Rf   RÎ   R   Rz   t   setAttributeR   t   WA_DeleteOnCloseR:   R;   R  R{   R   t   setFocusPolicyt
   ClickFocusRY  R   Rñ   R   t   _widgetclosedR„   t   _destroyingt   _get_toolbarR—   R’   Rõ   Rö   Rü   t   is_interactiveRþ   Rr   R  R   R  t   add_subplott   axest   add_axobserver(   RV   R"  t   numR  t   imageR  (   R  RS   RŒ  RÐ   (   RV   s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR\     sB    
	
(   RØ  RÙ  RÚ  R\   (    (   RÐ   RŒ  RS   R  (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR    s   (   t   figure_editt   NavigationToolbar2QTc              sJ   e  Z ‡  ‡ f d  †  Z ‡ f d †  Z ‡  ‡ f d †  Z ‡ f d †  Z RS(   c            sM   t  ˆ  |  ƒ i ƒ  ˆ o/ |  i t d ƒ d |  i ƒ } | i d ƒ n d  S(   Ns   options.svgt	   Customizes$   Edit curves line and axes parameters(   R[   t   _init_toolbarRê   R.   t   edit_parametersR+  (   RV   t   a(   R1  R0  (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR3  Y  s
    c            s   ˆ  o ˆ  |  i  |  ƒ n d  S(   N(   R"  (   RV   (   R0  (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR4  _  s    c            s7   ˆ i  i i ƒ  t ˆ  |  ƒ i ƒ  ˆ i  i i ƒ  d  S(   N(   Rr   R  RÄ  R[   t   save_figureRÃ  (   RV   (   R1  RÐ   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR6  b  s    c            s;   ˆ  i  o d G| GHn |  i ƒ  i t ˆ  i | ƒ ƒ d  S(   Ns
   Set cursor(   R  t   parentt	   setCursorR	   t   cursord(   RV   t   cursor(   R  (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt
   set_cursorf  s    
 (   RØ  RÙ  R3  R4  R6  R;  (    (   R1  R  R0  RÐ   (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyR1  X  s   (   RO   Rä  Râ  RS   R  R0   R÷   Rf   R»   R   t   palettet   colort   backgroundRoleR@   t   matplotlib.backendsR  R  RŒ  R  t   spyderlib.widgets.figureoptionsR0  R)  R‘   Rm   R1  RX  R   RZ  RÏ  (   Rþ  R  R  R]   RŒ   R^   R   R  t   bgcolorR  t   error(    (   R0  RÐ   R  RS   RŒ  R1  s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt
   run_spyderú  s4    

*(7	
(



c           C   s%   t  i t ƒ o t i t ƒ n d  S(   N(   R:   RD   RU   R?   t   remove(    (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   __remove_temp_sessions  s    c          C   sm  t  ƒ  t ƒ  }  |  d } | i o t ƒ  t i d t ƒ n | i } xt | t ƒ o| on t	 | ƒ } | t
 j o t  ƒ  n | d j o t i ƒ  qÐ | GHt i d d d t i | ƒ | f ƒ n t |  Œ  } | i } | i } | d j	 o | t
 j o
 t
 } qn | oG t | ƒ } | d j	 o* t i d d d t i | ƒ | f ƒ qdqK qK Wd S(   s   Session manageriÿÿÿÿt   saves   Load sessionu6   <b>Unable to load '%s'</b><br><br>Error message:<br>%ss   Save sessionu6   <b>Unable to save '%s'</b><br><br>Error message:<br>%sN(   RE  R  R7   R0   t   reset_to_defaultsRf   Rß  R<  t
   basestringR5   RU   Rm   t   load_from_iniR   t   criticalR:   Rö  RC  RŠ   R‹   R6   (   Rý  R   RŠ   t   error_messaget
   mainwindowR‹   (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyRÐ   w  sB    	

	 		t   __main__(e   RÚ  R<   R?   R¨  RB   RL   R'  t   os.pathRH   R:   RÌ  t   stdoutR‘   t   PyQt4.QtGuiR   R   R   R   R   R   R   R   R	   R
   R   t   PyQt4.QtCoreR   R   R   R   R   R   R   R   R   R   R   t	   spyderlibR   t   spyderlib.utilsR   t   spyderlib.utils.environR   R)  Rm   t   spyderlib.widgets.pathmanagerR   t   spyderlib.plugins.consoleR   t   spyderlib.plugins.workdirR   t   spyderlib.plugins.editorR   t   spyderlib.plugins.historyR   t   spyderlib.plugins.docviewerR   t   spyderlib.plugins.workspaceR    t   spyderlib.plugins.explorerR!   t!   spyderlib.plugins.externalconsoleR"   t   spyderlib.plugins.findinfilesR#   t   spyderlib.plugins.pylintguiR$   t   spyderlib.utils.qthelpersR%   R&   R'   R(   R)   R*   R+   R,   R-   t   spyderlib.configR.   R/   R0   R1   R2   R3   t   spyderlib.utils.programsR4   t   spyderlib.utils.iofuncsR5   R6   R7   RU   RJ   RN   t
   STYLESHEETRO   Rû  R  RC  RE  RÐ   RØ  (    (    (    s@   P:\graphics\Tools\Python26\lib\site-packages\spyderlib\spyder.pyt   <module>   sT   H	LL@.		.ÿ ÿ ÿ Æ	€	3	y		+