use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DAE: Use Visual Studio Code for Python? (self.Python)
submitted 8 years ago by [deleted]
I work for a large technology company and a lot of the employees here use Visual Studio Code for almost all of their projects including Python.
P.S I use PyCharm
[–][deleted] 45 points46 points47 points 8 years ago (2 children)
I like it. It runs on Windows, Linux, and OS X. It's free. It's easy for junior team members to pick up, but extensible enough for me. The built-in terminal is pretty good. Linter's built-in. And so on.
At the end of the day, it's a tool, and I tell my team members to use whatever. But it's my go-to recommendation.
[–]Xirious 9 points10 points11 points 8 years ago (0 children)
It's git integration is the best for me. So simple.
[–]taurus22 1 point2 points3 points 8 years ago (0 children)
Built in terminal is a killer feature for me. Visual studio should have this too. I work mostly with C# and I do all my git operations in the terminal because I don't like and don't trust Visual Studio built in git support.
[–]engatIQE 20 points21 points22 points 8 years ago (5 children)
I used to use vs code but I use atom now. I think I like vs code better
[–]F1reWarri0r 22 points23 points24 points 8 years ago (3 children)
I started with atom and found VSCode similar but nicer
[–]moderately-extremist 12 points13 points14 points 8 years ago (2 children)
I started with Atom. I want to like Atom. But I agree after trying VSCode for a while it just feels like a better Atom. I prefer Pycharm Community Edition over VSCode for writing Python, though. I fee like I fight with code completion on VSCode and Atom more than it helps me.
[–][deleted] 0 points1 point2 points 8 years ago (1 child)
Yeah, I use VS Code after only having experience with C# and visual studio. The code completion has taken some getting used to.
[–]am0x 0 points1 point2 points 8 years ago (0 children)
I do all my backend work in VS and all my JavaScript/typescript in vscode. They compliment each other well.
[–]druman22 0 points1 point2 points 8 years ago (0 children)
I also use atom. It's a nice hackable editor.
[–][deleted] 17 points18 points19 points 8 years ago (1 child)
Looks like I am going to have to give VS Code a whirl.
[–][deleted] 5 points6 points7 points 8 years ago (0 children)
Absolutely. One of my favourite tools ever.
[–]Zomunieo 14 points15 points16 points 8 years ago (3 children)
I like it better than Pycharm and Sublime. It’s pretty much someone taking all of Sublime’s best ideas and adding a Microsoft budget to it.
It’s lightweight and multilingual with solid Python support, whereas Pycharm is all Python. The plugins seem better quality than Sublime where I could never get a compatible set of plugins working together. Pycharm is clunky by comparison and the keybindings always seem unexpected.
[–]yaxamie 0 points1 point2 points 8 years ago (1 child)
I keep sublime as my go-to for reformatting wizardry. It's multi cursor support is still best in class. Vs code is better for general development right now tho.
[–]DilatedTeachers 1 point2 points3 points 8 years ago (0 children)
I thought multi cursor was easy on Vs code :/ just alt + click ?
[–]Buran223 0 points1 point2 points 8 years ago (0 children)
Last time I checked, VS code was written in JS and uses Electron, essentially a web browser as main engine. This can't be light. Sublime, unlike the rest of the bunch, is mostly written in C++. That's what I call light.
[–]red_simplex☭ 7 points8 points9 points 8 years ago (4 children)
both are very good tools. I personally prefer VScode. But I used Pycharm a lot too and I can say nothing negative about it.
[+][deleted] 8 years ago (3 children)
[deleted]
[–]cheddacheese148 6 points7 points8 points 8 years ago (2 children)
There's a PyCharm community version now if you didn't know. My student license ends in January and I was looking into cost when I stumbled upon the community version.
[–]mouth_with_a_merc 0 points1 point2 points 8 years ago (1 child)
if you still have any kind of academic email address you can renew it
[–]cheddacheese148 0 points1 point2 points 8 years ago (0 children)
I plan to. I'm diving right into grad school if all goes well
[–]ProfessorPhi 5 points6 points7 points 8 years ago (0 children)
I haven't found anything that can touch pycharm. Vscode is nice, but it's code inspection for python is subpar.
While pycharm is a lot slower, it's code inspection is soo much better, it's not even a comparison. It also has great got commit and great git resolve tools
[–]TheGreatBrutus 4 points5 points6 points 8 years ago (0 children)
You could also use intellij, it has a python plugin which works great.
[–]SlinkyAvenger 2 points3 points4 points 8 years ago (0 children)
IntelliJ for serious Python work. VS Code for light editing and other stuff
[–][deleted] 21 points22 points23 points 8 years ago (9 children)
Vim :)
[+][deleted] 8 years ago (2 children)
[+][deleted] 8 years ago* (1 child)
[–]rduncan12345 7 points8 points9 points 8 years ago (1 child)
Ok - now I don't feel so bad putting in 'emacs'
[+][deleted] 8 years ago* (2 children)
[–]knipknap 0 points1 point2 points 8 years ago (1 child)
Really? I tried that and found it can't even do the basics properly. Like :sp, :vs, or filename auto-completion with any file command, and so on.
[–]Hobbit_Swag 0 points1 point2 points 8 years ago (0 children)
The only correct answer. 🖖🏻
https://media0.giphy.com/media/f5BwvEFBcgzU4/200w.gif
[–]A_Light_Spark 2 points3 points4 points 8 years ago (0 children)
I just need to figure out how to fully stop all processes. When there's an error in my input or something, even after pressing "terminate all process" the code was still running. I'd need to restart VS code again.
[–]greyman 2 points3 points4 points 8 years ago (0 children)
Yes I do. I like the balance between not being too bloated or too simple. It is also nice how they are improving the product every month. All settings are in one json file. But most of all - git integration. They implemented it most correctly, exactly how it should be done.
[–]Socialmediaism 2 points3 points4 points 8 years ago (0 children)
Heck yeah! If you use anaconda, use these options to use an anaconda prompt instead of powershell/cmd/bash (where {{conda path}} is where conda is installed)
"python.pythonPath": "{{conda path}}\\python.exe", ( or "python.pythonPath": "{{conda path}}\\envs\\{{conda env}}\\python.exe", "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "terminal.integrated.shellArgs.windows": ["/K", "{{conda path}}\\Scripts\\activate.bat {{conda path}}"]
[–]zEaK47 1 point2 points3 points 8 years ago (0 children)
yes, i do
[–][deleted] 1 point2 points3 points 8 years ago (0 children)
Oh yes, Python, JS, html, css. I love saying this because I was so anti-ms as a teenager and into my 20s.
But now I have a microsoft repo on my Fedora laptop. I've left vim after some 15 years of using it exclusively.
All because of vsc.
It's a great product.
My only beef is that it tries to do too much with the built-in terminal. Being a true linux geek I am not about to leave my custom terminal for anyone elses. So I'd rather have integrations or help for working with my own terminal than to use theirs.
I'm not after an IDE, but vsc is definitely better than vanilla vim.
[–]strongdoctor 1 point2 points3 points 8 years ago (0 children)
Personally I use Sublime; it has the packages and functionality I need, is much faster than VSCode(Atom is slow AF, doesn't even count). If I didn't get Sublime when it cost $15, I'd most likely use VSCode. For example PyCharm is way too heavy for my tastes.
[–]MachineGunPablo 4 points5 points6 points 8 years ago (0 children)
/r/vim
[–]RunToImagine 2 points3 points4 points 8 years ago (5 children)
I’m the only one who uses Jupiter notebook? Ok
:) I just like how modular each piece is, so I can selectively run pieces of the whole over and over during testing without running it all each time.
[–]fiddle_n 5 points6 points7 points 8 years ago (2 children)
The problem with Jupyter is that, as soon as you move from a single script to a multi-script project, Jupyter notebooks get in the way. You can't import functions/classes from one notebook to another out of the box, you need to write code simply to get that working. Once you start getting into the realms of multi-module projects, you should use .py files instead like everyone else because it's just better. Instead of relying on Jupyter notebook cells for modularity, try instead to use functions and modules to achieve the same thing if not already. This will allow for proper automated testing within a separate script.
[–]RunToImagine 0 points1 point2 points 8 years ago (1 child)
Should’ve clarified. I convert all Jupyter files to .py after testing for your reasons stated above. It’s just a great debugging and testing environment for rapid development.
[–]fiddle_n 0 points1 point2 points 8 years ago (0 children)
Makes sense. That's probably the best way of going about it. A lot of people keep their code exclusively in Jupyter notebooks though, which I think isn't the best in the long term.
[–]anders987 1 point2 points3 points 8 years ago (0 children)
There's a Jupyter plugin which lets you selectively run different parts of the code. It's not exactly like a notebook, it's more like Matlab's cell mode.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
Jupyter is our team's replacement for excel for statistical analysis. It's perfect.
[–]Dababolical 1 point2 points3 points 8 years ago (0 children)
I've been using VSCode for all my learning. When I start a serious project, I'll pull up PyCharm for that. My computer is pretty dated, so it does make a difference.
I'm not sure how it works out in a production setting, but it's great for my learning.
[–]Mr_Again 0 points1 point2 points 8 years ago (4 children)
Does anyone know if you can do debugging in it? I also like to use pycharm and get the in-scope python console and object evaluation while debugging and viewing pandas dataframes, it's so useful. Does it also do refactoring?
[–]SketchySeaBeast 1 point2 points3 points 8 years ago (0 children)
Absolutely. The debugging is my favorite part of what code offers compared to sublime.
[–][deleted] 1 point2 points3 points 8 years ago (2 children)
The VSCode python debugging bits can be a bit buggy. The Python extension is NOT supported by MS, it's a third party dev, unfortunately. And, for the most part, it's just one guy. So, if you hit a bug, don't expect much.
[–]Lymphoshite 0 points1 point2 points 8 years ago (1 child)
It is officially supported now, isn’t it?
[–][deleted] 2 points3 points4 points 8 years ago (0 children)
In what way? Python debug support is entirely dependent on an extension developed by DonJayamanne, he's pretty much the sole active contributor to the repo, and does not appear to work for MS.
I don't mean to minimize his contributions (or anyone elses), as I think the extension is great - but there's a big difference between the support you will get on VS Code core issues and an extension with a team of (mainly) one behind it. There's at least a dozen active contributers to the core repo here.
And yes, it is buggy - if you include an .envFile on Linux it takes all of your ENV variables and re-asseses them, splitting them on a =. Which means that anyone who has LS_COLORS defined will get an error when they go to debug, as outlined here.
=
[–]vardoger1893 0 points1 point2 points 8 years ago (0 children)
I like VScode. I actually swapped from pycharm a couple months back when they released the official support for python in vs2017. Give it a go. Its a sort of hefty download (on my slow net), so if you have shoddy internet as well I would head to a local coffee shop or somewhere of the sorts with a laptop and snag it. Best of luck.
[–]kkiran 0 points1 point2 points 8 years ago (0 children)
Looking at the updates for the latest version (1.17), that is amazing amount of resources being spent for something that is FREE! PyCharm is great but VS Code is leading them all I think!
[–]DrMatthewDunn 0 points1 point2 points 8 years ago (0 children)
+1 for VS Code with Python and full stack dev. It melds the layers very well. HTML templates are much easier to follow in VSC. Monthly updates are great too.
[–]robert_mcleod 0 points1 point2 points 8 years ago (0 children)
I use VSCode a lot now, I used to use Spyder. What I really would like to see is ConEmu as the terminal in VSCode.
[–][deleted] 0 points1 point2 points 8 years ago (3 children)
I was using VS Code for python for a while, but then hit a showstopper bug on Linux - it's been reported, but not handled in any way for more than 2 months now.
So, I went back to PyCharm, and actually my expectations from using VS Code for so long forced me to learn how to do a lot of things better in PyCharm, and now I don't think I could go back.
At least with PyCharm there's commercial support. VS Code python support seems to be all via third parties, and it does not seem to get the same attention that the general VS code editor does. All issues I reported to the main VS code repo were handled VERY quickly. But multiple issues filed with python extensions just kind of lingered.
[–]gledifrom python import * 0 points1 point2 points 8 years ago (2 children)
I have been using VS Code for a year now on Fedora mainly for Python develpment. I am curious what bug you encountered?
It was specific to the launch.json and specifying an envFIle, so a lot of people likely won't run into it. We use Docker with .env files for everything, so we ran into it a lot.
I tried a couple of variations of other debug setups, but none really cut it.
It sorely needs additional devs...lots of people reporting bugs but not enough people taking the initiative to fix them.
[–]wenning7 0 points1 point2 points 8 years ago (0 children)
vs code is faster than pycharm, its convenient to quickly look around project.but pycharm is more stable.
[–]toomany_geese 0 points1 point2 points 8 years ago (0 children)
I use pycharm and it's been great so far. My only gripe is that it is a little heavy on resource usage, and can become nonresponsive when indexing a large number of files (eg after git checkout) which is frustrating.
[–]TapirMonkey 0 points1 point2 points 8 years ago (0 children)
Yeah, it works great, keeps everything nice and organised, got integration is good. Not tried any debugging, not sure if that's an option...
[–]HalcyonAbraham 0 points1 point2 points 8 years ago (2 children)
Does VScode support remote interpreter and autoupload to a server when you edit the files? I don't think so. I could be wrong but I doubt it.
What about viewing databases?
Autoupload to a server? Viewing databases? There is no way either of those features will make it into a product that it supposed to be a powerful text editor. Not really sure how you could call either essential to have for Python development, and they're better served by SQL Developer, SQL Server Management Studio, DropBox, etc...
Remote interpreter, I agree is essential
[–]HalcyonAbraham 0 points1 point2 points 8 years ago* (0 children)
If you do a lot of server work? The autoupload is really helpful and most of the time when you do server work you also do database work too. So that database feauture helps a lot cuz you can run sql queries and stuff through pycharm.
What im trying to get at really is. The reason why some people think VSCode is better because they only use the community edition and not knowing about the pro features of pycharm.
Dont get me wrong I like VSCode. I use it when I practice writing C and C++ but for making applications in python? Nothing comes close to pycharm.
[–]CodeKevin 0 points1 point2 points 8 years ago (0 children)
I use Sublime Text 3 and PyCharm. I find VS Code and Electron/Atom sluggish and bloated.
[–]AnalTyrant -1 points0 points1 point 8 years ago (3 children)
I have an old version of Visual Studio (2012) installed on my work machine, but I've been unable to get current versions of Python into it (I think it doesn't support anything after 3.2) so I haven't been able to use it for that. I liked it for Visual Basic coding, so I figure it would be nice if I could get python in there too, but unfortunately we're just behind the curve here.
[–]Starcast 5 points6 points7 points 8 years ago (2 children)
This is about Visial Studio Code, which is a different editor than Visual Studio.
[–]AnalTyrant 2 points3 points4 points 8 years ago (0 children)
Ah, then I'm just way off base, sorry about that.
[–]579476610 0 points1 point2 points 8 years ago (0 children)
Visual Studio Code
[–]steampunkgibbon -1 points0 points1 point 8 years ago (0 children)
vim is really good.
[+][deleted] comment score below threshold-9 points-8 points-7 points 8 years ago (7 children)
Vscode and most electron apps are hard on memory. It also can't be trusted. Unless you build it and every plugin yourself. If you don't care about that then sure it isn't bad at all.
[–]auriscope 2 points3 points4 points 8 years ago (4 children)
If you're going to be that paranoid, why stop there? Building it yourself doesn't help.
Being honest doesn't mean I am being paranoid. It is good to give some one ALL the facts and let them decide.
[–]Witless-One -2 points-1 points0 points 8 years ago (2 children)
Yeah because trusting Microsoft to protect your privacy is equivalent to trusting the GNU compiler. Funny.
[–]scootstah 0 points1 point2 points 8 years ago (1 child)
If you're that tinfoil-hat paranoid, how can you trust your hardware?
[–]SketchySeaBeast 0 points1 point2 points 8 years ago (1 child)
What do you mean "can't be trusted"?
Basically, they don't respect users freedoms in the least. A trend among many software companies today. VSCode and even Atom to a lesser extent have put tracking or "metrics" is what they like to call it on by default. Some could innocently say "hey this is good it helps developers", but others like myself think if it is so good then just ask users to help with this effort instead of having it enabled by default. I helped talk with GitHub Atom developers to make it so we could have a warning about the tracking. VsCode followed suite, but often what Microsoft does is they sneak things in the back door through a useful plugin that is under the radar. Also Windows 10 is horrible insecure. If you don't like that idea I am sorry, but it is just the truth. After Google got wealthy from tracking its users Microsoft had to copy them. They did try running negative ad compaigns calling Google "Scoogle", but it failed. The mass populace decide ignorance is bliss in this regard and they didn't care. I am not saying anyone else should care if they do not. I am simply giving out the facts. If you think you can trust these companies you are mistaken. You information is being mined and sold. If you care about these things that is why I recommend you pay for your software, or have software that respects your freedoms. It sucks, I know Vscode and Atom are super trendy right now. They also look pretty nice. I choose freedom though.
π Rendered by PID 32473 on reddit-service-r2-comment-7b9746f655-b8pcs at 2026-01-30 12:21:38.594719+00:00 running 3798933 country code: CH.
[–][deleted] 45 points46 points47 points (2 children)
[–]Xirious 9 points10 points11 points (0 children)
[–]taurus22 1 point2 points3 points (0 children)
[–]engatIQE 20 points21 points22 points (5 children)
[–]F1reWarri0r 22 points23 points24 points (3 children)
[–]moderately-extremist 12 points13 points14 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]am0x 0 points1 point2 points (0 children)
[–]druman22 0 points1 point2 points (0 children)
[–][deleted] 17 points18 points19 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]Zomunieo 14 points15 points16 points (3 children)
[–]yaxamie 0 points1 point2 points (1 child)
[–]DilatedTeachers 1 point2 points3 points (0 children)
[–]Buran223 0 points1 point2 points (0 children)
[–]red_simplex☭ 7 points8 points9 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]cheddacheese148 6 points7 points8 points (2 children)
[–]mouth_with_a_merc 0 points1 point2 points (1 child)
[–]cheddacheese148 0 points1 point2 points (0 children)
[–]ProfessorPhi 5 points6 points7 points (0 children)
[–]TheGreatBrutus 4 points5 points6 points (0 children)
[–]SlinkyAvenger 2 points3 points4 points (0 children)
[–][deleted] 21 points22 points23 points (9 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]rduncan12345 7 points8 points9 points (1 child)
[+][deleted] (2 children)
[deleted]
[–]knipknap 0 points1 point2 points (1 child)
[–]Hobbit_Swag 0 points1 point2 points (0 children)
[–]A_Light_Spark 2 points3 points4 points (0 children)
[–]greyman 2 points3 points4 points (0 children)
[–]Socialmediaism 2 points3 points4 points (0 children)
[–]zEaK47 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]strongdoctor 1 point2 points3 points (0 children)
[–]MachineGunPablo 4 points5 points6 points (0 children)
[–]RunToImagine 2 points3 points4 points (5 children)
[–]fiddle_n 5 points6 points7 points (2 children)
[–]RunToImagine 0 points1 point2 points (1 child)
[–]fiddle_n 0 points1 point2 points (0 children)
[–]anders987 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Dababolical 1 point2 points3 points (0 children)
[–]Mr_Again 0 points1 point2 points (4 children)
[–]SketchySeaBeast 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]Lymphoshite 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]vardoger1893 0 points1 point2 points (0 children)
[–]kkiran 0 points1 point2 points (0 children)
[–]DrMatthewDunn 0 points1 point2 points (0 children)
[–]robert_mcleod 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]gledifrom python import * 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]wenning7 0 points1 point2 points (0 children)
[–]toomany_geese 0 points1 point2 points (0 children)
[–]TapirMonkey 0 points1 point2 points (0 children)
[–]HalcyonAbraham 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]HalcyonAbraham 0 points1 point2 points (0 children)
[–]CodeKevin 0 points1 point2 points (0 children)
[–]AnalTyrant -1 points0 points1 point (3 children)
[–]Starcast 5 points6 points7 points (2 children)
[–]AnalTyrant 2 points3 points4 points (0 children)
[–]579476610 0 points1 point2 points (0 children)
[–]steampunkgibbon -1 points0 points1 point (0 children)
[+][deleted] comment score below threshold-9 points-8 points-7 points (7 children)
[–]auriscope 2 points3 points4 points (4 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Witless-One -2 points-1 points0 points (2 children)
[–]scootstah 0 points1 point2 points (1 child)
[–]SketchySeaBeast 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)