ΠΠ°ΠΊ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠΈΡΡ Π³ΠΈΡΡ Π°Π± ΠΊ pycharm
Set up a Git repository
When you clone an existing Git repository, or put an existing project under Git version control, PyCharm automatically detects if Git is installed on your computer. If the IDE can’t locate a Git executable, it suggests downloading it.
PyCharm supports Git from the Windows Subsystem for Linux 2 (WSL2), which is available in Windows 10 version 2004.
If Git is not installed on Windows, PyCharm searches for Git in WSL and uses it from there. Also, PyCharm automatically switches to Git from WSL for projects that are opened when you use the \\wsl$ path.
Check out a project from a remote host (clone)
PyCharm allows you to check out (in Git terms clone ) an existing repository and create a new project based on the data you’ve downloaded.
In the Get from Version Control dialog, specify the URL of the remote repository you want to clone, or select one of the VCS hosting services on the left.
If you are already logged in to the selected hosting service, completion will suggest the list of available repositories that you can clone.
If your project contains submodules, they will also be cloned and automatically registered as project roots.
Put an existing project under Git version control
You can create a local Git repository based on an existing project sources.
Associate the entire project with a single Git repository
Open the project that you want to put under Git.
Choose Enable Version Control Integration from the VCS Operations Popup Alt+` or from the main VCS menu.
After VCS integration is enabled, PyCharm will ask you whether you want to share project settings files via VCS. You can choose Always Add to synchronize project settings with other repository users who work with PyCharm.
Associate different directories within the project with different Git repositories
Open the project that you want to put under Git.
In the dialog that opens, specify the directory where a new Git repository will be created.
Git does not support external paths, so if you choose a directory that is outside your project root, make sure that the folder where the repository is going to be created also contains the project root.
If you are creating multiple Git repositories inside the project structure, repeat the previous steps for each directory.
After you have initialized a Git repository for your project, you need to add project files to the repository.
Add files to the local repository
Select the files you want to add to Git or the entire changelist and press Ctrl+Alt+A or choose Add to VCS from the context menu.
You can also add files to your local Git repository from the Project tool window: select the files you want to add, and press Ctrl+Alt+A or choose Git | Add from the context menu.
Exclude files from version control (ignore)
Sometimes you may need to leave certain files unversioned. These can be VCS administration files, artifacts of utilities, backup copies, and so on. You can ignore files through PyCharm, and the IDE will not suggest adding them to Git and will highlight them as ignored.
Git lets you list ignored file patterns in two kinds of configuration files:
Patterns listed in this file only apply to the local copy of the repository.
This file is created automatically when you initialize or check out a Git repository.
These files are checked into the repository so that the ignore patterns in them are available to the entire team. Therefore, it is a most common place to store the ignored file patterns.
Locate the unversioned file or folder you want to ignore in the Local Changes view or in Project tool window. File colors in these views help you identify the status of the file.
File colors in these views help you identify the status of the file.
Check project status
PyCharm allows you to check the status of your local working copy compared to the repository version of the project. It uses specific colors to let you see which files have been modified, which new files have been added to the VCS, and which files are not being tracked by Git.
Open the Local Changes view.
The Changes changelist shows all files that have been modified since you last synchronized with the remote repository (highlighted in blue), and all new files that have been added to the VCS but have not been committed yet (highlighted in green).
The Unversioned Files changelist shows all files that have been added to your project, but that are not being tracked by Git.
Track changes to a file in the editor
You can also track changes to a file as you modify it in the editor. All changes are highlighted with change markers that appear in the gutter next to the modified lines, and show the type of changes introduced since you last synchronized with the repository. When you commit changes to the repository, change markers disappear.
The changes you introduce to the text are color-coded:
line added.
line changed.
line deleted.
You can manage changes using a toolbar that appears when you hover the mouse cursor over a change marker and then click it. The toolbar is displayed together with a frame showing the previous contents of the modified line:
Instead of reverting the whole file, you can copy any part of the contents of this popup and paste it into the editor.
Add a remote repository
If you created a Git repository based on local sources, you need to add a remote repository to be able to collaborate on your Git project, as well as to eliminate the risks of storing all of your codebase locally. You push changes to a remote repository when you need to share your work and pull data from it to integrate changes made by other contributors into your local repository version.
Define a remote
Create an empty repository on any Git hosting, such as Bitbucket or GitHub. You can create a repository on GitHub without leaving PyCharm: see Share a project on GitHub.
If you haven’t added any remotes so far, the Define remote link will appear instead of a remote name. Click it to add a remote.
Add a second remote
In some cases, you also need to add a second remote repository. This may be useful, for example, if you have cloned a repository that you do not have write access to, and you are going to push changes to your own fork of the original project. Another common scenario is that you have cloned your own repository that is somebody else’s project fork, and you need to synchronize with the original project and fetch changes from it.
To edit a remote (for example, to change the name of the original project that you have cloned), right-click the remote branch in the Branches pane of the Git Log tool window, and select Edit Remote from the context menu.
You can also edit a remote from the Push Dialog by clicking its name.
To remove a repository that is no longer valid, right-click it in the Branches pane of the Git Log tool window, and select Remove Remote from the context menu.
GitHub
Register a GitHub account
To be able to retrieve data from a repository hosted on GitHub, or share your projects, you need to register your GitHub account in PyCharm.
If you do not want to specify your credentials each time you sync with a remote, or push your commits, you can configure PyCharm to save your account information (see Configure a password policy).
Register an existing account
In the dialog that opens, specify your GitHub server URL (either github.com, or an enterprise instance).
Do one of the following:
If you already have a token, click the Use Token link and paste it there.
If you want to obtain a new token, enter your login and password. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application. See Creating a personal access token for more details on GitHub tokens.
Create a new GitHub account
Register your account on the Sign up for GitHub page that opens.
Return to the PyCharm settings and specify your credentials.
Manage multiple accounts
You can use multiple GitHub accounts in PyCharm: for example, a personal account to work on an open-source project, and a corporate account for your main job.
If you cannot view pull requests in the IDE, or you get an error when you log in to a GitHub account and perform any git operation, refer to the Operations Against a GitHub Repository Are Failing article for troubleshooting tips.
How to Integrate GitHub with PyCharm for Data Science Projects?
Itβs obvious for a Data Scientist like you to work on projects with version control. And besides this, you must be using the Python language as a major programming language. You know that there are many Python IDEs available in the market for making faster programming. PyCharm is one of them and itβs very popular among the programmers. Therefore in this post, you will know how to integrate GitHub with PyCharm in very simple steps.
Step 1: Download the Git Version Control Software
It is an open-source version control software. It is useful for creating version control locally. Popular companies like Google, Amazon, Netflix, and Facebook are using it. I will not get in detail to give entire information about GIT. Just download it and install it on your computer. π
Step 2: Make New or Edit Existing Projects
In this step, I will create a new Demo Project and enabling version control on it. If you have an existing project you can follow the same process. I created a new Project with the name GitTutorial. It has two Python Script βprint_number.pyβ and βprint_text.pyβ for tutorial purposes. Now after creating it just follow the steps to enable version control on it.
Go to the menu bar and click on the VCS > Import into Version Control > Create Git Repository. Then it will ask for Folder selection. You can choose your existing folders but I am selecting the newly created Folder GitTutorial.
After selecting the desired Folder, all files inside that folder will turn red.
Files Color Before Creating GIT Repository
Files Color After Creating GIT Repository: Red
What is it mean? It means that all these files are not added to the version control. To add the files right click on the file and click on Git>Add. After adding the files you will see the file turn green. It means the file has been successfully added to the version control. Similarly, you can add all the existing files.
You can also add all files inside the folder by selecting that folder and click add.
The next thing after adding the files is to finally commit the files. You can commit single or multiple files. Right-click on the folder or a single file and click on Git>Commit File. It will open the window like below.
Commit Window
In the first, you have the option to select or unselect files or Folder. In the commit message, you can put the message( text) in it. For example, I am writing Initial commit. At the bottom, you will see the Diff. Here you can see the previous versions of the code ( Any code Changes). After committing all the Files will go back to the default color from Green Color.
Step 3: Integrate Github with PyCharm
All the above steps will lead you to create version control of the project locally. The only local user can add and commit. What if you want to share the code with the other user? Then you will use Github. Github is a cloud version control that is a Cloud repository. Now if you want to integrate Github with PyCharm then follow the process done in this section.
Cloning and Pulling From Github
To integrate Github with PyCharm just go to VCS>Checkout from Version Control and Select Github. It will open up the window like below. Select the authorization type Password and enter your Github username and password. Select the desired repository URL. Now you can clone and Pull all the Files from that Url.
Pushing to the Github
Now the next thing is How to Push the Files created and committed in Step 2 to Github. To do this you have to Push the Files and Folder to the Github URL. Right-click on the File and Goto Git>Repository and click on Remotes. It will open up the window. Fill in the Name of the Repository (It can be anything.) and URL of the repository. In this example, I have added the name as GitTutorial and Github URL. It will check the URL and it will be added if it exists.
Add Github Remote URL here.
Now the final task is to push the files created in step 2 to Github Url. To do this Goto Git>Repository and click on Push. Select the name of the previously added repository (GitTutorial) and click on Push. After some time it will ask for access to Github. Put there your username and password and Login. It will successfully Push all the committed files in Step 2 to your Repository URL. In the same way, you can pull the changes from Github URL by going to Git>Repository and clicking on Pull.
Push to Github
Hurray! You have successfully integrated Github with PyCharm. I hope this article has solved your problem on How to Integrate Github with PyCharm. There are also other version control tools that you can integrate with Pycharm they are Mercurial and Subversion. But Integration with Github is Popular. If you any questions on Github and PyCharm then please contact us. We are always ready to help you. In the meantime, you can subscribe and like our dedicated Page on Data Science.
Other Questions
How to fix a memory error in Pycharm?
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
We respect your privacy and take protecting it seriously
Thank you for signup. A Confirmation Email has been sent to your Email Address.
ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ Git Π² IDE PyCharm Π±Π΅Π· CLI
ΠΡΠ΅ ΠΌΡ Π·Π½Π°Π΅ΠΌ ΠΎ ΠΏΡΠ΅ΠΈΠΌΡΡΠ΅ΡΡΠ²Π°Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ ΡΠΈΡΡΠ΅ΠΌ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ Π²Π΅ΡΡΠΈΠΉ ΠΊΠ°ΠΊ ΠΏΡΠΈ ΡΠ°ΠΌΠΎΡΡΠΎΡΡΠ΅Π»ΡΠ½ΠΎΠΉ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠ΅, ΡΠ°ΠΊ ΠΈ ΠΏΡΠΈ ΡΠ°Π±ΠΎΡΠ΅ Π² ΠΊΠΎΠΌΠ°Π½Π΄Π΅. Π‘Π΅Π³ΠΎΠ΄Π½Ρ Ρ Ρ ΠΎΡΠ΅Π» Π±Ρ ΡΠ°ΡΡΠΊΠ°Π·Π°ΡΡ ΠΎ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠ΅ Π² PyCharm ΡΠ°ΠΌΠΎΠΉ ΠΏΠΎΠΏΡΠ»ΡΡΠ½ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ Π²Π΅ΡΡΠΈΠΉ Git ΠΈ Π΅Π΅ GUI.
ΠΠ»Ρ Π½Π°ΡΠ°Π»Π°, ΠΏΡΠ΅Π΄Π»Π°Π³Π°Ρ ΡΠ±Π΅Π΄ΠΈΡΡΡΡ, ΡΡΠΎ Π½Π° ΠΌΠ°ΡΠΈΠ½Π΅ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½ ΡΠ°ΠΌ Git. Π MS Windows ΡΡΠΎ ΠΌΠΎΠΆΠ½ΠΎ ΡΠ΄Π΅Π»Π°ΡΡ ΠΎΡΠΊΡΡΠ² ΠΊΠΎΠΌΠ°Π½Π΄Π½ΡΡ ΡΡΡΠΎΠΊΡ ΠΈ Π½Π°Π±ΡΠ°Π² Π² Π½Π΅ΠΉ git βversion.
ΠΡΠ»ΠΈ Π²Π΄ΡΡΠ³ cmd Π½Π΅ ΠΏΠΎΠ½ΠΈΠΌΠ°Π΅Ρ ΡΠ°ΠΊΠΎΠΉ ΠΊΠΎΠΌΠ°Π½Π΄Ρ, Π·Π½Π°ΡΠΈΡ Git Π½Π΅ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½. Π’Π°ΠΊ ΠΊΠ°ΠΊ ΠΎΠ½ ΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠ²ΠΎΠ±ΠΎΠ΄Π½ΠΎ ΡΠ°ΡΠΏΡΠΎΡΡΡΠ°Π½ΡΠ΅ΠΌΡΠΌ ΠΠ, Π΅Π³ΠΎ ΠΌΠΎΠΆΠ½ΠΎ Π±Π΅ΡΠΏΠ»Π°ΡΠ½ΠΎ ΡΠΊΠ°ΡΠ°ΡΡ ΠΈ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ. ΠΠ΅ΡΡΠΈΡ Π΄Π»Ρ MS Windows Π΄ΠΎΡΡΡΠΏΠ½Π° ΠΏΠΎ ΡΡΡΠ»ΠΊΠ΅ https://gitforwindows.org.
Π Ρ ΠΎΠ΄Π΅ Π΄Π°Π»ΡΠ½Π΅ΠΉΡΠ΅ΠΉ ΡΠ°Π±ΠΎΡΡ, ΠΏΠΎΡΠ»Π΅ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ, ΡΠ°ΠΉΠ»Ρ Π±ΡΠ΄ΡΡ Π²ΡΠ΄Π΅Π»ΡΡΡΡΡ ΡΠΈΠ½ΠΈΠΌ ΡΠ²Π΅ΡΠΎΠΌ, ΡΠΈΠ³Π½Π°Π»ΠΈΠ·ΠΈΡΡΡ ΠΎ Π½Π°Π»ΠΈΡΠΈΠΈ Π½Π΅Π·Π°ΡΠΈΠΊΡΠΈΡΠΎΠ²Π°Π½Π½ΡΡ commit-ΠΎΠΌ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ. ΠΠΎΡΠ»Π΅ commit-Π° ΡΠ²Π΅ΡΠΎΠ²ΠΎΠ΅ Π²ΡΠ΄Π΅Π»Π΅Π½ΠΈΠ΅ Π±ΡΠ΄Π΅Ρ ΡΠ½ΠΈΠΌΠ°ΡΡΡΡ, Π΄Π°Π²Π°Ρ ΠΏΠΎΠ½ΡΡΡ, ΡΡΠΎ Π½Π΅ΡΠΎΡ ΡΠ°Π½Π΅Π½Π½ΡΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΠΎΡΡΡΡΡΡΠ²ΡΡΡ.
ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ Π² ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠ΅ ΡΠΈΡΡΠ΅ΠΌΡ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ Π²Π΅ΡΡΠΈΠΉ, Π΄Π°Π΅Ρ ΡΡΠ΄ Π½Π΅ΠΎΡΠΏΠΎΡΠΈΠΌΡΡ ΠΏΡΠ΅ΠΈΠΌΡΡΠ΅ΡΡΠ².
ΠΠΎΠ½Π΅ΡΠ½ΠΎ ΠΆΠ΅, Π΅ΡΡΡ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΡΠ°Π±ΠΎΡΡ Ρ Π²Π΅ΡΠΊΠ°ΠΌΠΈ: ΡΠΎΠ·Π΄Π°Π²Π°ΡΡ, ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²ΡΠ²Π°ΡΡ Π² Π½ΠΈΡ Π½ΠΎΠ²ΡΡ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½ΠΎΡΡΡ, ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΡ ΡΠ»ΠΈΡΠ½ΠΈΠ΅.
ΠΡΠ΅ Π²ΡΡΠ΅ΠΎΠΏΠΈΡΠ°Π½Π½ΡΠ΅ ΠΌΠ°Π½ΠΈΠΏΡΠ»ΡΡΠΈΠΈ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½Ρ Π½Π΅ ΡΠΎΠ»ΡΠΊΠΎ Ρ Π»ΠΎΠΊΠ°Π»ΡΠ½ΡΠΌ ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΠ΅ΠΌ, Π½ΠΎ ΠΈ, ΡΠ°Π·ΡΠΌΠ΅Π΅ΡΡΡ, Ρ ΡΠ΄Π°Π»Π΅Π½Π½ΡΠΌ, ΡΡΠΎ ΠΎΡΠΎΠ±Π΅Π½Π½ΠΎ ΠΏΠΎΠ»Π΅Π·Π½ΠΎ ΠΏΡΠΈ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΠ°Π±ΠΎΡΠ΅.
Π’Π΅ΠΏΠ΅ΡΡ, Π² ΠΏΡΠ°Π²ΠΎΠΌ Π½ΠΈΠΆΠ½Π΅ΠΌ ΡΠ³Π»Ρ ΠΌΡ ΠΌΠΎΠΆΠ΅ΠΌ Π²ΠΈΠ΄Π΅ΡΡ ΠΈ ΡΠΏΡΠ°Π²Π»ΡΡΡ Π»ΠΎΠΊΠ°Π»ΡΠ½ΡΠΌ ΠΈ ΡΠ΄Π°Π»Π΅Π½Π½ΡΠΌ ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΡΠΌΠΈ ΠΈ Π²ΡΠ΅ΠΌΠΈ ΠΈΡ Π²Π΅ΡΠΊΠ°ΠΌΠΈ.
ΠΡ ΡΠ°ΡΡΠΌΠΎΡΡΠ΅Π»ΠΈ ΠΎΡΠ½ΠΎΠ²Π½ΡΠ΅ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΈ, ΡΠ²ΡΠ·Π°Π½Π½ΡΠ΅ Ρ ΠΊΠΎΠ½ΡΡΠΎΠ»Π΅ΠΌ Π²Π΅ΡΡΠΈΠΉ, ΠΊΠΎΡΠΎΡΡΠΌΠΈ ΠΏΠΎΠ»ΡΠ·ΡΡΡΡΡ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΈ, Data Scientist-Ρ, Π°Π½Π°Π»ΠΈΡΠΈΠΊΠΈ, ΠΈΠ½ΠΆΠ΅Π½Π΅ΡΡ ΠΈ Π²ΡΠ΅, ΠΊΡΠΎ ΡΠ°Π±ΠΎΡΠ°Π΅Ρ Π½Π°Π΄ ΠΏΡΠΎΠ΅ΠΊΡΠ°ΠΌΠΈ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ Π±ΠΎΠ»Π΅Π΅ ΡΠ»ΠΎΠΆΠ½ΡΠΌΠΈ ΡΠ΅ΠΌ βHello World!β. Π₯ΠΎΡΠ΅Π»ΠΎΡΡ Π±Ρ ΠΎΠ±ΡΠ°ΡΠΈΡΡ Π²Π½ΠΈΠΌΠ°Π½ΠΈΠ΅ Π½Π° ΡΠΎ, ΡΡΠΎ Π½Π°ΠΌ Π½ΠΈ ΡΠ°Π·Ρ Π½Π΅ ΠΏΡΠΈΡΠ»ΠΎΡΡ ΠΏΡΠΈΠ±Π΅Π³Π°ΡΡ ΠΊ CLI ΠΈ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»Ρ. ΠΡΠ΅ Π±Π°Π·ΠΎΠ²ΡΠ΅ Π·Π°Π΄Π°ΡΠΈ Π½Π°ΠΌ ΡΠ΄Π°Π»ΠΎΡΡ ΡΠ΅ΡΠΈΡΡ Ρ ΠΏΠΎΠΌΠΎΡΡΡ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠ³ΠΎ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠ° IDE. Π Π΄Π°Π½Π½ΠΎΠΉ ΡΡΠ°ΡΡΠ΅ Ρ ΠΏΠΎΠΏΡΡΠ°Π»ΡΡ ΠΏΠΎΠΊΠ°Π·Π°ΡΡ ΠΏΡΠ΅ΠΈΠΌΡΡΠ΅ΡΡΠ²Π° ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ GUI, Π½ΠΎ, Π½Π΅ΡΠΎΠΌΠ½Π΅Π½Π½ΠΎ, ΡΠ°Π±ΠΎΡΠ° ΡΠ΅ΡΠ΅Π· ΡΠ΅ΡΠΌΠΈΠ½Π°Π» ΠΈΠΌΠ΅Π΅Ρ ΡΠ°ΠΊΠΆΠ΅ ΡΠ²ΠΎΠΈ ΠΏΠ»ΡΡΡ ΠΈ ΠΊΠ°ΠΆΠ΄ΡΠΉ Π²ΠΎΠ»Π΅Π½ Π²ΡΠ±ΠΈΡΠ°ΡΡ ΡΠΎ, ΡΡΠΎ Π±Π»ΠΈΠΆΠ΅ Π΅ΠΌΡ.
Π ΡΡΡΠΊΠΈΠ΅ ΠΠ»ΠΎΠ³ΠΈ
ΠΠ°ΠΊ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ GitHub Π² Pycharm
Π ΡΡΠΎΠΉ ΡΡΠ°ΡΡΠ΅ ΠΏΡΠ΅Π΄ΠΏΠΎΠ»Π°Π³Π°Π΅ΡΡΡ, ΡΡΠΎ Π²Ρ Π½Π΅ΠΌΠ½ΠΎΠ³ΠΎ Π·Π½Π°ΠΊΠΎΠΌΡ Ρ Pycharm ΠΈ Github ΠΈ Π½Π°Π΄Π΅Π΅ΡΠ΅ΡΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ ΡΡΠ½ΠΊΡΠΈΠΈ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ Π²Π΅ΡΡΠΈΠΉ Github Π½Π΅ΠΏΠΎΡΡΠ΅Π΄ΡΡΠ²Π΅Π½Π½ΠΎ Π² Pycharm.
ΠΠΊΡΡΠΆΠ΅Π½ΠΈΠ΅: Pycharm + git2.8 + github account + windows7 / 10
Π‘Π½Π°ΡΠ°Π»Π° Π½Π°ΡΡΡΠΎΠΉΡΠ΅ Pycharm
ΠΠ°ΠΊΠΎΠΉ Π±Ρ ΠΌΠ΅ΡΠΎΠ΄ Π²Ρ Π½ΠΈ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π»ΠΈ, ΠΏΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ Π² ΠΌΠ΅Π½Ρ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ Pycharm.
ΠΡΠ±Π΅ΡΠΈΡΠ΅ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ Π²Π΅ΡΡΠΈΠΉ Π½Π° ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΈ Π²ΡΡΠ΅. (ΠΡΡΠ°Π²ΡΡΠ΅ ΡΡΠ΄Π°, Π½Π΅Π·Π°Π²ΠΈΡΠΈΠΌΠΎ ΠΎΡ ΡΠΎΠ³ΠΎ, Π½Π°ΡΠΊΠΎΠ»ΡΠΊΠΎ ΡΡΠΎ ΡΠ»ΠΎΠΆΠ½ΠΎ, Π² ΠΌΠΈΡΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΈΡΡΠΎΠ², ΠΏΠΎΠΆΠ°Π»ΡΠΉΡΡΠ°, Π½Π΅ Π³ΡΠ΅ΡΠΈΡΠ΅ ΠΈ ΠΏΡΠΈΠ΄Π΅ΡΠΆΠΈΠ²Π°ΠΉΡΠ΅ΡΡ ΠΎΡΠΈΠ³ΠΈΠ½Π°Π»ΡΠ½ΠΎΠΉ Π°Π½Π³Π»ΠΈΠΉΡΠΊΠΎΠΉ Π²Π΅ΡΡΠΈΠΈ)
Π‘ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠΈΡΡΠΉΡΠ΅ ΡΠ²ΡΠ·Π°Π½Π½ΡΠΉ ΠΊΠΎΠ½ΡΠ΅Π½Ρ github, ΠΊΠ°ΠΊ ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ Π½Π° ΡΠΈΡΡΠ½ΠΊΠ΅. ΠΡΠ»ΠΈ Ρ Π²Π°Ρ Π½Π΅Ρ github, Ρ ΠΏΡΠ΅Π΄Π»Π°Π³Π°Ρ Π²Π°ΠΌ Π·Π°ΠΉΡΠΈ Π½Π° ΠΎΡΠΈΡΠΈΠ°Π»ΡΠ½ΡΠΉ ΡΠ°ΠΉΡ, ΡΡΠΎΠ±Ρ Π·Π°ΡΠ΅Π³ΠΈΡΡΡΠΈΡΠΎΠ²Π°ΡΡΡΡ, Π° Π½Π΅ ΡΠ΅ΡΠ΅Π· Π±ΡΡΡΡΡΠΉ ΠΊΠ°Π½Π°Π» ΡΠ΅Π³ΠΈΡΡΡΠ°ΡΠΈΠΈ Pycharm.
Π’Π΅ΠΏΠ΅ΡΡ Ρ ΠΌΠ΅Π½Ρ Π΅ΡΡΡ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΠΎΠ½Π½ΡΡ Π²ΠΈΠ΄Π΅ΠΎ ΠΏΠΎ Python, Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π΄ΠΎΠ±Π°Π²ΠΈΡΡ qun 227-43-550, ΡΡΠΎΠ±Ρ ΠΏΠΎΠ»ΡΡΠΈΡΡ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ
ΠΡΠΎΡ ΡΠ°Π³ ΠΎΡΠ΅Π½Ρ Π²Π°ΠΆΠ΅Π½: ΠΌΠ½ΠΎΠ³ΠΈΠ΅ ΡΡΡΠ΄Π΅Π½ΡΡ Π½Π°ΡΠΈΠ½Π°ΡΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ github ΠΏΠΎΡΠ»Π΅ Π΅Π³ΠΎ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ, Π½ΠΎ Π² ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠ΅ ΠΏΠΎΡΠ²Π»ΡΡΡΡΡ ΡΠ°Π·Π»ΠΈΡΠ½ΡΠ΅ ΠΎΡΠΈΠ±ΠΊΠΈ.
ΠΡΠΎ ΡΠ²ΡΠ·Π°Π½ΠΎ Ρ ΡΠ΅ΠΌ, ΡΡΠΎ ΠΏΠΎΠΌΠΈΠΌΠΎ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ github Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ Π½Π°ΡΡΡΠΎΠΈΡΡ Π»ΠΎΠΊΠ°Π»ΡΠ½ΠΎΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ΅ ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠ΅Π½ΠΈΠ΅ git. ΠΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ Github ΠΏΡΠΎΡΡΠΎ ΡΠΎΠΎΠ±ΡΠ°Π΅Ρ Pycharm Π²Π°ΡΡ ΡΡΠ΅ΡΠ½ΡΡ Π·Π°ΠΏΠΈΡΡ ΠΈ ΠΏΠ°ΡΠΎΠ»Ρ.Pycharm Π½Π΅ Π·Π½Π°Π΅Ρ, ΠΊΠ°ΠΊ Π²ΡΠΏΠΎΠ»Π½ΡΡΡ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΈ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ Π²Π΅ΡΡΠΈΠΉ, ΠΈ Π΅ΠΌΡ Π²ΡΠ΅ ΡΠ°Π²Π½ΠΎ Π½ΡΠΆΠ½ΠΎ Π²ΡΠ·ΡΠ²Π°ΡΡ ΡΡΠ½ΠΊΡΠΈΡ git Π²Π½ΠΈΠ·Ρ.
ΠΠΎΡΡΠΎΠΌΡ, ΠΏΠΎΠΆΠ°Π»ΡΠΉΡΡΠ°, ΡΠΊΠ°ΡΠ°ΠΉΡΠ΅ ΠΈ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ git Π½Π° ΡΠ²ΠΎΠΉ ΠΊΠΎΠΌΠΏΡΡΡΠ΅Ρ Π·Π°ΡΠ°Π½Π΅Π΅. Π Windows Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Git-2.8.1-64-bit, ΡΠΊΠ°ΡΠ°ΠΉΡΠ΅ ΠΈ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΠ΅ Π΅Π³ΠΎ Ρ ΠΏΠΎΠΌΠΎΡΡΡ Baidu, Π° Π·Π°ΡΠ΅ΠΌ Π½Π°ΡΡΡΠΎΠΉΡΠ΅.
ΠΠΎ-Π²ΡΠΎΡΡΡ , ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΠ΅ ΡΠ΄Π°Π»Π΅Π½Π½ΡΠΉ ΡΠΊΠ»Π°Π΄ ΠΈ ΠΎΡΠΏΡΠ°Π²ΡΡΠ΅ ΠΊΠΎΠ΄
ΠΠΎΡΠ»Π΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Π΅Π³ΠΎ ΠΊΠ°ΠΊ ΠΎΠ±ΡΡΠ½ΠΎ, ΡΠ΅Π»ΠΊΠ½ΡΠ² ΠΎΠΏΡΠΈΡ VCS Π² Π²Π΅ΡΡ Π½Π΅ΠΉ ΡΡΡΠΎΠΊΠ΅ ΠΌΠ΅Π½Ρ.
Π github Π΅ΡΡΡ ΡΠ°Π·Π΄Π΅Π» Π΄Π»Ρ ΡΠΎΠ²ΠΌΠ΅ΡΡΠ½ΠΎΠ³ΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ ΠΏΡΠΎΠ΅ΠΊΡΠΎΠ² ΠΏΡΠΈ ΠΈΠΌΠΏΠΎΡΡΠ΅ Π² ΡΠΈΡΡΠ΅ΠΌΡ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ Π²Π΅ΡΡΠΈΠΉ. ΠΠ°ΠΆΠΌΠΈΡΠ΅, ΡΡΠΎΠ±Ρ Π²ΠΎΠΉΡΠΈ.
Π‘Π»Π΅Π΄ΡΠΉΡΠ΅ ΠΊΠΎΠΌΠΌΠ΅Π½ΡΠ°ΡΠΈΡΠΌ Π½Π° ΡΠΈΡΡΠ½ΠΊΠ΅, ΡΡΠΎΠ±Ρ ΡΠΎΠ·Π΄Π°ΡΡ Π½ΠΎΠ²ΡΠΉ ΡΠΊΠ»Π°Π΄, ΠΈ Π½Π°ΠΆΠΌΠΈΡΠ΅ ΠΊΠ½ΠΎΠΏΠΊΡ Β«ΠΠΎΠ΄Π΅Π»ΠΈΡΡΡΡΒ».
ΠΠ΄Π΅ΡΡ Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π²ΡΠ±ΡΠ°ΡΡ ΡΠ°ΠΉΠ»Ρ, ΠΊΠΎΡΠΎΡΡΠ΅ Π²Ρ Ρ ΠΎΡΠΈΡΠ΅ Π·Π°Π³ΡΡΠ·ΠΈΡΡ. ΠΠ°ΠΊ ΠΏΡΠ°Π²ΠΈΠ»ΠΎ, Π²ΡΠ΅ ΡΠ°ΠΉΠ»Ρ Π·Π°Π³ΡΡΠΆΠ°ΡΡΡΡ Π½Π°ΠΏΡΡΠΌΡΡ. ΠΠΎΠ½Π΅ΡΠ½ΠΎ, Π²Ρ ΡΠ°ΠΊΠΆΠ΅ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΠΎΡΠΌΠ΅Π½ΠΈΡΡ ΡΠ΅ ΠΊΠΎΠ½ΡΠΈΠ΄Π΅Π½ΡΠΈΠ°Π»ΡΠ½ΡΠ΅ ΡΠ°ΠΉΠ»Ρ, ΠΊΠΎΡΠΎΡΡΠ΅ Π½Π΅ Π½ΡΠΆΠ½Ρ ΠΈΠ»ΠΈ ΡΠ²ΡΠ·Π°Π½Ρ Ρ Π½Π°ΡΡΡΠΎΠΉΠΊΠ°ΠΌΠΈ ΠΈ ΠΏΠ°ΡΠΎΠ»ΡΠΌΠΈ. ΠΠ²Π΅Π΄ΠΈΡΠ΅ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ Π΄Π»Ρ ΠΎΡΠΏΡΠ°Π²ΠΊΠΈ ΠΈ Π½Π°ΠΆΠΌΠΈΡΠ΅ OK Π΄Π»Ρ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΆΠ΄Π΅Π½ΠΈΡ. ΠΠΎΠ΄ΠΎΠΆΠ΄ΠΈΡΠ΅ Π½Π΅ΠΊΠΎΡΠΎΡΠΎΠ΅ Π²ΡΠ΅ΠΌΡ, Π² Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ ΠΎΡ Π²Π°ΡΠ΅ΠΉ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΡΠΈΡΡΠ°ΡΠΈΠΈ ΠΈ ΡΠ°Π·ΠΌΠ΅ΡΠ° ΡΠ°ΠΉΠ»Π°, Pycharm ΠΏΠ΅ΡΠ΅Π½Π΅ΡΠ΅Ρ ΡΠ°ΠΉΠ» Π½Π° github, ΠΏΠΎΡΠ»Π΅ ΡΡΠΏΠ΅Ρ Π° ΠΏΠΎΡΠ²ΠΈΡΡΡ Π½Π΅Π±ΠΎΠ»ΡΡΠΎΠ΅ ΠΏΡΠΈΠ³Π»Π°ΡΠ΅Π½ΠΈΠ΅
Π-ΡΡΠ΅ΡΡΠΈΡ , ΠΏΡΠΎΠ²Π΅ΡΡΡΠ΅ Π·Π°Π³ΡΡΠΆΠ΅Π½Π½ΡΠΉ Π½ΠΎΠ²ΡΠΉ ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΠΉ Π² Github.
ΠΠΎΠΉΠ΄ΠΈΡΠ΅ Π½Π° ΠΎΡΠΈΡΠΈΠ°Π»ΡΠ½ΡΠΉ ΡΠ°ΠΉΡ GitHub ΠΈ Π²ΠΎΠΉΠ΄ΠΈΡΠ΅ Π² ΡΠ²ΠΎΡ ΡΡΠ΅ΡΠ½ΡΡ Π·Π°ΠΏΠΈΡΡ:
Π-ΡΠ΅ΡΠ²Π΅ΡΡΡΡ , ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠΉΡΠ΅ Pycharm Π΄Π»Ρ ΠΊΠ»ΠΎΠ½ΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΡ Github.
Π Π°Π½Π΅Π΅ ΡΡΠΎ Π±ΡΠ»Π° Π·Π°Π³ΡΡΠ·ΠΊΠ°. ΠΠ°ΠΊ Π½Π°ΡΡΠ΅Ρ Π·Π°Π³ΡΡΠ·ΠΊΠΈ? Π ΠΌΠ΅Π½Ρ VCS:
ΠΡΠ±Π΅ΡΠΈΡΠ΅ Π² ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΠΈΠΈ Ρ ΠΊΡΠ°ΡΠ½ΠΎΠΉ ΡΠ°ΠΌΠΊΠΎΠΉ Π½Π° ΡΠΈΡΡΠ½ΠΊΠ΅ Π²ΡΡΠ΅.
Pycharm Π²ΠΎΠΉΠ΄Π΅Ρ Π² Π²Π°ΡΡ ΡΡΠ΅ΡΠ½ΡΡ Π·Π°ΠΏΠΈΡΡ Github, ΡΡΠΎΠ±Ρ ΠΏΡΠΎΡΠΈΡΠ°ΡΡ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ ΠΎ Π²Π°ΡΠ΅ΠΌ Ρ ΡΠ°Π½ΠΈΠ»ΠΈΡΠ΅.ΠΡ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π²ΡΠ±ΡΠ°ΡΡ Ρ ΡΠ°Π½ΠΈΠ»ΠΈΡΠ΅ ΠΈΠ· Π²ΡΠΏΠ°Π΄Π°ΡΡΠ΅Π³ΠΎ ΡΠΏΠΈΡΠΊΠ°, ΠΈΠ»ΠΈ Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π½Π°ΠΏΡΡΠΌΡΡ Π²Π²Π΅ΡΡΠΈ ΠΈΠΌΡ Ρ ΡΠ°Π½ΠΈΠ»ΠΈΡΠ° Π² ΠΏΠΎΠ»Π΅ ΠΈΠΌΠ΅Π½ΠΈ ΠΊΠ°ΡΠ°Π»ΠΎΠ³Π°. ΠΠ°ΠΆΠΌΠΈΡΠ΅ ΠΊΠ½ΠΎΠΏΠΊΡ clone, ΠΈ Pycharm Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ Π·Π°Π³ΡΡΠ·ΠΈΡ ΡΠΎΠ΄Π΅ΡΠΆΠΈΠΌΠΎΠ΅ Ρ ΡΠ°Π½ΠΈΠ»ΠΈΡΠ°.
ΠΡΡΡ ΡΠ²ΡΠ·Π°Π½Π½ΡΡ Ρ git ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΉ Π² Pycharm
ΠΡΡΠ΅ ΠΏΡΠΈΠ²Π΅Π΄Π΅Π½Ρ ΡΠΎΠ»ΡΠΊΠΎ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΈ ΡΠΈΠΊΡΠ°ΡΠΈΠΈ ΠΈ ΠΊΠ»ΠΎΠ½ΠΈΡΠΎΠ²Π°Π½ΠΈΡ. ΠΠΎΠ½ΠΊΡΠ΅ΡΠ½ΡΠ΅ ΠΎΠ±ΡΠΈΠ΅ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΈ git, ΡΠ°ΠΊΠΈΠ΅ ΠΊΠ°ΠΊ push, add, status ΠΈ Ρ. Π., ΠΠΎΠΆΠ½ΠΎ Π½Π°ΠΉΡΠΈ Π² ΠΌΠ΅Π½Ρ CVS. Π― ΠΏΠΎΠ»Π°Π³Π°Ρ, ΡΡΠΎ ΡΡΠ°ΡΠΈΠ΅ΡΡ Ρ ΠΎΡΠ½ΠΎΠ²Π°ΠΌΠΈ git ΡΠ·Π½Π°ΡΡ ΡΡΠΎ Ρ ΠΏΠ΅ΡΠ²ΠΎΠ³ΠΎ Π²Π·Π³Π»ΡΠ΄Π° ΠΈ Π½Π΅ Π±ΡΠ΄ΡΡ Π·Π΄Π΅ΡΡ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»Π΅Π½Ρ.
Π Π΅Π·ΡΠΌΠ΅ Π² ΠΊΠΎΠ½ΡΠ΅ ΡΡΠ°ΡΡΠΈ: ΠΠ°ΠΊ ΡΠ°Π±ΠΎΡΠ°ΡΡ ΠΌΠ΅ΡΠΎΠ΄Ρ Π² ΠΊΠ»Π°ΡΡΠ°Ρ Python?
Π ΠΠ (ΠΎΠ±ΡΠ΅ΠΊΡΠ½ΠΎ-ΠΎΡΠΈΠ΅Π½ΡΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΌ) ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΠΈ ΠΌΠ΅ΡΠΎΠ΄Ρ Π² ΠΊΠ»Π°ΡΡΠ°Ρ Π±ΡΠ²Π°ΡΡ ΡΠ°Π·Π½ΡΡ ΡΠΎΡΠΌ: ΠΌΠ΅ΡΠΎΠ΄Ρ ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡΠΎΠ², ΡΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΠ΅ ΠΌΠ΅ΡΠΎΠ΄Ρ, ΠΌΠ΅ΡΠΎΠ΄Ρ ΠΊΠ»Π°ΡΡΠΎΠ² ΠΈ Π΄Π°ΠΆΠ΅ Π°Π±ΡΡΡΠ°ΠΊΡΠ½ΡΠ΅ ΠΌΠ΅ΡΠΎΠ΄Ρ. Π ΡΡΠΎΠΉ ΡΡΠ°ΡΡΠ΅ ΠΎΠΏΠΈΡΡΠ²Π°Π΅ΡΡΡ, ΠΊΠ°ΠΊ ΠΌΠ΅ΡΠΎΠ΄Ρ ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡΠΎΠ² ΡΠ°Π±ΠΎΡΠ°ΡΡ Π² Python. ΠΠΎΠ³ΠΎΠ²ΠΎΡΠΈΠΌ ΠΎ Π΄ΡΡΠ³ΠΈΡ ΠΌΠ΅ΡΠΎΠ΄Π°Ρ .
ΠΠ°Π²Π°ΠΉΡΠ΅ ΡΠ½Π°ΡΠ°Π»Π° ΠΎΠΏΡΠ΅Π΄Π΅Π»ΠΈΠΌ ΡΠ°ΠΌΡΠΉ ΠΏΡΠΎΡΡΠΎΠΉ ΠΊΠ»Π°ΡΡ:
p ΠΈ self ΡΠΊΠ°Π·ΡΠ²Π°ΡΡ Π½Π° ΠΎΠ΄ΠΈΠ½ ΠΈ ΡΠΎΡ ΠΆΠ΅ ΠΎΠ±ΡΠ΅ΠΊΡ ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡΠ°
Π’Π°ΠΊ ΠΌΠΎΠΆΠ΅Ρ Π»ΠΈ ΠΎΠ½ Π±ΡΡΡ Π²ΡΠ·Π²Π°Π½ Π½Π΅ΠΏΠΎΡΡΠ΅Π΄ΡΡΠ²Π΅Π½Π½ΠΎ ΡΠ΅ΡΠ΅Π· ΠΊΠ»Π°ΡΡ? ΠΠ΅Ρ!
Π’Π°ΠΊ ΠΏΠΎΡΠ΅ΠΌΡ Π±Ρ Π²Π°ΠΌ Π½Π΅ ΠΏΠ΅ΡΠ΅Π΄Π°ΡΡ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡ self ΠΏΡΠΈ Π²ΡΠ·ΠΎΠ²Π΅ ΠΌΠ΅ΡΠΎΠ΄Π° eat ΡΠ΅ΡΠ΅Π· ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡ p? ΠΡΠΎ Π½Π°ΡΠΈΠ½Π°Π΅ΡΡΡ Ρ ΡΠ°Π·Π½ΠΈΡΡ ΠΌΠ΅ΠΆΠ΄Ρ ΡΡΠ½ΠΊΡΠΈΡΠΌΠΈ ΠΈ ΠΌΠ΅ΡΠΎΠ΄Π°ΠΌΠΈ. ΠΠΎΡΠΌΠΎΡΡΠΈΡΠ΅ Π½Π° ΡΠ»Π΅Π΄ΡΡΡΠΈΠΉ ΠΊΠΎΠ΄:
Π ΠΏΠΎΡΠΊΠΎΠ»ΡΠΊΡ ΠΌΠ΅ΡΠΎΠ΄ ΠΏΡΠΈΠ²ΡΠ·Π°Π½ ΠΊ ΠΎΠ±ΡΠ΅ΠΊΡΡ ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡΠ°, Π΅ΠΌΡ Π½Π΅ Π½ΡΠΆΠ½ΠΎ ΠΏΠ΅ΡΠ΅Π΄Π°Π²Π°ΡΡ ΠΎΠ±ΡΠ΅ΠΊΡ ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡΠ° ΠΏΡΠΈ Π΅Π³ΠΎ Π²ΡΠ·ΠΎΠ²Π΅, ΠΏΡΠΎΡΡΠΎ Π²ΡΠ·ΠΎΠ²ΠΈΡΠ΅ p.eat (). ΠΠ°ΡΠ°ΠΌΠ΅ΡΡ self Π±ΡΠ΄Π΅Ρ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ ΠΏΠ΅ΡΠ΅Π΄Π°Π½ Python. ΠΡΠ»ΠΈ ΠΎΠ½ Π±ΡΠ΄Π΅Ρ ΠΏΠΎΠ²ΡΠΎΡΠ½ΠΎ ΠΏΠ΅ΡΠ΅Π΄Π°Π½, ΠΎΠ½ ΡΠΎΠΎΠ±ΡΠΈΡ ΠΎΠ± ΠΎΡΠΈΠ±ΠΊΠ΅.
Π’Π°ΠΊ, Π½Π°ΠΏΡΠΈΠΌΠ΅Ρ, ΠΌΠΎΠ³ΡΡ Π»ΠΈ ΠΌΠ΅ΡΠΎΠ΄Ρ self Π±ΡΡΡ ΡΠ΄Π°Π»Π΅Π½Ρ Ρ ΡΠΎΡΠΊΠΈ Π·ΡΠ΅Π½ΠΈΡ ΡΠ·ΡΠΊΠΎΠ²ΠΎΠ³ΠΎ Π΄ΠΈΠ·Π°ΠΉΠ½Π°? ΠΡΠ° ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ° Π±ΡΠ»Π° ΠΎΠ±ΡΡΡΠ½Π΅Π½Π° ΠΠ²ΠΈΠ΄ΠΎ Π²Π°Π½ Π ΠΎΡΡΡΠΌΠΎΠΌ, ΠΎΡΡΠΎΠΌ Python, Π½Π° ΡΠΎΠΌ ΠΎΡΠ½ΠΎΠ²Π°Π½ΠΈΠΈ, ΡΡΠΎ Β«ΡΠ²Π½ΠΎΠ΅ Π»ΡΡΡΠ΅, ΡΠ΅ΠΌ Π½Π΅ΡΠ²Π½ΠΎΠ΅Β»