How to prepare yourself for the summer of working in Python using the Linux environment?

I have only used Windows for programming so far. Now I have an internship starting in two weeks, and I will only use the Linux environment with the Python programming language. I installed Ubuntu on my system, but not subject to shell scripts.

I need some tips on how to quickly learn how to quickly use a Linux terminal. Any books or web resources you can offer?

Also, is there a specific IDE that is usually preferred for Python programming on Linux, or is Vim preferable? How can I better prepare for an internship?

Thanks for taking the time.

+4
source share
10 answers

As an intern, you will want to use the tools that your mentor is most comfortable with. If you get stuck, you can quickly ask for advice.

Learning your path with vi, vim, or emacs will help you get started. The basic concepts used in one are passed on to the other. You will need to open and read files, search for files, edit and save files, and also learn how to correctly apply any python formatting helpers.

You should also familiarize yourself with version control if you have not already done so. Again, anyone will do, you need to focus on concepts and etiquette, and not on a specific tool.

The purpose of the internship (and indeed your entire time at the university) should be used to study concepts, not specific tools. If you study the concepts, you will be well placed to apply these concepts with any tool. You will also “learn to learn” a new tool that is truly valuable.

+5
source

The lack of knowledge about the use of scripts in the shell should not matter in this case, although it will be difficult to study. I read some shell tutorials and put them into practice. Try to do everything from the command line, including find (grep), find / replace everything (sed), find files (find), automate things using python scripts, etc. In principle, do not be fooled. You will go so much. You will probably also be wondering how you dealt with Windows.

What I use depends on the project. I really like Eclipse + PyDev, but what I prefer, I also use Vim depending on where I / what I do. Remember that you can just enter python from the command line and it will put you in a python environment.

+2
source

I recommend Eclipse + PyDev too. You can quickly get started with this development environment. I also recommend the Dive Into Python website. It provides you with a free online version of the Dive Into Python book, which is very easy to read, easy to understand, and very suitable for Python beginners. If you really need a paper book at hand, Learning Python , aka The Animal Guide , is simply the best.

+2
source

Learn to understand human pages (ual).

For almost any old linux command / program, there is a help page that usually explains this command with good details.

So, the basics of navigating the file system:

Show catalog contents (list)

 ls 

Show hidden files

 ls -a 

Show details

 ls -l 

Change directory

 cd /full/path/name 

Print current directory

 pwd 

Delete a file

 rm file 

Delete directory (recursive)

 rm -r directoryName 

Make directory

 mkdir directoryName 

Move (or rename) file

 mv /path/to/file /new/path/to/file 

Show man page for mv

 man mv 

Vim training may be required, depending on your international environment. I am doing my Python (and all that isn’t just text editing) in Eclipse. In any case, you must learn enough to open the file, make some changes, and save the changes to Vim.

Keep in mind, Ubuntu is very easy. To make things harder, use the command line for every conceivable thing. Open programs by entering their names in the terminal. View your files using the terminal. Easy installation with vim. This should provide good practice on the day you need SSH on your computer in Neverland, and download and install a local copy of your favorite interpreter from the source to configure the cron job to run the script to play the clock noise.

+1
source

In addition to the great advice already written, I suggest you install IPython (Open a terminal using applications> Accessories> Terminal and type):

 sudo apt-get install ipython 

Also on the terminal, you can enter ipython to start the Python interpreter. Unlike the python built-in interpreter, ipython gives you a tab.

For example, if you type the name of an object followed by a period and TAB (for example, sys.[TAB] ), ipython will show you (almost) all the attributes of the object.

Enter a question mark after the name of the object (for example, sys? ), And you will receive documentation on this object.

This is a great way to learn Python.

+1
source

not affected by shell scripts

Good! You have Python, so I hope it shouldn't be necessary to resort to writing real shell scripts. It may be more powerful than DOS batch files, but it is also ugly.

I need some tips on how to quickly learn how to quickly use a Linux terminal.

Something like this ?

Also, when studying commands, you will want to get used to using tabs and calling the arrow command (if you are not already doing this with the Windows command line), scroll through the shift arrows and soon. It is also useful to know the command suffix & (run in the background), ctrl-C-to-stop, ctrl-Z-to-pause, jobs and screen .

By the way, if you spend some time in the interactive Python interpreter, then you should add a tab . (This is also important on Windows, but on Win you usually don't get the pyreadline by default.)

Is there a specific IDE that is usually preferred for Python programming on Linux

Like Windows, there are IDEs available if you want them, but many people just use a regular text editor. vim great if you like it. nano is another text editor in terms that usually turns out to be relatively simple. The default desktop editor of Ubuntu gedit is gedit too. This is a matter of personal taste.

(If you work for a particular company, they may have their own development environment, which they would prefer to use.)

+1
source

For the Python IDE, I recommend using either IDLE or Eclipse with PyDev.

Keep in mind that you can also just use python on the linux command line. It supports loading code from files, and if you use two command windows, one of them will be your "REPL", where you will run python and dynamically load the code, and the other window may launch your editor.

Regarding the linux command line, I cannot recommend any great resources. However, you will be a great start if you immerse yourself in this environment and only use Linux for the next 2 weeks. Just keep learning, and when you don’t know how to do something, read the man page or Google to find the answer.

0
source

for a very beginner entry into the command line, check out: http://en.flossmanuals.net/CommandLineIntro/GettingStarted

0
source

As for the Python editor, I personally prefer using SciTE . This is just a text editor programmer with syntax highlighting for different languages. I prefer a lightweight editor in a more complex environment, but if you want a complete IDE, you can always try NetBeans , IDLE, or Komodo (all of which are available on both Windows and Linux).

0
source

as for terminall and a quick way to figure it out and find it out, there are good cheat sheets on the net like this: http://fosswire.com/post/2007/8/unixlinux-command-cheat-sheet/

0
source

Source: https://habr.com/ru/post/1306737/


All Articles