Profilo di ใŽ

Nome ใŽ
Indirizzo email ask :)
AvatarAvatar utenti
Messaggi233
Firma forum
THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
<carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you
think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: File su cartella condivisa in rete
    Forum >> Programmazione Python >> Web e Reti
    Non รจ una buona idea, in generale.




    Situations Where A Client/Server RDBMS May Work Better

    Client/Server Applications



    If there are many client programs sending SQL to the same
    database over a network, then use a client/server database
    engine instead of SQLite. SQLite will work over a network filesystem,
    but because of the latency associated with most network filesystems,
    performance will not be great. Also, file locking logic is buggy in
    many network filesystem implementations (on both Unix and Windows).
    If file locking does not work correctly,
    two or more clients might try to modify the
    same part of the same database at the same time, resulting in
    corruption. Because this problem results from bugs in
    the underlying filesystem implementation, there is nothing SQLite
    can do to prevent it.


    A good rule of thumb is to avoid using SQLite
    in situations where the same database will be accessed directly
    (without an intervening application server) and simultaneously
    from many computers over a network.




    -- https://www.sqlite.org/whentouse.html


    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Problemi con l'inserimento di immagini (tkinter)
    Forum >> Programmazione Python >> GUI
    prova con

    a = Button(roo, image=r"C:\Users\luke\Desktop\c.gif").pack()





    Ciao,

    ใŽ

    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Correzione della grammatica di un testo
    Forum >> Principianti
    prova con

    cm@hemp /tmp
    $ cat luke.py 
    f = open("es1.txt", "r")
    contenuto = f.read()
    f.close()
    
    dacorreggere = contenuto.replace("ciao", "Ciao")
    
    fi = open("es1.txt", "w")
    fi.write(dacorreggere)
    fi.close()
    cm@hemp /tmp
    $ cat es1.txt 
    ciao mondo
    cm@hemp /tmp
    $ py luke.py 
    cm@hemp /tmp
    $ cat es1.txt 
    Ciao mondo
    
    ใŽ

    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Problema affidabilitร  Python?
    Forum >> Programmazione Python >> Calcolo scientifico
    ciao,

    che OS stai usando? A me il tuo codice restituisce:

    cm@hemp /tmp
    $ cat ottobit.py 
    import time
    
    start = time.time()
    
    a = range(100000)
    b = []
    for i in a:
        b.append(i * 2)
    
    # a = range(100000)
    # b = [i*2 for i in a]
    
    end = time.time()
    print("%.10f" % (end - start))
    cm@hemp /tmp
    $ py ottobit.py 
    0.0109043121
    cm@hemp /tmp
    $ py ottobit.py 
    0.0114600658
    cm@hemp /tmp
    $ py --version
    Python 3.7.0
    


    ใŽ

    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Convertire dizionario con tupla in csv
    Forum >> Programmazione Python >> Files e Directory
    perdona la curiositร , ma, come ti aspetteresti fosse il csv risultante?
    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: info forum
    Forum >> Principianti
    Daniele aka Palmux said @ 2019-01-21 16:52:41:
    Non c'รจ una ricerca sul nostro forum, ma puoi cercare un argomento con Google aggiungendo sito:python.it (senza spazi).

    Nella maggiore parte dei casi troverai quanto cerchi.

    Cya
    la forma corretta per limitare la ricerca a questo sito รจ site:python.it, e funziona in tutti i casi :P





    HTH,

    ใŽ

    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Overloading def
    Forum >> Principianti
    Se non vuoi dover tenere allineata la DISPATCH_TABLE e il modulo, e se le funzioni hanno una naming convention comune, puoi anche fare qualcosa tipo:

    $ cat mymodule.py 
    def func_a(x, y): ...
    def func_b(x, y): ...
    def func_c(x, y): ...
    def func_d(x, y): ...
    def func_e(x, y): ...
    $ py
    >>> import mymodule
    >>> def def1(x, y, type_='a'): return getattr(mymodule, 'func_' + type_)(x, y)
    ... 
    >>> def1(1, 2, 'c')
    



    HTH,

    ใŽ




    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Aprire un file nella stessa cartella, perchรจ non riesco?
    Forum >> Programmazione Python >> Files e Directory
    In realtร  il file viene salvato nella directory corrente (cwd) del processo; dato che tu lo esegui dalla tua home, รจ li che viene salvato. Puoi verificarlo facilmente facendo `cd` in una directory diversa. Ovviamente puoi sempre specificare un percorso diverso da quello di default; per esempio, se ti interessa scrivere nella stessa directory dove รจ presente il tuo script, puoi usare:

    os.path.dirname(os.path.realpath(__file__))

    HTH,
    ใŽ

    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Tkinter e file
    Forum >> Principianti
    laddove erroneamente scrivi

    a = Label(ro, text="IMPEGNI DEL SENTIERO").pack()
    assegnando ad a il valore None, dovresti scrivere ad esempio:


    a = Label(ro, text="IMPEGNI DEL SENTIERO")
    a.pack()
    
    inoltre, dovresti aggiungere a gettone() la riga

    global nome, squadriglia, specialita, primo, secondo, terzo
    HTH,

    ใŽ

    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ
  • Re: Tkinter e file
    Forum >> Principianti
    pack() non restituisce nulla
    THE ๐Ÿบ-WARE LICENSE (Revision ใŠท):
    <carlo@๐Ÿ.it> wrote this post. As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a ๐Ÿบ in return. -- ใŽ