How can I make my program have a consistent initial current working directory? [duplicate]

It seems that IDLE changes its current working dir to location of the script that is executed, while when running the script using cmd doesn’t do that and it leaves CWD as it is. To change current working dir to the one containing your script you can use: import os os.chdir(os.path.dirname(__file__)) print(os.getcwd()) The __file__ variable … Read more

How to get the current working directory using python 3? [duplicate]

It seems that IDLE changes its current working dir to location of the script that is executed, while when running the script using cmd doesn’t do that and it leaves CWD as it is. To change current working dir to the one containing your script you can use: import os os.chdir(os.path.dirname(__file__)) print(os.getcwd()) The __file__ variable … Read more

Where are the recorded macros stored in Notepad++?

In Windows the macros are saved at %AppData%\Notepad++\shortcuts.xml (Windows logo key + E and copy&paste %AppData%\Notepad++\) Or: In Windows < 7 (including Win2008/R2) the macros are saved at C:\Documents and Settings\%username%\Application Data\Notepad++\shortcuts.xml In Windows 7|8|10 C:\Users\%username%\AppData\Roaming\Notepad++\shortcuts.xml Note: You will need to close Notepad++ if you have any new macros you want to ‘export’. Here is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)