MOB Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 3

DownloadMOB Manual
Open PDF In BrowserView PDF
M.O.B
A 3-level Production
Download.

have been built without the guidance provided by the Stack Exchange community.
and this tutorial:

https://github.com/3LP/M.O.B

What is M.O.B? M.O.B in it’s original
form is an IDE that combines both a computer terminal and a source code editor in one
window. We made M.O.B to give scientists
with some programming skills, a basic GUI
that they can use as a foundation to make
their own apps.
M.O.B is written in Python because it can
be used to make many different applications,
and it is one of the easier programming languages to pick up in order to do computing
for science. M.O.B uses Gtk3+ because there
is great documentation for GUI design in
Python, with this API. Gtk3+ allows M.O.B
to be cross-platform between Mac and Linux
machines. For Mac users, we highly recommend using homebrew and pypi to manage
M.O.B core dependencies.
Dependencies. Vte, Gtk3, GLib, Gdk,
GObject, Pango, PangoCairo, numpy, GtkSource, GnomeCommon, Gnome-doc-util,
GnomeIconTheme, py2app.
Development.
M.O.B could not

http://www.dreamincode.net/forums/topic/
150162-a-simple-text-editor-in-pythonpygtk/

The following link is a valuable resource when you are trying to incorporate your own app into M.O.B: https:
//python-gtk-3-tutorial.readthedocs.org/en/
latest/

Why M.O.B? Making apps in Python
is not difficult, however figuring out how to
make a GUI for the first time will be . First,
you want to figure out what platform you
want your app to run on. Next, you must research APIs that will satisfy your need’s best.
Last, you have to write the code for your app.
There is a lot of unnecessary groundwork that
you must do, M.O.B is here so you don’t have
to start from scratch. M.O.B is provided with
a tutorial so that developers can have an understanding of it’s original structure. The tutorials are there to get you up to speed on the
layout of code for a GUI in Python, so that
you can customize M.O.B to meet your computational desires.

Figure 1. M.O.B screenshot.

1

IDE M.O.B Tutorial
import os , s y s
from g i . r e p o s i t o r y
from g i . r e p o s i t o r y
from g i . r e p o s i t o r y
from g i . r e p o s i t o r y

import
import
import
import

Gtk , Vte , Pango , PangoCairo
GLib , Gdk
GObject
GtkSource

Figure 2. Minimal dependencies for the M.O.B IDE. If you are interested in removing
these from M.O.B to replace with your own app, you will not need GtkSource.
Before the class MainWindow is defined, we need to declare any classes that you will
need to build your app. For the IDE M.O.B, below are the classes that we need.
S t a t u s B a r = Gtk . S t a t u s b a r ( )
s o u r c e = GtkSource . View ( )
buffer = source . get buffer ()
t e r m i n a l = Vte . Terminal ( )
t e x t v i e w = Gtk . TextView ( )
e n t r y = Gtk . Entry ( )
menu = Gtk . MenuBar ( )
f i l e m e n u = Gtk . Menu ( )
s c r o l l e d w i n d o w 1 = Gtk . ScrolledWindow ( )
vpaned = Gtk . VPaned ( )
g r i d = Gtk . Grid ( )

Figure 3. Declaring instances of required classes
We have set the class MainWindow to inherit functions from Gtk.Window. This class is
the foundation of the GUI. It contains the methods necessary to recreate classic GUI functionality; i.e. it creates a window with a menubar, that can perform basic Open/Save/SaveAs/Exit
functions.
c l a s s MainWindow ( Gtk . Window ) :
file tag = ”’’
# Name o f F i l e f o r Open/ Save / SaveAs F u n c t i o n s
d e f o p e n f i l e ( menuitem , user param ) :
# Code s p e c i f i c t o your a p p l i c a t i o n
d e f s a v e f i l e ( menuitem , user param ) :
# Code s p e c i f i c t o your a p p l i c a t i o n
d e f s a v e f i l e a s ( menuitem , user param ) :
# Code s p e c i f i c t o your a p p l i c a t i o n
def entry go ( s e l f , widget ) :
# Automatic code g e n e r a t o r
# Convert Latex t o f o r m u l a s i n t o Python and/ o r C f o r l o o p s
def
init ( self ):
Gtk . Window .
init ( self )
# Window t i t l e and I c o n

2

s e l f . s e t t i t l e ( ”M.O. B” )
s e l f . c o n n e c t ( ” d e l e t e −e v e n t ” , Gtk . m a i n q u i t )
# IDE M.O. B s p e c i f i c code
#S t a r t i n g Window
window = MainWindow ( )
Gtk . main ( )

Figure 4. MainWindow Class.
Most of the code in figure 4 is missing, however this figure shows the basic structure for a
M.O.B app. See the source code on IDE M.O.B or your favorite IDE of choice. The original
M.O.B developer just wanted to write code in an app that combined a terminal and a source
editor, in ONE window.
We are currently making an executable icon for Mac, so to use M.O.B you have to open
it using the following terminal command.
python mob . py

3



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 3
Page Mode                       : UseOutlines
Author                          : 
Title                           : 
Subject                         : 
Creator                         : LaTeX with hyperref package
Producer                        : pdfTeX-1.40.14
Create Date                     : 2015:03:24 18:26:28-06:00
Modify Date                     : 2015:03:24 18:26:28-06:00
Trapped                         : False
PTEX Fullbanner                 : This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) kpathsea version 6.1.1
EXIF Metadata provided by EXIF.tools

Navigation menu