![]() ![]() How to read from files, how to write data to them, what file seeks are, and why files should be closed. Working With File I/O in Python – Learn the basics of working with files in Python.Write More Pythonic Code by Applying the Things You Already Know – There’s a mistake I frequently make when I learn new things about Python… Here’s how you can avoid this pitfall and learn something about Python’s “enumerate()” function at the same time.Interfacing Python and C: The CFFI Module – How to use Python’s built-in CFFI module for interfacing Python with native libraries as an alternative to the “ctypes” approach.Please enable JavaScript to view the comments powered by Disqus. In this post I’ll review the status of Python development with Sublime Text as of 2016. Sublime Text for Python development - My 2016 review – When you ask for editor recommendations as a Python developer one of the top choices you’ll hear about is Sublime Text.This article explains my setup and some tweaks that make Python programmers happy. Setting up Sublime Text for Python development – I recently started using Sublime Text 2 more and more as my main editor for Python development.In this 3 minute screencast I’ll show you how to setup the command and what you can do with it. How to use Sublime Text from the command line – Sublime Text comes with a handy command line tool (“subl”) that lets you control Sublime Text from the terminal.A better Python REPL: bpython vs python – A quick video that demonstrates bpython, an awesome alternative Python interpreter.Super useful if you work with Git from the command line! Using Sublime Text as your Git editor – A quick screencast that shows you how to use Sublime Text as your Git editor.If you need some more help setting this up and a quick demo of what you can do with this feature, watch my video below: Close the preferences window – that’s it!.Under Semantic History, set the first option to Open with editor… and then pick your favorite editor (I use Sublime Text 3).Find the section that says Semantic History. Click on Profiles in the top row, then click Advanced all the way to the right.Open the iTerm2 preferences by clicking on iTerm2 → Preferences in the menu bar (or press Cmd+,).Here’s how to set up Semantic History in iTerm2: I use it all the time to click and jump to failed test cases with the Pytest test runner, for example. This unbelievably handy if you’re running your unit tests from the command line. The amazingly cool part is that this also works with line numbers, so if you click on something like test_myapp.py:42 in the terminal your editor opens test_myapp.py and moves the cursor to line 42! □ py file, for example, it will open in your editor. ![]() So if you click on a folder name it will open in the Finder, and if you click on a. With this so called Semantic History feature you can configure iTerm2 to open folders and files in their default application when you press Cmd and then click on them. Among other things, this is super handy for debugging tests. ITerm2 for macOS has a little known feature that lets you open files and folders simply by Cmd+Clicking on them in the terminal. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |