Пример #1
0
def download_all_songs(self):
    downwin = gui.get("downwin")
    for track in downwin["downloadlist"].items:
        if (track["id"] != ""):
            song_url = "http://pleer.com/browser-extension/files/%s.mp3" % track["id"]
            song_title = "%s - %s" % (mainwin['artistslist'].get_selected_items()[0]["artist"], track["tracks"]) 
            download(downwin, song_url, song_title)
Пример #2
0
def clickevt_album(evt):
    window_name = mainwin['artistslist'].get_selected_items()[0]["artist"] + " - " + mainwin['albumslist'].get_selected_items()[0]["albums"];

    with gui.Window(name='downwin', title=u'' + window_name, height=down_win_height, width=down_win_width, left='323', top='137', bgcolor=u'#F0F0F0', fgcolor=u'#555555', ):
        gui.TextBox(name='downloadpath', value=pref.download_dir, height=form_height, left='5', top='0', width=down_input_width, parent='downwin', )
        gui.Button(label=u'Download all!', name='btn_down_all', height='35px', width=down_btn_width, left=down_input_width, top='5', default=True, fgcolor=u'#EEEEEE', bgcolor=u'#C0392B', parent='downwin', )
        gui.Button(label=u'Download selected!', name='button_down', height='35px', width=down_btn_width, left=down_btn_left, top='5', default=True, fgcolor=u'#EEEEEE', bgcolor=u'#C0392B', parent='downwin', )
        with gui.ListView(name='downloadlist', height=down_lv_songs_height, width=down_win_width, left='0', top=form_height, item_count=10, sort_column=0, onitemselected="print ('sel %s' % event.target.get_selected_items())", ):
            gui.ListColumn(name='trackposition', text='Nr.', width=50)
            gui.ListColumn(name='tracks', text='Tracks', width=300)
            gui.ListColumn(name='tracksfound', text='Tracks found', width=150)
            gui.ListColumn(name='id', text='', width=0)
        gui.Gauge(name='progressbar', height=down_gauge_height, left=0, top=down_gauge_top, width=down_win_width, value=0, )

    downwin = gui.get("downwin")
    downwin['btn_down_all'].onclick = download_all_songs
    plr = pleer.Pleer()
    # print(pleer.Pleer())


    tracksList = []
    (oldtracks_position, oldtracks_json) = mainwin["trackslist"].items()[0]

    tracks = m.get_release_by_id(oldtracks_json["id"], includes=["artists", "recordings"])
    print(tracks)
    for idx, track in enumerate(tracks["release"]["medium-list"][0]["track-list"]):
        print(idx)

        tracksList.append(plr.search(mainwin['artistslist'].get_selected_items()[0]["artist"] + " " + track["recording"]["title"], track))
        
    lv = downwin["downloadlist"]
    lv.items = tracksList
Пример #3
0
	def InitUI(self):
		with gui.Window(name='busqueda', title=u'gui2py Search demo', resizable=True, 
				height='450px', left='580', top='24', 
				width='580px', bgcolor=u'#E0E0E0', image='', tiled=True, 
				modal = True):
			with gui.Panel(name='panel',  sizer='wrap', width="100%", height="100%"):
				gui.Label(name='label_140_120', sizer_align='center', sizer_border=4, 
							width='100%', text=u'Registros', )
				gui.Panel(name='panelgrid', sizer='wrap', width='100%', 
						height='100%', sizer_border=5)
				
			gui.StatusBar(name='statusbar', )
	
		self.busqueda = gui.get("busqueda")
def wait_fun(tot_time):
    import gui
    import time
    with gui.Window(name='wait',title=u'Please Wait', resizable=True, 
                height='50px', left='60', top='60', width='100px', 
                bgcolor=u'#ABABAB', fgcolor=u'#000000', image='', ) as win:
            gui.Label(name='prog',text=tot_time)

    wait = gui.get("wait")
    wait.show()
    t=float(tot_time)
    if t<1:
        t=1
    print t
    while t>-1:
        if t<0:
            t=0
        
        time_str='%d seconds remaining' %t
        wait['prog'].text=time_str
        time.sleep(1)
        t-=1

    wait.close()
