1
#This file is part of QuTIP.
3
# QuTIP is free software: you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation, either version 3 of the License, or
6
# (at your option) any later version.
8
# QuTIP is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with QuTIP. If not, see <http://www.gnu.org/licenses/>.
16
# Copyright (C) 2011, Paul D. Nation & Robert J. Johansson
18
###########################################################################
23
CD_BASE = os.path.dirname(__file__) # get directory of about.py file
24
execfile(os.path.join(CD_BASE, "_version.py")) #execute _version.py file in CD_BASE directory
26
if sys.platform=='darwin':
27
from mac import MsgBox
29
Mversion = "Matplotlib Ver: "+matplotlib.__version__
31
message='QuTIP: The Quantum Optics Toolbox in Python'
32
info='Copyright (c) 2011\nPaul D. Nation & Robert J. Johansson \n\n'+'QuTIP Ver: '+__version__+"\nNumpy Ver: "+numpy.__version__+'\n'+"Scipy Ver: "+scipy.__version__+'\n'+Mversion+"\n\nQuTiP is released under the GPL3.\nSee the enclosed COPYING.txt\nfile for more information."
33
MsgBox(title,message,info)
34
elif sys.platform=='linux2' and os.environ['QUTIP_GRAPHICS']=='YES':
35
from linux import AboutBox
37
elif os.environ['QUTIP_GRAPHICS']=='YES':
40
root.wm_attributes("-topmost", 1)
43
sw = window.winfo_screenwidth()
44
sh = window.winfo_screenheight()
45
rw = window.winfo_reqwidth()
46
rh = window.winfo_reqheight()
49
window.geometry("+%d+%d" % (xc, yc))
50
window.deiconify() # Harmless if window is already visible
53
namelbl = Label(content, text="QuTIP: The Quantum Optics Toolbox in Python")
54
auth1 = Label(content,text="Paul D. Nation")
55
auth2 = Label(content,text="Robert J. Johansson")
56
by = Label(content,text="By: ")
57
spacer1 = Label(content,text="")
58
Qversion = Label(content,text="QuTIP Version: "+__version__)
59
Nversion = Label(content, text="Numpy Version: "+numpy.__version__)
60
Sversion = Label(content, text="Scipy Version: "+scipy.__version__)
64
Mversion = Label(content, text="Matplotlib Version: None")
66
Mversion = Label(content, text="Matplotlib Version: "+matplotlib.__version__)
67
content.grid(column=0, row=0)
68
namelbl.grid(column=6, row=0, columnspan=2)
69
by.grid(column=6,row=1,columnspan=3)
70
auth1.grid(column=6, row=4, columnspan=2)
71
auth2.grid(column=6, row=5, columnspan=2)
72
spacer1.grid(column=6,row=6,columnspan=2)
73
Qversion.grid(column=6,row=7,columnspan=2)
74
Nversion.grid(column=6,row=8,columnspan=2)
75
Sversion.grid(column=6,row=9,columnspan=2)
76
Mversion.grid(column=6,row=10,columnspan=2)
78
root.after(0,center,root) # Zero delay doesn't seem to bother it
81
print "QuTIP: The Quantum Optics Toolbox in Python"
82
print "Copyright (c) 2011"
83
print "Paul D. Nation & Robert J. Johansson"
84
print "QuTIP Version: "+__version__
85
print "Numpy Version: "+numpy.__version__
89
print "Matplotlib Version: None"
91
print "Matplotlib Version: "+matplotlib.__version__
93
if __name__ == "__main__":
94
os.environ['QUTIP_GRAPHICS']='YES'