示例#1
0
    def __init__(self, *args, **kargs):
        super().__init__(*args, **kargs)

        # remove "Close" button
        self.interface.menu.remove_widget(self.interface.menu.ids.button)
        self.register_type("password", SettingPassword)
        self.register_type("start_server_button", StartServerSettingButton)
        self.register_type("show_policy_button", ShowPolicySettingButton)

        Config.setdefaults(
            "pythonhere", {"username": "******", "password": "", "port": 8022}
        )
        self.add_json_panel("PythonHere", Config, data=SETTINGS_HERE)
        self.add_kivy_panel()
        self.add_json_panel("Privacy Policy", Config, data=SETTINGS_PRIVACY)
示例#2
0
class onlyScreen(FloatLayout):
  Config.setdefaults("account", {"user": "","password": ""})
  saveuser = Config.get("account", "user")
  savepassword = Config.get("account", "password")
  user = ObjectProperty()
  password = ObjectProperty()
  check = ObjectProperty()

  def sendwifi(self):
    if self.check.active == True:
      Config.set("account", "user", self.user.text)
      Config.set("account", "password", self.password.text)
      Config.write()

    url1 = "http://fju1.auth.fju.edu.tw/auth/index.html/u"
    url2 = "http://fju2.auth.fju.edu.tw/auth/index.html/u"
    url3 = "http://fju3.auth.fju.edu.tw/auth/index.html/u"
    url4 = "http://fju4.auth.fju.edu.tw/auth/index.html/u"
    url5 = "http://fju5.auth.fju.edu.tw/auth/index.html/u"
    url6 = "http://fju6.auth.fju.edu.tw/auth/index.html/u"
    senddata = "?user="******"&password="******"FJU Wi-Fine :)", content=Label(text="FJU Wi-Fi Data Send Success!!"),size_hint=(None, None), size=(450,300))

    for i in range(0,2):
      UrlRequest(url1+senddata)
      UrlRequest(url2+senddata)
      UrlRequest(url3+senddata)
      UrlRequest(url4+senddata)
      UrlRequest(url5+senddata)
      UrlRequest(url6+senddata)

    popup.open()
示例#3
0
    def add_kivy_panel(self):
        from kivy import kivy_data_dir
        from kivy.config import Config
        from os.path import join

        import os
        Config.setdefaults(
            'app', {
                'bool': True,
                'numeric': 10,
                'options': 'option2',
                'string': 'some_string',
                'path': '/some/path'
            })

        self.add_json_panel('Retrofit', Config,
                            join(os.getcwd(), 'retrofit.json'))
        self.add_json_panel('Unretrofit', Config,
                            join(os.getcwd(), 'retrofit.json'))
        self.add_json_panel('Lean Analysis', Config,
                            join(os.getcwd(), 'retrofit.json'))
示例#4
0
from kivy.properties import ListProperty, NumericProperty, StringProperty
from kivy.clock import Clock
from kivy.config import Config
from kivy.factory import Factory
from ConfigParser import NoOptionError
from os.path import join
from epub2txt import dump
import html2text

__version__ = '0.1'

Config.setdefaults(
    'Kpritz', {
        'speed': 260,
        'lastbook': '',
        'bg_color': '1 1 1 1',
        'fg_color': '0 0 0 1',
        'hl_color': '1 0 0 1',
        'text_size': '100',
        'default_path': '.',
    })

KV = '''
#:import Factory kivy.factory.Factory
#:import join os.path.join
#:import abspath os.path.abspath
#:import log10 math.log10
#:import get_hex_from_color kivy.utils.get_hex_from_color

<WordPart@ColoredLabel>:
    size_hint: None, None
    size: root.texture_size