Пример #5
0
    "Append the message to the output text box control"
    ctrl_output.value += msg + "\n"

# --- gui2py designer generated code starts ---

with gui.Window(name='mywin', title=u'gui2py chat', resizable=True, 
                height='461px', left='168', top='79', width='400px', ):
    gui.TextBox(name=u'output', multiline=True, height='403', left='8', 
                top='10', width='379')
    gui.TextBox(name=u'input', height='30', left='11', top='417', width='323')
    gui.Button(label=u'\u2192', name=u'send', left='348', top='419', 
               width='40', default=True, )

# --- gui2py designer generated code ends ---

mywin = gui.get("mywin")
ctrl_input = mywin["input"]
ctrl_output = mywin["output"]

# assign your event handlers:

mywin['send'].onclick = send

if __name__ == "__main__":
    # example to call a GUI function (i.e. from other thread):
    gui.call_after(log, "Welcome!")
    # basic startup: show windows, activate control and start GUI
    mywin.show()
    ctrl_input.set_focus()
    gui.main_loop()
Пример #6
0
        )
        gui.Image(
            name='imgpyafip',
            height='50',
            left='665',
            top=nTop,
            width='100',
            filename='logo-pyafipws.png',
        )

    gui.StatusBar(
        name='statusbar_15_91',
        text=u'Servicio Web Factura Electr\xf3nica mercado interno (WSFEv1)',
    )

# --- gui2py designer generated code ends ---

mywin = gui.get("buscapadron")
panel = mywin['panelbusqueda']
panel['imgsistema'].top = str(int(mywin.height[:-2]) - 50)
panel['imgpyafip'].top = str(int(mywin.height[:-2]) - 80)


def main():
    mywin.show()


if __name__ == "__main__":
    main()
    gui.main_loop()
Пример #7
0
                   width='75',
                   fgcolor=u'#4C4C4C',
                   onclick=exportar)
        gui.Button(id=188,
                   label=u'Reporte',
                   name=u'reporte',
                   left='542',
                   top='542',
                   width='75',
                   fgcolor=u'#4C4C4C',
                   onclick=reporte)

# --- gui2py designer generated code ends ---

# obtener referencia a la ventana principal:
mywin = gui.get("consultas")
panel = mywin['panel']
listado = panel['listado']


def main(callback=None):
    global mywin, panel, listado
    # limpiar valores del diseñador:
    panel['criterios']['tipo_doc'].items = datos.TIPO_DOC_MAP
    panel['criterios']['tipo_doc'].value = 80  # CUIT
    panel['criterios']['nro_doc'].value = None
    panel['criterios']['nombre_cliente'].value = ""
    panel['criterios']['tipo_cbte'].items = datos.TIPO_CBTE_MAP
    panel['criterios']['tipo_cbte'].value = None
    panel['criterios']['pto_vta'].value = None
    panel['criterios']['nro_cbte_desde'].value = None
Пример #8
0
        gui.Button(label=u'Buscar', name='search', sizer_border=4, top=nTop, left='410', onclick=buscarproductos)
        gui.Button(label=u'Salir', name='close', sizer_border=4, onclick=on_cierra, top=nTop, left='510')
        
        nTop = str(int(nTop)+50)
        gui.Image(name='image_507_571', height='36', left='17', top=nTop, 
			  width='238', filename='sistemas-agiles.png', )
        gui.Image(name='image_33_540', height='50', left='665', top=nTop,
			  width='100', filename='logo-pyafipws.png', )


# --- gui2py designer generated code ends ---


nTop = str(int(nTop)+50)
# obtener referencia a la ventana principal:
mywin = gui.get("abmproductos")
mywin.height = nTop
panel = mywin['ppal']['record']
panel.height = nTopPanel
#mywin['panel']['record'].set_sizer_grow_col(0, 1)

def main():
    
    ExisteProductos()
    mywin.show()

if __name__ == "__main__":
    main()
    gui.main_loop()

