Skip to content

Commit 2399aa2

Browse files
committed
update new
update more
1 parent cfe342c commit 2399aa2

File tree

3 files changed

+47
-44
lines changed

3 files changed

+47
-44
lines changed

binpythonfull.py

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
####################################
1111
#build configure
1212

13-
ver="0.31-canary-full"
13+
ver="0.32-build-full"
1414

1515
libs_warning="1"
1616
#1 is ture 0 is false.
@@ -29,28 +29,30 @@
2929
#xxxxxxxxxxxxxx
3030
####################################
3131
#BINPython function and variable START
32-
def binpython_ver():
33-
print(ver)
32+
class binpythoninfo:
33+
def ver():
34+
print(ver)
3435

35-
def binpython_buildversion():
36-
print(buildversion)
36+
def buildversion():
37+
print(buildversion)
3738

38-
def binpython_libs_warning():
39-
print(libs_warning)
39+
def libs_warning():
40+
print(libs_warning)
4041

41-
def binpython_releases_ver():
42-
print(releases_ver)
42+
def releases_ver():
43+
print(releases_ver)
4344

44-
def binpython_build_importlibs():
45-
print(importlibs)
45+
def build_importlibs():
46+
print(importlibs)
4647
#get system info(windows or linux ...)
4748
import platform
4849
sys = platform.system()
4950
#if system is windows, then enable setwindowtitle() function
5051
if sys == "Windows":
51-
def setwindowtitle(titlename):
52-
import ctypes
53-
ctypes.windll.kernel32.SetConsoleTitleW(titlename)
52+
class binpythonwin:
53+
def setwindowtitle(titlename):
54+
import ctypes
55+
ctypes.windll.kernel32.SetConsoleTitleW(titlename)
5456
#print binpython all configure function
5557
def binpythonallconf():
5658
print("ver: " + ver + " buildversion: " + buildversion + " libs_warning settings:" + libs_warning + " releases full version: " + releases_ver + " custom library that has been build: " + importlibs)
@@ -525,7 +527,7 @@ def main():
525527
sys.exit()
526528
#helloworld
527529
if examplenum == "5":
528-
setwindowtitle("Hi, Welcome to BINPython")
530+
binpythonwin.setwindowtitle("Hi, Welcome to BINPython")
529531
name = input("hi...What's your name:")
530532
print("hi," + name)
531533
sys.exit()
@@ -540,11 +542,11 @@ def examplerequests():
540542
if examplenum == "7":
541543
print("BINPython() function example")
542544
import time
543-
binpython_ver()
544-
binpython_buildversion()
545-
binpython_libs_warning()
546-
binpython_build_importlibs()
547-
setwindowtitle("Title name(str)")
545+
binpythoninfo.ver()
546+
binpythoninfo.buildversion()
547+
binpythoninfo.libs_warning()
548+
binpythoninfo.build_importlibs()
549+
binpythonwin.setwindowtitle("Title name(str)")
548550
binpythonallconf()
549551
time.sleep(5)
550552
#main shell
@@ -583,31 +585,32 @@ def TestPlatform():
583585
pass
584586
#binpython custom function plugin
585587
#plugin start
586-
plugin_name = ''
587-
def binpython_plugin_name(key):
588-
global plugin_name
589-
plugin_name = key
590-
#print(plugin_name)
591-
plugin_anthor = ''
592-
def binpython_plugin_anthor(key):
593-
global plugin_anthor
594-
plugin_anthor = key
595-
#description
596-
plugin_description = ''
597-
def binpython_plugin_description(key):
598-
global plugin_description
599-
plugin_description = key
600-
def binpython_plugin_showinfo():
601-
print("BINPython Plugin Info:")
602-
print("Plugin Name: " + plugin_name)
603-
print("Plugin Anthor: " + plugin_anthor)
604-
print("Plugin description: " + plugin_description)
588+
class binpythonplugin:
589+
plugin_name = ''
590+
def name(key):
591+
global plugin_name
592+
plugin_name = key
593+
#print(plugin_name)
594+
plugin_anthor = ''
595+
def anthor(key):
596+
global plugin_anthor
597+
plugin_anthor = key
598+
#description
599+
plugin_description = ''
600+
def description(key):
601+
global plugin_description
602+
plugin_description = key
603+
def showinfo():
604+
print("BINPython Plugin Info:")
605+
print("Plugin Name: " + plugin_name)
606+
print("Plugin Anthor: " + plugin_anthor)
607+
print("Plugin description: " + plugin_description)
605608

606609

607-
plugin_loadmain = ''
608-
def binpython_plugin_loadmain(key):
609-
global plugin_loadmain
610-
plugin_loadmain = key
610+
plugin_loadmain = ''
611+
def binpython_plugin_loadmain(key):
612+
global plugin_loadmain
613+
plugin_loadmain = key
611614
#binpython_plugin_loadmain("function.py")
612615
try:
613616
f = open("binpython_plugin/pluginconfig.binpython",encoding = "utf-8")

binpythonfull.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ exe = EXE(pyz,
3838
target_arch=None,
3939
codesign_identity=None,
4040
entitlements_file=None,
41-
icon='C:/Users/xingy/Documents/GitHub/binpython/py.ico')
41+
icon='py.ico')
File renamed without changes.

0 commit comments

Comments
 (0)