/[ascend]/trunk/pygtk/console.py
ViewVC logotype

Contents of /trunk/pygtk/console.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1380 - (show annotations) (download) (as text)
Fri Apr 6 04:07:32 2007 UTC (12 years, 10 months ago) by jpye
File MIME type: text/x-python
File size: 809 byte(s)
Fixed build problem on MinGW GCC 3.4.2
Fixed problem with font in IPython console on Windows
Some attempts to fix problems with FILE* support in Python bindings
gfortran is now the preferred FORTRAN compiler.
Comment out failing FILE* tests for the moment.
1 # CONSOLE ACCESS to ASCEND from PYTHON
2
3 argv=['-gthread','-pi1','In <\\#>:','-pi2',' .\\D.:','-po','Out<\\#>:','-noconfirm_exit']
4 banner = "\n\n>>> ASCEND PYTHON CONSOLE: type 'help(ascpy)' for info, ctrl-D to resume ASCEND"
5 exitmsg = '>>> CONSOLE EXIT'
6
7 import gtk
8 import pango
9 import platform
10
11 if platform.system()=="Windows":
12 FONT = "Lucida Console 9"
13 else:
14 FONT = "Luxi Mono 10"
15
16 import ipython_view
17
18 if ipython_view.IPython:
19 def create_widget(browser):
20 V = ipython_view.IPythonView()
21 V.modify_font(pango.FontDescription(FONT))
22 V.set_wrap_mode(gtk.WRAP_CHAR)
23 V.show()
24 browser.consolescroll.add(V)
25 V.updateNamespace({'browser': browser})
26 else:
27 def create_widget(browser):
28 V = gtk.Label()
29 V.set_text("IPython not found. Is it installed?");
30 V.show()
31 browser.consolescroll.add(V)
32

Properties

Name Value
svn:executable *

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22