Пример #9
0
        gui.Button(label=u'Borrar', name='delete', sizer_border=4, top=nTop, left='310', onclick=borrar)
        gui.Button(label=u'Buscar', name='search', sizer_border=4, top=nTop, left='410', onclick=buscarpadron)
        gui.Button(label=u'Salir', name='close', sizer_border=4, onclick='exit()', top=nTop, left='510')
        
        nTop = str(int(nTop)+50)
        gui.Image(name='image_507_571', height='36', left='17', top=nTop, 
			  width='238', filename='sistemas-agiles.png', )
        gui.Image(name='image_33_540', height='50', left='665', top=nTop,
			  width='100', filename='logo-pyafipws.png', )


# --- gui2py designer generated code ends ---

nTop = str(int(nTop)+50)
# obtener referencia a la ventana principal:
mywin = gui.get("abmpadron")
mywin.height = nTop
panel = mywin['ppal']['record']
panel.height = nTopPanel
#mywin['panel']['record'].set_sizer_grow_col(0, 1)

def main():
    
    ExistePadron()
    ExisteDomicilio()
    mywin.show()

if __name__ == "__main__":
    main()
    padron = PadronAFIP()
    #padron.Guardar("80", "30999157315", "MUNICIPALIDAD DE GARUHAPE", "4", "AV. LAS AMERICAS S/N", "*****@*****.**")
Пример #10
0
    #     # Closes the socket
    #     if msg.strip().decode('ascii') == 'quit':
    #         s.close()
    #         break

# --- gui2py designer generated code starts ---

#======== MAIN WINDOW ========#
gui.Window(name=u'ChatClient',
           title=u'ChatClient',
           maximize_box=False, resizable=False, height='400px', left='173',
           top='58', width='550px', bgcolor=u'#E0E0E0', fgcolor=u'#000000',
           )
gui.Label(id=281, name='label_211_281', height='17', left='50', top='40',
          width='254', transparent=True,
          font={'size': 9, 'family': 'sans serif', 'face': u'Arial'},
          parent=u'ChatClient',
          text=u'abcd', )

# --- gui2py designer generated code ends ---

# get a reference to the Top Level Window:
mywin = gui.get("ChatClient")

# assign your event handlers:
mywin.onload = load

if __name__ == "__main__":
    # myLogger.setupLogging()
    mywin.show()
    gui.main_loop()
Пример #11
0
                           represent="%s", align="right")
            gui.ListColumn(name=u'nombre_cliente', text='Cliente', width=150)
            							  
        gui.Button(label=u'Salir', name='close', sizer_border=4, 
                   top=nTop, left='510')
        
    
        gui.Image(name='imgsistema', height='36', left='17', top=nTop, 
			  width='238', filename='sistemas-agiles.png', )
        gui.Image(name='imgpyafip', height='50', left='665', top=nTop,
			  width='100', filename='logo-pyafipws.png', )
    
    gui.StatusBar(name='statusbar_15_91', 
                  text=u'Servicio Web Factura Electr\xf3nica mercado interno (WSFEv1)', )


# --- gui2py designer generated code ends ---

			  
mywin = gui.get("buscapadron")
panel = mywin['panelbusqueda']
panel['imgsistema'].top = str(int(mywin.height[:-2]) - 50)
panel['imgpyafip'].top = str(int(mywin.height[:-2]) - 80)

def main():
    mywin.show()

if __name__ == "__main__":
    main()
    gui.main_loop()
Пример #12
0
		height='250px', left='580', top='24', 
		width='580px', bgcolor=u'#E0E0E0', image='', tiled=True, ):
	with gui.Panel(name='panel',  sizer='wrap', width="100%", height="100%"):
		gui.Label(name='label_140_120', sizer_align='center', sizer_border=4, 
				  width='100%', text=u'Registros', )
		gui.Panel(label=u'', name='record', width='100%', 
					   image='', sizer_border=5)
		gui.Button(label=u'Crear', name='create', sizer_border=4, )
		gui.Button(label=u'Actualizar', name='update', sizer_border=4, )
		gui.Button(label=u'Borrar', name='delete', sizer_border=4, )
		gui.Button(label=u'Buscar', name='search', sizer_border=4, )
		gui.Button(label=u'Cerrar', name='close', sizer_border=4, onclick=on_cierra)
	gui.StatusBar(name='statusbar', )
		

