Skip to content

Commit fa9dd68

Browse files
committed
0.25-dev
0.25-dev add ui template
1 parent 31c0128 commit fa9dd68

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

binpythonfull.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
####################################
1010
#build configure
1111

12-
ver="0.23-releases-full"
12+
ver="0.25-devbuild-full"
1313

1414
libs_warning="1"
1515
#1 is ture 0 is false.
@@ -114,10 +114,10 @@ def self_import(name):
114114
print("Warning: Some file manipulation libraries for BINPython do not exist, such as filecmp and tempfile. Because they weren't built when they were built. If you need to fix this warning, please complete the support libraries imported in the source code when building (use pip or build it yourself), if your system does not support these libraries, you can remove or change this prompt in the source code and rebuild")
115115
print("")
116116
#main BINPython
117-
118-
def binpython_shell():
117+
def binpython_welcome_text():
119118
print("BINPython " + ver + "-" + releases_ver + " (Python Version:" + platform.python_version() + ")By:XINGYUJIE https://github.com/xingyujie/binpython[Running on " + platform.platform() + " " + platform.version() + "]")
120119
print('Type "about", "help", "copyright", "credits" or "license" for more information.')
120+
def binpython_shell():
121121
try:
122122
while True:
123123
pycmd=input(">>> ")
@@ -185,16 +185,24 @@ def binpython_shell():
185185
print("The parameters you use do not exist or are not entered completely, please check help! ! ! ! !")
186186
for opt_name,opt_value in opts:
187187
if opt_name in ('-h','--help'):
188-
189-
print(helpinfobase)
190-
if buildversion == "plus":
191-
print("Additional options for the plus version")
192-
print(helpinfoplus)
188+
try:
189+
f = open("binpython_config/help.txt",encoding = "utf-8")
190+
print(f.read())
191+
except:
192+
print(helpinfobase)
193+
if buildversion == "plus":
194+
print("Additional options for the plus version")
195+
print(helpinfoplus)
193196
sys.exit()
194197
if opt_name in ('-v','--version'):
195-
print("BINPython " + ver + "-" + releases_ver + " By:XINGYUJIE[https://github.com/xingyujie/binpython] AGPL-3.0 LICENSE Release")
196-
print("Python " + platform.python_version())
197-
exit()
198+
try:
199+
f = open("binpython_config/version.py",encoding = "utf-8")
200+
exec(f.read())
201+
print("Powered by: BINPython[https://github.com/xingyujie/binpython] AGPL 3.0")
202+
except:
203+
print("BINPython " + ver + "-" + releases_ver + " By:XINGYUJIE[https://github.com/xingyujie/binpython] AGPL-3.0 LICENSE Release")
204+
print("Python " + platform.python_version())
205+
sys.exit()
198206
if opt_name in ('-f','--file'):
199207
file = opt_value
200208
f = open(file,encoding = "utf-8")
@@ -235,7 +243,6 @@ def show():
235243
if opt_name in ('-i','--idle'):
236244
import tkinter as tk
237245
from tkinter import *
238-
import os
239246
master = tk.Tk()
240247
master.title("BINPython IDLE")
241248

@@ -390,4 +397,10 @@ def examplerequests():
390397
binpython_shell()
391398
sys.exit()
392399
#go main shell
400+
try:
401+
f = open("binpython_config/welcome.py",encoding = "utf-8")
402+
exec(f.read())
403+
print("Powered by: BINPython[https://github.com/xingyujie/binpython] AGPL 3.0")
404+
except:
405+
binpython_welcome_text()
393406
binpython_shell()

0 commit comments

Comments
 (0)