Skip to content
Advertisement

Tag: sys

How to uninstall a .exe from a python script

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

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

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

Advertisement