mywin = gui.get("ppal")
mywin['statusbar'].text = "guiabm - a CRUD example for gui2py"
panel = mywin['panel']


class crud():
	
	nuevo = False
	
	def __init__(self, *args, **kwargs):
		base = ''
		self.tabla = kwargs['tabla']
		if kwargs.has_key('basedatos'):
			self.db = kwargs['basedatos']
		
		#print self.tabla.as_dict()
             parent=u'Scrape_Tool', label=u'Run In Browser?')

gui.Button(label=u'Browse Output Directory', name=u'btnBrowseOutputDir', left='50', top='240', fgcolor=u'#000000',
           parent=u'Scrape_Tool', transparent=True, )


# #======== DO ORDER SCRAPE BUTTON ========#
gui.Button(label=u'Scrape Results', name=u'btnScrape', height='39', left='185', top='327', width='292',
           fgcolor=u'#000000', font={'size': 11, 'family': 'sans serif', 'face': u'Tahoma'}, parent=u'Scrape_Tool',
           transparent=True, )

gui.StatusBar(name='statusbar', parent=u'Scrape_Tool', )

gui.Image(name='image_148', height='40', left='440', top='5', width='100', fgcolor=u'#000000',
          filename=config.get_main_dir() + '/Resources/python-powered.bmp', parent=u'Scrape_Tool', stretch=False,
          transparent=False, border='static')

# --- gui2py designer generated code ends ---

# get a reference to the Top Level Window:
mywin = gui.get("Scrape_Tool")

# assign your event handlers:
mywin.onload = load
mywin['btnScrape'].onclick = doScrape
mywin['btnBrowseOutputDir'].onclick = browseOutputDir

if __name__ == "__main__":
    # myLogger.setupLogging()
    mywin.show()
    gui.main_loop()
Пример #14
0
            filename='sistemas-agiles.png',
        )
        gui.Image(
            name='image_33_540',
            height='50',
            left='665',
            top=nTop,
            width='100',
            filename='logo-pyafipws.png',
        )

# --- gui2py designer generated code ends ---

nTop = str(int(nTop) + 50)
# obtener referencia a la ventana principal:
mywin = gui.get("abmpadron")
mywin.height = nTop
panel = mywin['ppal']['record']
panel.height = nTopPanel
#mywin['panel']['record'].set_sizer_grow_col(0, 1)


def main():

    ExistePadron()
    ExisteDomicilio()
    mywin.show()


if __name__ == "__main__":
    main()
           parent=u'Fiverr_OrderScrape', transparent=True, )

#======== DO ORDER SCRAPE BUTTON ========#
gui.Button(label=u'Do Order Scrape', name=u'btnDoOrderScrape', height='39',
           left='185', top='327', width='292', fgcolor=u'#000000',
           font={'size': 11, 'family': 'sans serif', 'face': u'Tahoma'},
           parent=u'Fiverr_OrderScrape', transparent=True, )

gui.StatusBar(name='statusbar', parent=u'Fiverr_OrderScrape', )

gui.Image(name='image_148', height='40', left='440', top='5', width='100',
          fgcolor=u'#000000',
          filename=config.get_main_dir()+'/Resources/python-powered.bmp',
          parent=u'Fiverr_OrderScrape', stretch=False, transparent=False, border='static')

# --- gui2py designer generated code ends ---

# get a reference to the Top Level Window:
mywin = gui.get("Fiverr_OrderScrape")

# assign your event handlers:
mywin.onload = load
mywin['btnOutputDefault'].onclick = setDefaultOutputPaths
mywin['btnBrowseOutputPath'].onclick = browseOutputPath
mywin['btnDoOrderScrape'].onclick = doOrderScrape
#mywin['btnOpenOutput'].onclick = openOutputXLS

