How to change script installation location in python

Advertisements I installed python in a directory but when i install a script, it installs in %appdata%/python folder (must be the default directory for installing scripts). I tried using: "pip config set global.target C:\Program Files\Pypy3.12.2\Scripts" I got this: "ERROR: Got unexpected number of arguments, expected 2. (example: "pip config set [name] [value]")" Sorry if it… Read More How to change script installation location in python

"Failed to create storage area association" when trying to create a shadowcopy on a different disk than the dedicated disk

Advertisements It works when trying to create a copy on the local disk ( from D:\ to D:\ lets say) but not when I try to set it to another disk (from D:\ to S:\ for example) I was expecting to create a shadowcopy on a different disk but was getting the error you see… Read More "Failed to create storage area association" when trying to create a shadowcopy on a different disk than the dedicated disk

Python script that prints all word files in directory prints the documents out of order

Advertisements I have a short Python script that looks in the directory I point it to and prints all of the files in it (Microsoft Word .docx format). The entire script is below: import os from pathlib import Path #set path where the files to print are my_path = Path(__file__).parent / ‘OUTPUT’ string_path = str(my_path)… Read More Python script that prints all word files in directory prints the documents out of order

How to use subprocess.run with correct path on windows?

Advertisements On windows 10 using python 3.10.10 I am trying to run a windows executable, but there is some issue with the path to the folder of the executable. I am trying to run the following code path = r"C:/Program Files (x86)/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin" result = subprocess.run(command, cwd=path) but I get the error FileNotFoundError: [WinError 2] The… Read More How to use subprocess.run with correct path on windows?

Debug assertion failed error on using class function C++ Visual Studio

Advertisements I’m new to C++ Code: #include <iostream> #include <string> #include <fstream> #include <windows.h> class spawnTools { private: void specTools(std::string toolname) { } void normTools(std::string toolname) { } public: std::string toolList = { "regedit", "cmd" }; std::string toolListAdmin = { "regedit", "cmd" }; void initToolSet(int xadmin) { if (xadmin == TRUE) { } else if… Read More Debug assertion failed error on using class function C++ Visual Studio

Why it shows in console "[object File]" but not object itself?

Advertisements fs.addEventListener(‘change’, function () { for (name of this.files) console.log(name) } });` What’s wrong with my computer? Windows 7; >Solution : Please try below snipet to for file name fs.addEventListener(‘change’, getFileData); function getFileData() { const files = this.files; for ( let i = 0; i < files.length; i++) { console.log("file " + (i+1) +" name",… Read More Why it shows in console "[object File]" but not object itself?