You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: binpython.py
+79-25Lines changed: 79 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
####################################
11
11
#build configure
12
12
13
-
ver="0.43"
13
+
ver="0.44"
14
14
15
15
libs_warning="1"
16
16
#1 is ture 0 is false.
@@ -20,7 +20,7 @@
20
20
releases_ver="offical"
21
21
importlibs="os"
22
22
cloudrunver="1.04"
23
-
cmdver="0.06"
23
+
cmdver="0.08"
24
24
#Imported library name, please use "importlibs="<library name>" instead of "import <library name>"
25
25
#Please note: The "importlibs" function does not support loading functions (such as from xxxx import xxxx, if necessary, please write it in the following location. However, please note that this operation may have the risk of error reporting, please report issues or solve it yourself
26
26
#xxxxxxxxxxxxxx
@@ -213,7 +213,8 @@ def cloudruncli():
213
213
editsource -- Set up custom sources and save via configuration files
214
214
shell -- Go to BINPython Shell
215
215
version -- CloudRun Version
216
-
help -- show this help
216
+
help -- show this help
217
+
exit -- quit cloudrun
217
218
""")
218
219
ifcloudruncli=='get':
219
220
print("Get apps/scripts in software repository")
@@ -241,6 +242,8 @@ def cloudruncli():
241
242
binpython_shell()
242
243
ifcloudruncli=='version':
243
244
print(f"CloudRun-{cloudrunver} BINPython version By:Edward Hsing(Xing Yu Jie) AGPL-3.0 LICENSE")
print('Unable to switch to BINPython userprofile: Default user not found. To use a temporary directory user, use "adddefaultuser" to create a default user')
355
+
print('Unable to switch to BINPython userprofile: Default user not found. To use a temporary directory user, use "adduser" and "setdefaultuser <username>" to create a user and set default user')
print('Switch User Error, please see the log "binpython_user_error.log" for details')
475
+
f=open("binpython_user_error.log", "a")
476
+
f.write('Switch User Error: '+time.strftime('%m-%d-%Y %H:%M:%S',time.localtime(time.time())) +' '+str(error) +'\n')
464
477
defdo_install(self, arg):
465
478
'Install package'
466
479
try:
@@ -580,6 +593,50 @@ def do_editsouce(self, arg):
580
593
'To change the software source, usage: editsouce <souceurl>. Please pay attention to the software source specification, otherwise you will get an error. <souceurl> like this: http://xxx.com/'
'Create a temporary user, logging out will destroy the user space'
598
+
print("You are trying to create a temporary user, this user space is only used for demonstration, testing and learning. When this user is logged out, all user data will also be deleted")
599
+
print("..........")
600
+
time.sleep(0.3)
601
+
print('Please note: the username of the temporary user is "tempuser" and the "tempuser" user is being created')
'Initialize the custom CMD command file. After opening, you can use the "def do_cloudrunget(self, arg):" code to write your own commands through the "/binpython_files/cmd/cmd.py" file.'
f.write('#Initialize the custom CMD command file, you can write your own command through the "def do_cloudrunget(self, arg):" code, please refer to "https://docs.python.org/3/library/cmd.html" for details')
635
+
except(Exception, BaseException) aserror:
636
+
print('Can not initcmd, please see the log "binpython_cmd_error.log" for details')
0 commit comments