if __name__ == "__main__":
    # myLogger.setupLogging()
    mywin.show()
    gui.main_loop()
Пример #16
0
#global
btn_download_width = '100px'
form_height = '45px'


with gui.Window(name='mainwin', title=u'Steeb', height=main_win_height, width=main_win_width, left='323', top='137', bgcolor=u'#F0F0F0', fgcolor=u'#555555', image='', ):
    gui.TextBox(name='searchfield', height=form_height, left='5', top='0', width=main_input_width, parent='mainwin', )
    gui.Button(label=u'Crawl songs!', name='button_down', height='35px', width=btn_download_width, left=main_search_width, top='5', default=True, fgcolor=u'#EEEEEE', bgcolor=u'#C0392B', parent='mainwin', )
    gui.Button(label=u'Search!', name='button_search', height='35px', width=main_btn_width, left='333px', top='5', default=True, fgcolor=u'#EEEEEE', bgcolor=u'#C0392B', parent='mainwin', )
    with gui.ListView(name='artistslist', height=lv_artist_height, left='0', top=form_height, width=main_search_width, item_count=10, sort_column=0, onitemselected="print ('sel %s' % event.target.get_selected_items())", ):
        gui.ListColumn(name='artist', text='Artist', width=400)
        gui.ListColumn(name='id', text='Id', width=0)
    with gui.ListView(name='albumslist', height=lv_albums_height, left='0', top=lv_artist_top, width=main_search_width, item_count=10, sort_column=0, onitemselected="print ('sel %s' % event.target.get_selected_items())", ):
        gui.ListColumn(name='albums', text='Albums', width=400)
        gui.ListColumn(name='id', text='Id', width=0)
    with gui.ListView(name='trackslist', height=lv_songs_height, left=main_search_width, top=form_height, width=main_songs_width, item_count=10, sort_column=0, onitemselected="print ('sel %s' % event.target.get_selected_items())", ):
        gui.ListColumn(name='songs', text='Songs', width=200)
        gui.ListColumn(name='id', text='Id', width=0, ) 
        # gui.Gauge(name='gauge', height='18', left='13', top='130', width='50', value=50, )


   
mainwin = gui.get("mainwin")

mainwin.onload = load

if __name__ == "__main__":
    mainwin.show()    
    gui.main_loop()
Пример #17
0
            filename='sistemas-agiles.png',
        )
        gui.Image(
            name='image_33_540',
            height='50',
            left='665',
            top=nTop,
            width='100',
            filename='logo-pyafipws.png',
        )

# --- gui2py designer generated code ends ---

nTop = str(int(nTop) + 50)
# obtener referencia a la ventana principal:
mywin = gui.get("abmproductos")
mywin.height = nTop
panel = mywin['ppal']['record']
panel.height = nTopPanel
#mywin['panel']['record'].set_sizer_grow_col(0, 1)


def main():

    ExisteProductos()
    mywin.show()


if __name__ == "__main__":
    main()
    gui.main_loop()
Пример #18
0
gui.Button(label='Send', name='send', left='80', top='326', width='85', default=True, parent='mywin.notebook.tab_message')
gui.StatusBar(name='statusbar', parent='mywin')

#### list ####
gui.Label(name='label_page', left='10', top='5', parent='mywin.notebook.tab_list', text='Page : 0/0')
gui.Button(label='Prev', name='prev', left='100', top='5', width='85', default=True, parent='mywin.notebook.tab_list', onclick=ui.refresh_prev)
gui.Button(label='Next', name='next', left='190', top='5', width='85', default=True, parent='mywin.notebook.tab_list', onclick=ui.refresh_next)
gui.Button(label='Refresh', name='refresh', left='290', top='5', width='85', default=True, parent='mywin.notebook.tab_list', onclick=ui.refresh_status)
gui.ListView(name='listview', height='320', left='0', top='30', width='590', 
             item_count=27, parent='mywin.notebook.tab_list', sort_column=0, 
             onitemselected="print ('sel %s' % event.target.get_selected_items())", )
