I hope I can describe what exactly do I need 🙂 (sorry for my english) So, for example, I have tons of code lines which some variables with values in parentheses. Like: $var = (number, number, number) I realized that we got some changes and now we have to swap numbers, the last one put ..
I’m a C# developer normally, so maybe this is something I don’t understand about Python. I have a data model of dataclasses with < 10 child data elements in each class. e.g. things like: @dataclass class Block: def tranmission(this) -> Transmission: … def allocations(this) -> Generator[Allocation,Any,Any]: … def day(this) -> Day: … so when I ..
I’m trying to use the VS Code remote debug feature (debugpy). My problem is that my code to execute needs to be the client and VS Code needs to be the server. Why? Because I can’t modify the command line of my python "container" (It’s an embedded version of python into another process). So I ..
I have the latest edition of VS Code using Python 3.7.7 (miniconda 3) but I cannot get over a breakpoint that happens in a massive loop. I tried holding down F5 a billion times and I need to see what a dataframe looks like after the loop finishes it’s processing. I have also adjusted all ..
Black won’t work on my computer but I want YAPF to function the same way black does. Is there a way to change the custom settings of YAPF to format the exact same was black? I figure black is industry standard and want to follow that. What settings should I change? Are there any repositories ..
I have a simple directory structure: proj/ src/ __init__.py foo.py bar.py test/ __init__.py test_foo.py test_foo.py import unittest import sys sys.path.append(‘../src’) from src import foo class TestFoo(unittest.TestCase): def test_foo(self): foo.start() if __name__ == ‘__main__’: unittest.main() foo.py import bar def start(): bar.do_stuff() When running my test (I’m using vscode), I get the following error: Failed to import ..
I’ve installed Kivy…..a lot of times. I’m in VS Code and it shows in Libraries but I can’t seem to figure out how to import. Getting "kivy module does not exist" error. Can run a .py file with just ‘import kivy’ in the terminal with success. Cannot run kivy built-in example from terminal. ErrNo2. Source: ..
I used this code in Vs code: import requests from bs4 import BeautifulSoup url = "https://www.gov.uk/search/news-and-communications" reponse = requests.get(url) page = reponse.content soup = BeautifulSoup(page, "html.parser") class_name= "gem-c-document-list__item-link" titres = soup.find_all("a", class_=class_name) titres_textes= for titre in titres: titres_textes.append(titre.string) titres_textes But when I try to run it with Ctrl+Alt+N nothing happens ,why ? python versions>3.10 extensions ..
I encountered this strange behavior in VS Code debugger when stepping line by line through the code. Before print(var1), when I execute del var1 in the Debug Console, it will delete var1, and the next line print(var1) will fail as expected. However, in main(), when I execute del var2 in the Debug Console, it doesn’t ..
I want a Spyder-like Console in VSCode for python, so I run code in Interactive Window and click vairables as other answers said. However, instead of editor area, the jupyter variables shows in the panel I can’t move to the upper right. So can I move variables explorer to the upper right of the editor ..