Hello I can’t get an app to self uninstall. After converting a .py script to .exe when I press the button it is supposed to delete/uninstall itself from my computer. Actually I would like it to uninstall completely from my computer after pressing the button from the .exe how to do it? Here is the code: I expect the program
Tag: sys
Doctest not working in Sphinx, cannot import python files Python
I have a problem trying to run doctest from the Sphinx Tutorial. I have the directory tree below but I cannot run a doctest for lumache.py. How would be able to make it so that lumache.py is importable with the pathlib function in conf.py which is sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix()).The code I am trying to execute is of the same one from
Import functions from another directory
I am running a python script (app.py) where I have to use two functions from another script (src.py), located inside another directory. The structure is the following: I am using, in app.py, the following lines: to access to the functions odd_all, even_all declared inside src.py. However, I get the error: ModuleNotFoundError: No module named ‘src’. How could I solve this
Cannot get an absolute import to work with python 3.7.0
I have a root folder called dumdum which contains an init and a folder called foo. Within foo are an ini and two modules, foo1 and foo6. I want foo6 to work when called on its own and when a main module in the root folder dumdum calls it, so I have been trying to work out how to get
When import a python file into another (in a subdirectory) it stops finding the csv in the same directory
I’m trying to import the cleaning file in the managers file like this: The main folder contains the files cleaning, transaction listing and a sub folder called “apps” with the managers file: Also note that the cleaning file reads the transaction listing.csv file. The issue I’m getting when running is: And “Transaction Listings.csv” is correctly loaded by cleaning but no
Python: Counting words from a directory of txt files and writing word counts to a separate txt file
New to Python and I’m trying to count the words in a directory of text files and write the output to a separate text file. However, I want to specify conditions. So if word count is > 0 is would like to write the count and file path to one file and if the count is == 0. I would
Passing arguments to an entry point python script using argparser
I am looking to pass a user entered arguments from the command line to an entry point for a python script. Thus far I have tried to used argparse to pass the arguments from the command line to the test.py script. When I try to pass the arguments they are not recognised and I recieve the following error. load_entry_point(‘thesaurus==0.1’, ‘console_scripts’,