gui.ListColumn(name='col_accepted_time', text='Date', parent='listview', )
gui.ListColumn(name='col_callno', text='Phone Number', parent='listview', )
gui.ListColumn(name='col_status', text='Status', width=20, parent='listview', )
gui.ListColumn(name='col_resultcode', text='Result Code', width=26, parent='listview', )
gui.ListColumn(name='col_resultmessage', text='Result Message', parent='listview', )
gui.ListColumn(name='col_sent_time', text='Sent time', parent='listview', )
gui.ListColumn(name='col_text', text='Text', parent='listview', )

mywin = gui.get("mywin")

mywin.onload = ui.load
mywin['notebook']['tab_message']['send'].onclick = ui.send_message
mywin['menubar']['menu']['menu_quit'].onclick = ui.close_window

if __name__ == "__main__":
	mywin.show()
	mywin.title = "COOLSMS"
	mywin['statusbar'].text = "COOLSMS Status Bar"
	gui.main_loop()
Пример #19
0
                         left='655', top='94', width='114', value=True, )
            gui.Label(id=1243, name='label_356_21_178_2591_1243', height='17', 
                      left='423', top='63', width='47', text=u'Desde:', )
            gui.Label(id=1343, name='label_356_21_178_1343', height='17', 
                      left='593', top='64', width='44', text=u'Hasta:', )
        gui.Button(label=u'Cargar', name=u'cargar', left='379', top='542', 
                   width='73', fgcolor=u'#4C4C4C', )
        gui.Button(label=u'Exportar', name=u'exportar', left='458', top='542', 
                   width='75', fgcolor=u'#4C4C4C', onclick=exportar)
        gui.Button(id=188, label=u'Reporte', name=u'reporte', left='542', 
                   top='542', width='75', fgcolor=u'#4C4C4C',  onclick=reporte)

# --- gui2py designer generated code ends ---

# obtener referencia a la ventana principal:
mywin = gui.get("consultas")
panel = mywin['panel']
listado = panel['listado']

def main(callback=None):
        global mywin, panel, listado
        # limpiar valores del diseñador:
        panel['criterios']['tipo_doc'].items = datos.TIPO_DOC_MAP
        panel['criterios']['tipo_doc'].value = 80                   # CUIT
        panel['criterios']['nro_doc'].value = None
        panel['criterios']['nombre_cliente'].value = ""
        panel['criterios']['tipo_cbte'].items = datos.TIPO_CBTE_MAP        
        panel['criterios']['tipo_cbte'].value = None
        panel['criterios']['pto_vta'].value = None
        panel['criterios']['nro_cbte_desde'].value = None
        panel['criterios']['nro_cbte_hasta'].value = None
Пример #20
0
#======== DO AUTO FLAGGING BUTTON ========#
gui.Button(label=u'Do Auto Flagging', name=u'btnDoFlagging', height='39',
           left='185', top='327', width='292', fgcolor=u'#000000',
           font={'size': 11, 'family': 'sans serif', 'face': u'Tahoma'},
           parent=u'CL_AutoFlagging', transparent=True, )

gui.StatusBar(name='statusbar', parent=u'CL_AutoFlagging', )

gui.Image(name='image_148', height='40', left='440', top='5', width='100',
          fgcolor=u'#000000',
          filename=CL_AutoFlagging.get_main_dir()+'/Resources/python-powered.bmp',
          parent=u'CL_AutoFlagging', stretch=False, transparent=False, border='static')

# --- gui2py designer generated code ends ---

# get a reference to the Top Level Window:
mywin = gui.get("CL_AutoFlagging")

# assign your event handlers:
mywin.onload = load
mywin['btnOpenInput'].onclick = openInputXLS
mywin['btnInputDefault'].onclick = setDefaultInputXLS
mywin['btnBrowseInput'].onclick = browseInputXLS
mywin['btnDoFlagging'].onclick = doAutoFlagging
mywin['btnOpenOutput'].onclick = openOutputXLS

if __name__ == "__main__":
    myLogger.setupLogging()
    mywin.show()
    gui.main_loop()