From 8aaf2c4b5a73988dc660e7e57e945aa1aee21edc Mon Sep 17 00:00:00 2001 From: Mauro Scomparin Date: Wed, 12 Apr 2017 02:11:01 +0200 Subject: [PATCH] Modificato path in home. --- money.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/money.py b/money.py index 66d1341..009f2a6 100755 --- a/money.py +++ b/money.py @@ -1,8 +1,7 @@ #!/data/data/com.termux/files/usr/bin/python from time import localtime, strftime - -path = 'dati.dat' +from os.path import expanduser, join def leggiTipo(): t = input('tipo (+/-) [-]: ') @@ -54,8 +53,11 @@ def scriviMovimento(path, m): return print("money 0.0.1") -print('file output:', path) +home = expanduser('~') +out_file_name = 'movimenti.dat' +out_file = join(home, 'dati', out_file_name) +print('file output:', out_file) m = leggiMovimento() -scriviMovimento(path, m) +scriviMovimento(out_file, m) print('scritto:', m) print('grazie.') -- 2.25.1