예제 #1
0
파일: main.py 프로젝트: zelton/hasher
def main():
    if config.is_dev_environment():
        run(config.get_name() + ' [dev environment]')
    else:
        try:
            run(config.get_name())
        except:
            tk.messagebox.showerror(config.get_name(), 'Could not run the application')
예제 #2
0
 def show_img_pre(self):
     filename = config.get_name()
     if filename.any():
         if filename.dtype == "float32":
             filename = filename.astype(np.uint8)
             # 进制转换
         cv2.imshow("img_show", filename)
         cv2.waitKey(0)
예제 #3
0
파일: cal.py 프로젝트: joandrsn/moodle-ics
def get_new_name(originalname, courseid):
    shortname = config.get_name(courseid)

    if courseid != "":
        config.store_name(originalname, courseid)

    if shortname is not None:
        return shortname
    else:
        return originalname
예제 #4
0
    def show_img_pre(self):

        filename = config.get_name()
        if filename.any() == True:
            debug.img_show(filename)
예제 #5
0
파일: fetch.py 프로젝트: gitgaoqian/Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author:ros
import config
import time
b = 0
# 查看修改后的全局变量
while b < 20:
    b = b + 1
    time.sleep(1)
    print(config.get_name())
예제 #6
0
import config
from change import change_name

import time

change_name('12')

name = config.get_name()
print(name)
# config.set_name('new_name')
# print(config.get_name())
# time.sleep(1)

# change_name()
예제 #7
0
파일: uninstall.py 프로젝트: zelton/hasher
import winreg
import config

# \HKEY_CURRENT_USER\Software\Classes\*\shell\Hasher\command

registry_title = config.get_name()

environmentKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r'Software\Classes\*\shell', 0, winreg.KEY_ALL_ACCESS)
applicationKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r'Software\Classes\*\shell\%s' % registry_title, 0, winreg.KEY_ALL_ACCESS)

winreg.DeleteKey(applicationKey, 'command')
winreg.DeleteKey(environmentKey, 'Hasher')