diff --git a/bindings/python/example_scripts/account_analysis.py b/bindings/python/example_scripts/account_analysis.py index fe51e8d7b6..135d2e60ef 100644 --- a/bindings/python/example_scripts/account_analysis.py +++ b/bindings/python/example_scripts/account_analysis.py @@ -38,7 +38,7 @@ import csv from gnucash import Session, GncNumeric, Split # Invoke this script like the following example -# $ gnucash-env python account_analysis.py gnucash_file.gnucash \ +# $ python3 account_analysis.py gnucash_file.gnucash \ # 2010 1 monthly 12 \ # debits-show credits-show Assets 'Test Account' # @@ -156,9 +156,9 @@ def main(): print('usage: account_analysis.py {book url} {start year} {start month, numeric} {period type: monthly, quarterly, or yearly} {number of periods to show, from start year and month} {whether to show debits: debits-show for true, all other values false} {whether to show credits: credits-show for true, all other values false} {space separated account path, as many nested levels as desired} ') print('examples:\n') print("The following example analyzes 12 months of 'Assets:Test Account' from /home/username/test.gnucash, starting in January of 2010, and shows both credits and debits") - print("gnucash-env python account_analysis.py '/home/username/test.gnucash' 2010 1 monthly 12 debits-show credits-show Assets 'Test Account'\n") + print("python3 account_analysis.py '/home/username/test.gnucash' 2010 1 monthly 12 debits-show credits-show Assets 'Test Account'\n") print("The following example analyzes 2 quarters of 'Liabilities:First Level:Second Level' from /home/username/test.gnucash, starting March 2011, and shows credits but not debits") - print("gnucash-env python account_analysis.py '/home/username/test.gnucash' 2011 3 quarterly 2 debits-noshow credits-show Liabilities 'First Level' 'Second Level") + print("python3 account_analysis.py '/home/username/test.gnucash' 2011 3 quarterly 2 debits-noshow credits-show Liabilities 'First Level' 'Second Level") return try: diff --git a/bindings/python/example_scripts/new_book_with_opening_balances.py b/bindings/python/example_scripts/new_book_with_opening_balances.py index 7c7ee4c45e..df2d29ae7a 100644 --- a/bindings/python/example_scripts/new_book_with_opening_balances.py +++ b/bindings/python/example_scripts/new_book_with_opening_balances.py @@ -51,11 +51,11 @@ from datetime import date # mutual, and trading, you'll have to put the opening balance in yourself # # Invocation examples: -# gnucash-env python new_book_with_opening_balances.py \ +# python3 new_book_with_opening_balances.py \ # '/home/mark/test.gnucash' # 'sqlite3:///home/mark/new_test.gnucash' # -# gnucash-env python new_book_with_opening_balances.py \ +# python3 new_book_with_opening_balances.py \ # '/home/mark/test.gnucash' \ # 'xml:///crypthome/mark/parit-financial-system/new_test.gnucash' # @@ -293,8 +293,8 @@ def main(): print('not enough parameters') print('usage: new_book_with_opening_balances.py {source_book_url} {destination_book_url}') print('examples:') - print("gnucash-env python new_book_with_opening_balances.py '/home/username/test.gnucash' 'sqlite3:///home/username/new_test.gnucash'") - print("gnucash-env python new_book_with_opening_balances.py '/home/username/test.gnucash' 'xml:///crypthome/username/finances/new_test.gnucash'") + print("python3 new_book_with_opening_balances.py '/home/username/test.gnucash' 'sqlite3:///home/username/new_test.gnucash'") + print("python3 new_book_with_opening_balances.py '/home/username/test.gnucash' 'xml:///crypthome/username/finances/new_test.gnucash'") return #have everything in a try block to unable us to release our hold on stuff to the extent possible diff --git a/bindings/python/example_scripts/priceDB_test.py b/bindings/python/example_scripts/priceDB_test.py index 8ec671500d..a1ce64784f 100644 --- a/bindings/python/example_scripts/priceDB_test.py +++ b/bindings/python/example_scripts/priceDB_test.py @@ -5,8 +5,9 @@ # before running this. # Adding to a calling bash script would be better # Although calling it from here would be even better! -# OR: export PYTHONPATH=$HOME/progs/lib/python2.6/site-packages -# Then: gnucash-env ipython +# OR: export PYTHONPATH=/lib/python3.7/site-packages:$PYTHONPATH +# You may have to adjust the above path to your local system (lib->lib64, python3.7->...) +# Then: ipython3 # The account file is not saved but always use a disposable copy. # Change, FILE, CURRENCY and STOCK to those defined in your test account. diff --git a/bindings/python/example_scripts/price_database_example.py b/bindings/python/example_scripts/price_database_example.py index 49c5d28d91..2df02b5ebb 100755 --- a/bindings/python/example_scripts/price_database_example.py +++ b/bindings/python/example_scripts/price_database_example.py @@ -5,8 +5,9 @@ # before running this. # Adding to a calling bash script would be better # Although calling it from here would be even better! -# OR: export PYTHONPATH=$HOME/progs/lib/python2.6/site-packages -# Then: gnucash-env ipython +# OR: export PYTHONPATH=/lib/python3.7/site-packages:$PYTHONPATH +# You may have to adjust the above path to your local system (lib->lib64, python3.7->...) +# Then: ipython3 # The account file is not saved but always use a disposable copy. # Thanks for contributions by Christoph Holtermann and Mark Jenkins diff --git a/bindings/python/example_scripts/simple_business_create.py b/bindings/python/example_scripts/simple_business_create.py index 22c5f87dc2..bb00846df9 100644 --- a/bindings/python/example_scripts/simple_business_create.py +++ b/bindings/python/example_scripts/simple_business_create.py @@ -24,7 +24,7 @@ # Creates a new book file (or *overwrites* an existing one) that has elements # in it for business use -- intended as a demonstration program. # Syntax: -# gnucash-env python simple_business_create.py \ +# python3 simple_business_create.py \ # sqlite3:///home/blah/blah.gnucash # # Specifically, this sets up a simple tree, creates a customer, job, @@ -65,7 +65,7 @@ if len(argv) < 2: print('not enough parameters') print('usage: simple_business_create.py {new_book_url}') print('example:') - print("gnucash-env python simple_business_create.py sqlite3:///home/blah/blah.gnucash") + print("python3 simple_business_create.py sqlite3:///home/blah/blah.gnucash") exit() diff --git a/bindings/python/example_scripts/simple_invoice_insert.py b/bindings/python/example_scripts/simple_invoice_insert.py index 63633d72cb..eef4c03baa 100644 --- a/bindings/python/example_scripts/simple_invoice_insert.py +++ b/bindings/python/example_scripts/simple_invoice_insert.py @@ -30,7 +30,7 @@ # this to become an invoice importer for your own books # # Syntax: -# gnucash-env python simple_invoice_insert.py \ +# python3 simple_invoice_insert.py \ # /home/blah/blah.gnucash # dda2ec8e3e63c7715097f852851d6b22 1001 'The Goods' 201.43 # diff --git a/bindings/python/example_scripts/test_imbalance_transaction.py b/bindings/python/example_scripts/test_imbalance_transaction.py index aa5eef0d41..a119bb730b 100644 --- a/bindings/python/example_scripts/test_imbalance_transaction.py +++ b/bindings/python/example_scripts/test_imbalance_transaction.py @@ -45,7 +45,7 @@ if len(argv) < 2: print('not enough parameters') print('usage: test_imbalance_transaction.py {book_url}') print('examples:') - print("gnucash-env python test_imbalance_transaction.py '/home/username/test.gnucash'") + print("python3 test_imbalance_transaction.py '/home/username/test.gnucash'") exit()