def __init__(self, *args, **kwds): super().__init__(496, 573, *args, **kwds) if len(args) > 3: plan_name = args[3] else: plan_name = 0 self.panel = PlannerPanel(self, wx.ID_ANY, context=self.context, plan_name=plan_name) self.add_module_delegate(self.panel) self.panel.Bind(wx.EVT_RIGHT_DOWN, self.on_menu, self.panel) self.panel.list_operations.Bind(wx.EVT_RIGHT_DOWN, self.on_menu, self.panel.list_operations) self.panel.list_command.Bind(wx.EVT_RIGHT_DOWN, self.on_menu, self.panel.list_command) _icon = wx.NullIcon _icon.CopyFromBitmap(icons8_laser_beam_52.GetBitmap()) self.SetIcon(_icon) self.SetTitle(_("Execute Job")) # ========== # MENU BAR # ========== from platform import system as _sys if _sys() != "Darwin": self.preview_menu = wx.MenuBar() self.create_menu(self.preview_menu.Append) self.SetMenuBar(self.preview_menu)
def __init__(self, *args, **kwds): super().__init__(_advanced_width, _default_height, *args, **kwds) # ========== # MENU BAR # ========== from platform import system as _sys if _sys() != "Darwin": self.MoshiController_menubar = wx.MenuBar() self.create_menu(self.MoshiController_menubar.Append) self.SetMenuBar(self.MoshiController_menubar) # ========== # MENUBAR END # ========== self.panel = MoshiControllerPanel(self, wx.ID_ANY, context=self.context) self.add_module_delegate(self.panel) _icon = wx.NullIcon _icon.CopyFromBitmap(icons8_connected_50.GetBitmap()) self.SetIcon(_icon) self.SetTitle(_("Moshiboard-Controller"))
def __init__(self, *args, **kwds): from platform import system as _sys super().__init__( 480, 360, *args, style=wx.CAPTION | wx.CLOSE_BOX | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL | (wx.RESIZE_BORDER if _sys() != "Darwin" else 0), **kwds, ) self.panel = AboutPanel(self, wx.ID_ANY, context=self.context) self.add_module_delegate(self.panel) _icon = wx.NullIcon _icon.CopyFromBitmap(icons8_about_50.GetBitmap()) self.SetIcon(_icon) self.SetTitle(_("About")) name = self.context.kernel.name version = self.context.kernel.version self.SetTitle(_("About %s v%s" % (name, version)))
#! /usr/bin/python3 from os import system, getcwd, path import requests import urllib.request from platform import system as _sys sys = _sys() print(sys) if sys == 'Windows': import win32api import win32gui import win32con # Get current directory folder = getcwd() + '/' print(folder) # URL in json format with latest wallpaper url = 'https://www.bing.com/HPImageArchive.aspx?format=js&n=1' # Get json output resp = requests.get(url) data = resp.json() # Form image url from json img = 'https://www.bing.com' + data['images'][0]['url']