Settings

Theme

Modern Python Developer's Toolkit

pycon.switowski.com

66 points by grigy 5 years ago · 23 comments

Reader

yedpodtrzitko 5 years ago

> modern

> `setup.py` / `setup.cfg` / `requirements.txt`

Yeah... no. Considering there are tools like Poetry and `pyproject.toml` superseding setup.*, I wouldn't call the aforementioned "modern"

  • anand-bala 5 years ago

    I personally use Setuptools (.py and .cfg) with pyproject.toml for the build settings.

    Last I used poetry was a couple of years ago, and IIRC it didn't gel well with Conda environments.

404mm 5 years ago

Pointing people to VS Code just because it’s one of top three, where the other two options are Visual Studio and NP++ is strange to say at least.

VS Code is probably one of the top five options, but not mentioning PyCharm as one of the top choices is not right.

There’s a significant difference between a general purpose pluggable code editor, such as VC Studio, Atom, Sublime… and actual IDE made for Python.

  • memco 5 years ago

    I personally find VSCode the easiest editor to set up for Python development and the most powerful. I tried to set up the remote debugging in PyCharm, but it didn’t work. The refactoring tools available via pylance, linting with pycodestyle and the remote editing in VSCode took very little time or effort to set up and allow me to use the same editor I use for PHP, Zig and Rust. I have been working to set up neovim for a similar experience, which has access to a lot of the same features, but it has taken me many more hours of configuration. I understand there’s a lot of reasons not to like VSCode, but in terms of functionality and ease of setup for Python it has been the best for me.

    • 404mm 5 years ago

      I started my Python journey in Atom with some plugins, mainly using pylama. It was pretty decent and I still use it for ad-how code changes. When I work on anything more complex, I just switch over to pycharm because it also helps my brain to switch to “Python mode” better :)

      Glad you found your happy place, that matters more than the actual feature set provided, IMO.

  • timpfe 5 years ago

    Fully agree. Intellij and Pycharm together got 38.8% of votes, which clearly shows that the jetbrains cosmos is definitely a popular contender

  • barefeg 5 years ago

    Python is not open source and crucial features like remote python interpreter is behind a paywall. I don’t see why anyone would use pycharm

    • evgen 5 years ago

      We use it because it is a better IDE. I am a professional who gets paid for my output and I pay for tools that enable me to get more work done faster and with fewer errors. If PyCharm saves me one hour every year over other alternative editors it will have paid for itself. I assure you that it pays for itself every year.

    • _joel 5 years ago

      > Python is not open source

      Eh? Do you mean pycharm? Even so what's wrong with a professional product being paid-for and closed source? Developers have to eat too, many of which I'd imagine also contribute to other opensource projects, using... pycharm.

jacksonkmarley 5 years ago

Title could be more helpful if it included "(video)". Then I would not have clicked through.

  • grigyOP 5 years ago

    It's not just a video. There is a table of contents on the left side with the links.

    • jacksonkmarley 5 years ago

      Good point, I didn't realise that.

      Not sure if many others made the same assumption, but that landing page feels to me like it should have a more obvious way to feed into the text-based content.

rgwant 5 years ago

Apart from the fact that the "editor" section sounds like an infomercial for VSCode, why would you overload a beginner with all that virtual environment bloat?

The whole "open" source system is marching backwards towards inscrutable IDEs that do work by magic and leave the user clueless.

  • simonw 5 years ago

    Virtual environments are, sadly, absolutely crucial for Python beginners to get their heads around if they are to do anything more advanced then "hello world".

    When I'm getting someone started I usually say:

    "There is a magic incantation involved in Python development called 'activating your virtual environment' - if stuff isn't working as you expect, check that you have done this. Development environments are the hardest thing about learning to program. I'm so sorry."

    • BryanBeshore 5 years ago

      pip freeze > requirements.txt

      When first learning python and virtual environments, it took me a little bit of time to understand that the virtual environment is basically a clean slate.

      The command above saved a lot of time. I’d go so far as to having a set of requirements files ready to go for certain types of projects just to get started.

  • anthonygd 5 years ago

    Back when I started working with Python professionally, virtual environments were required before I could grok things. I just could not wrap my head around the crazy inconsistent behavior and nightmare dependencies until I discovered virtual environments.

    I've never become a Python fan, but I really don't think it's even usable without virtual environments.

    • heresie-dabord 5 years ago

      Agreed. I understand that some programmers dislike braces, parentheses, and semi-colons. The Python language itself offers notation with a simple set of characters. I do use Python but I prefer other languages and notations.

      But as a software project, Python is mayhem. pip+pypi is an embarrassment. After the difficult 2.x -> 3.x transition, the 3.x->3.8 period inflicted a world of pain on anyone trying to develop and deploy stable tooling.

Barrin92 5 years ago

I don't have the time right now to watch the whole video so sorry if it's addressed, but what is the current state of packaging python applications for users? This was the biggest pain point for me the last time I worked with python outside of writing libraries. I think I was working on a Qt app and it was such a pain to find a way in particular to target multiple platforms.

  • coopreme 5 years ago

    Targeting multiple platforms? Use docker. I like Pipenv when developing, then using venv in the docker deployment after locking pipenv to a requirements .txt.

jlangemeier 5 years ago

I'm still a bit befuddled as to why Docker is necessary in this case at all. Python has enough tools for package and dependancy management, if you're wanting to set up a remote machine for personal development, again Docker seems like overkill. I understand and fully accept that it's part of the development ecosystem, and it's good to get and be comfortable with it, but much like the suggestion for VS Code (which I use in my day to day, with many of the extensions mentioned) it seems like overkill for a beginner and overly specific for an intermediate++ developer, who should be more in a camp of "use whatever makes me most productive".

shroom 5 years ago

Thanks! I’m currently learning Python and will find this useful.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection