Python的学习中细节的整理(1)
来源:互联网 发布:儿童节礼物 知乎 编辑:程序博客网 时间:2024/06/07 05:30
This is my first day of engaging myself to the python learning since I have made up mind to master this kind programming language. It took me a lot of time this morning to construct a python development environment on my windows with Eclipse, which is a multifunctional IDE and can also be used for other languages ,such as Java.
For the constructing work, there are 4 main procedures ,ie, the installation of java JDK(or JRE), the python complier installation, the eclipse installation, and the PyDev installation, among which I think there are two piece of tips should be given an eye on:
***1. be careful with the path variables when installing the java JDK and set the JAVA_HOME variables(include 3 steps:JAVA_HOME setting, path setting, classpath setting),
unless you set the JAVA_HOME in good manner ,or your eclipse may not function well ,the following is the commen case if not setting the JAVA_HOME after installing the java JDK:
and this is how to set JAVA_HOME: http://jingyan.baidu.com/article/9f7e7ec05bb0ca6f281554c1.html
***2. make sure the bit-version of java JDK and eclipse. I installed these two of 64-bit.
< note:this is the site from which I learned how to construct python development environment: http://lib.csdn.net/article/python/12326
in my opinion, it's not neccessary for you to make each of these steps very clear ,such as "why conduct this or that step","what this step is for?",and so on, if you are a green hand for eclipse use. What we need to do is just do it ,and you will gradually get why this and why that. >
in the next part I sumed up some operation details here, they are just a little parts of Python grammer and using tips, and I will supplement them during my learning process.
1. the IDLE(Python GUI) and Windows CMD interface:
the IDLE provides users a convenient interface to code python, you can directly type python sentences, just as the following:
having finished your code , you can :
1)press Enter button, then the following line of IDLE will show the running results;
2)save the code with a certain file name , then next time you can open it with sublime text or IDLE, or CMD line(with the command "python filename.py"), and run this file.
2. you can use both windows notepad(.txt) and sublime Text to creat a python code file ,howerver, when you choose notepad, keep in mind that the form should be saved asutf-8,and the suffix name as "py",like the following:
3. the difference between directly using CMD interface and using IDLE when compiling python code (take py_1.py as an example) :
if you choose CMD interface, you can:
1) use "python py_1.py" command to run this code, and the result will be on show in the next line of the black pane;
2)use "python" command to enter in python console interface,like the fllowing:
< note: if you want your computer to be able to shift directly from CMD interface to python console interface, you should firstly add thepython.exe installation path to the path variables once you finished installing python(ie.python complier) in your computer. >
in this console interface, you can directly input python code, like < print "hello",3+4 >,press Enter button, then the next will show the results:
if you want to exit this python console interface and return to the previous CMD interface, just input < quit() >.
- Python的学习中细节的整理(1)
- Python的学习中细节的整理(2)
- Python的学习中细节的整理(3):raw_input
- Python的学习中细节的整理(3):raw_input
- python学习中遇到的问题整理
- python的一些细节(1)
- Python中list的切片细节
- python中装饰器的执行细节
- Python 写程序的中一些细节
- hibernate相关的细节整理
- Linux学习中容易忽略的细节(一)
- C语言学习中遗漏的细节
- Python的学习(三十二)---- ctypes库的使用整理
- python的一些细节(2)
- python的一些细节(3)
- python的一些细节(3)
- 关于在java编程中遇到的一些细节学习(杂1)
- javascript学习 细节整理
- kettle实践
- 关于gradle编译出错之常用解决办法
- POJ - 2019 - Cornfields(RMQ)
- dmesg与printk命令
- 修改mysql编码格式
- Python的学习中细节的整理(1)
- Java静态内部类
- 使用spring websocket实时读取k8s容器日志输出
- JQuery初始
- 当前日期加20天
- [hdu5492]背包问题的扩展
- UVALive 7003 A Balance Game on Trees(树形dp)
- 双调欧几里得旅行商问题-《算法导论》
- C Tricks(十六)—— 复制字符串