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: os/os.module.go
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ func init() {
17
17
18
18
methods:= []*py.Method{
19
19
py.MustNewMethod("getcwd", getCwd, 0, "Get the current working directory"),
20
+
py.MustNewMethod("getcwdb", getCwdb, 0, "Get the current working directory in a byte slice"),
20
21
py.MustNewMethod("chdir", chdir, 0, "Change the current working directory"),
21
22
py.MustNewMethod("getenv", getenv, 0, "Return the value of the environment variable key if it exists, or default if it doesn’t. key, default and the result are str."),
22
23
py.MustNewMethod("getpid", getpid, 0, "Return the current process id."),
print(bcolors.ENDC+bcolors.BOLD+bcolors.HEADER+"Please check if $HOME will be outputted...")
165
173
print(bcolors.ENDC)
166
174
167
175
ifos.system("pwd") ==0:
176
+
print(bcolors.WARNING+'please manually check if your home directory was outputted above, if it isn\'t, this test is a fail! Result by status code: %s'%"pass")
168
177
_pass('os.system("pwd")')
169
178
passed_tests+=1
170
179
else:
180
+
print(bcolors.WARNING+'please manually check if your home directory was outputted above, if it isn\'t, this test is a fail! Result by status code: %s'%"fail")
0 commit comments