ciao,
esiste qualcosa che, leggendo gli url da un file sequenziale, li visualizza su un browser ogni x tempo ?
grazie
ciao,
esiste qualcosa che, leggendo gli url da un file sequenziale, li visualizza su un browser ogni x tempo ?
grazie
In python lo puoi fare in una manciata di linee tramite il modulo webbrowser:
Per "tempificare" (!) il tutto usa una banale sleep.codice:import webbrowser urls = """ www.html.it www.libero.it www.google.com """ for url in urls.split(): webbrowser.open(url)
Rilasciata Python FTP Server library 0.5.1
http://code.google.com/p/pyftpdlib/
We'll be those who'll make the italian folks know how difficult can be defecating in Southern California without having the crap flying all around the house.
che devo fare per avere questo modulo ?
Devi installare python, incollare quel codice in un file con estensione .py, salvare, e poi, da prompt dei comandi, lanciarlo digitando "nome_file.py" (INVIO).
Rilasciata Python FTP Server library 0.5.1
http://code.google.com/p/pyftpdlib/
We'll be those who'll make the italian folks know how difficult can be defecating in Southern California without having the crap flying all around the house.
appena digitato:
./prova.py
ho una crocetta al posto del puntatore
e poi
./prova.py: line 4: urls: command not found
./prova.py: line 10: syntax error near unexpected token `('
./prova.py: line 10: `for url in urls.split():'
Lancia "python prova.py".
Oppure aggiungi in cima al file la riga:
...rendi il file eseguibile con "chmod +x prova.py" e lancialo tramite "./prova.py".codice:#!/usr/bin/python
Rilasciata Python FTP Server library 0.5.1
http://code.google.com/p/pyftpdlib/
We'll be those who'll make the italian folks know how difficult can be defecating in Southern California without having the crap flying all around the house.
ok
pero' mi ha aperto 3 firefox differenti ...
Quello credo dipenda da firefox. Agisci sulle impostazioni dei tab di modo che un nuovo collegamento si apra in un nuovo tab anzichè in una nuova finestra.
Rilasciata Python FTP Server library 0.5.1
http://code.google.com/p/pyftpdlib/
We'll be those who'll make the italian folks know how difficult can be defecating in Southern California without having the crap flying all around the house.
a me servirebbe che sulla solita finestra, dopo 20 secondi ad esempio, cambiasse sito .....
ho fatto delle modifiche..... per temporizzare e per far aprire un solo tab
#!/usr/bin/python
import webbrowser
import time
urls = """
www.html.it
www.libero.it
www.google.it
"""
for url in urls.split():
webbrowser.open(url, new=0)
time.sleep(10)
ma mi apre tab diversi....
eppure leggo nella descrizione del modulo webbrowser:
.... open( url[, new=0[, autoraise=1]])
Display url using the default browser. If new is 0, the url is opened in the same browser window. If new is 1, a new browser window is opened if possible. If new is 2,....