<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
  <channel>
    <title><![CDATA[拍拍尘土]]></title> 
    <link>http://blog.xg98.com/</link> 
    <description><![CDATA[五月枇杷黄，太湖银鱼肥]]></description> 
    <language>zh-cn</language> 
    <copyright><![CDATA[Copyright 2026, 拍拍尘土]]></copyright> 
    <webMaster><![CDATA[cxosoft@gmail.com (Admin)]]></webMaster> 
    <generator>LBS v2.0.313</generator> 
    <pubDate>Tue, 05 May 2026 08:34:56 +0800</pubDate> 
    <ttl>60</ttl>
  
    <item>
      <title><![CDATA[微信公众号文章阅读量点赞量-多个公众号-实时更新]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2917]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sun, 29 Jan 2023 09:18:09 +0800</pubDate> 
      <description><![CDATA[<h3 style="BOX-SIZING: border-box; FONT-SIZE: 20px; FONT-FAMILY: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun; FONT-WEIGHT: 600; COLOR: rgb(79,79,79); OUTLINE-WIDTH: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; OUTLINE-STYLE: none; PADDING-LEFT: 0px; MARGIN: 8px 0px 16px; OUTLINE-COLOR: invert; LINE-HEIGHT: 28px; PADDING-RIGHT: 0px; user-select: text; overflow-wrap: ]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2917]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[c#调用执行python脚本，并传递参数]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2916]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sun, 29 Jan 2023 08:47:54 +0800</pubDate> 
      <description><![CDATA[<div class="code">using System;<br />using System.Collections;<br />using System.Diagnostics;<br />&nbsp;&nbsp; <br />namespace Test<br />{<br />&nbsp;&nbsp; &nbsp; class Program<br />&nbsp;&nbsp; &nbsp; {<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; static void Main(string[] args)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Process p = new Process();<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string path = &quot;reset_ipc.py&quot;;//待处理python文件的路径，本例中放在debug文件夹下<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string sArguments = path;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ArrayList arrayList = new ArrayList();<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arrayList.Add(&quot;com4&quot;);<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arrayList.Add(57600);</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2916]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[python命令行传递参数的两种方式]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2915]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sun, 29 Jan 2023 08:39:56 +0800</pubDate> 
      <description><![CDATA[<p>python在命令行运行.py文件时，如何在命令行传递参数给运行程序，python默认提供了sys模块的系统参数属性实现接收命令行中的外部参数。<br/><br/>另一种则是通过argparse模块实现的，argparse模块可以实现事先对命令行参数的初始化，更加的便于命令行参数的管理。<br/><br/>喜欢记得收藏、点赞、关注。技术交流、资料文末获取<br/><br/><strong>1、sys.argv参数</strong><br/><br/>sys.argv的命令行参数获取方式比较的简单，直接通过提取sys.argv的值就可以获取到其对应的参数。<br/><br/>比如，下面写一个hello_world.py模块，并且在其中引用了命令行参数。<br/><br/></p><pre class="brush:python;toolbar:false">import&nbsp;sys
print(&#39;Hi&nbsp;&#39;&nbsp;+&nbsp;str(sys.argv[1])&nbsp;+&nbsp;&#39;,&nbsp;welcome&nbsp;to&nbsp;Hello&nbsp;World!&#39;)</pre><p><br/>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2915]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[windows上安装 Twisted]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2402]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Mon, 24 Apr 2017 09:45:14 +0800</pubDate> 
      <description><![CDATA[<a href="http://blog.csdn.net/androidzhaoxiaogang/article/details/8479140" title="http://blog.csdn.net/androidzhaoxiaogang/article/details/8479140" target="_blank">http://blog.csdn.net/androidzhaoxiaogang/article/details/8479140</a><br /><br />步骤1：下载Twisted<br /><br /><a href="http://twistedmatrix.com/trac/wiki/Downloads" title="http://twistedmatrix.com/trac/wiki/Downloads" target="_blank">http://twistedmatrix.com/trac/wiki/Downloads</a><br /><br />我下载的是（Twisted-12.3.0.win32-py2.7）<br /><br /> &nbsp; <br /><br />步骤2：安装Twisted<br /><br />点击Twisted-12.3.0.win32-py2.7直接运行即可<br /><br />这时候，运行IDLE，输入from twisted.internet import reactor，提示不可用。需要装zope.interface模块并且版本号要大于3.6.0<br /><br /> &nbsp; <br /><br />步骤3：下载zope<br /><br /><a href="http://pypi.python.org/pypi/zope.interface#downloads" title="http://pypi.python.org/pypi/zope.interface#downloads" target="_blank">http://pypi.python.org/pypi/zope.interface#downloads</a><br /><br />我下载的是zope.interface-3.8.0-py2.7-win32.egg<br />]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2402]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[Python 写入 Mysql 乱码问题]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2401]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 21 Apr 2017 08:59:21 +0800</pubDate> 
      <description><![CDATA[<div class="code">#encoding=utf-8<br />&nbsp;&nbsp; <br />import sys<br />import MySQLdb as mdb<br />&nbsp;&nbsp; <br />reload(sys)<br />sys.setdefaultencoding(&#39;utf-8&#39;)</div> &nbsp; <br /><br />确保以下几点，就不会有乱码问题，字符集统一采用UTF-8：<br />1 . 表的默认字符集是否为UTF-8，使用类似如下的SQL语句：<br /><div class="code">CREATE TABLE IF NOT EXISTS name(<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; id INTEGER PRIMARY KEY AUTO_INCREMENT,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; prop VARCHAR(50),<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; ...<br />)<br />DEFAULT CHARSET = UTF8;</div><br />2 . 字段内容来源为文本文件的，确保源文件编码为UTF-8，否则转码<br />3 . 字段内容来源为程序文件本身的，确保程序文件编码为UTF-8，否则转码<br />]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2401]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[python字符串和变量相加时出现，coercing to unicode need string or buffer nonetype found python 错误的解决]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2400]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 21 Apr 2017 08:41:43 +0800</pubDate> 
      <description><![CDATA[字符串和变量相加出现错误，这是由于类型不对，而导致的<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1  我是用 “a”+b这个时候产生的错误，<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2  这是由于 ，在 python中 +号是针对两个类型相同的变量，而在上的语句中，python不知道 b这个变量的类型二导致的错误(这一点和java很不一样)，用下面的语句可以解决，在变量上加str()函数<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3  <div class="code">print(&#39;sex:&#39;+sex)  #错误<br />print(&#39;sex:&#39;+str(sex)) #正确</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2400]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[keyerror一般是你使用字典里不存在的key产生的错误，避免产生错误的方法很简单，使用字典的get方法]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2399]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 21 Apr 2017 08:37:53 +0800</pubDate> 
      <description><![CDATA[keyerror一般是你使用字典里不存在的key产生的错误，避免产生错误的方法很简单，使用字典的get方法，它接受一个key和一个默认值，这个默认值只有key不存在的使用返回，存在则只接访问key的值<br /><div class="code">a={&#39;a&#39;:&#39;b&#39;,&#39;123&#39;:345}<br />try:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; a[&#39;345&#39;]#报错，产生keyerror异常<br />except KeyError:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; print &#39;catch an exception&#39;<br />print a.get(&#39;345&#39;,&#39;not exist&#39;)#不存在key为345的值，只接返回字符串not exist<br />print a.get(&#39;a&#39;,&#39;not exist&#39;)#存在key为a的值，只接返回key为a的值</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2399]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[CentOS中Python升级与MySQL-Python、lxml的安装]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2398]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 19 Apr 2017 13:59:25 +0800</pubDate> 
      <description><![CDATA[1、Python升级不能简单的卸载删除之前的Python版本，因为一些系统工具只支持特定的版本的Python。如CentOS5.6只能使用Python2.4，升级之后必须重新设置它的Python运行环境变量。<br /><br />Python升级步骤<br /><br />1）安装Pyhton2.7<br /><br />cd /usr/src/<br /><br />wget <a href="http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2" title="http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2" target="_blank">http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2</a><br />tar xjvf Python-2.7.5.tar.bz2<br />cd Python-2.7.5<br />./configure --prefix=/usr/local/python2.7<br />make -j 8<br />make install<br /><br />配置python，把Python2.7作为默认的开发生产工具<br /><br />mv /usr/bin/python /usr/bin/python_old  #(这是一种好习惯，不要随便删除文件）<br />]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2398]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[pip安装python包出现Cannot fetch index base URL]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2397]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 19 Apr 2017 13:17:50 +0800</pubDate> 
      <description><![CDATA[<span style="color:Red">p.s. windows下面遇到安装问题有可能是打开了代理软件造成ssl中断，部分软件无法使用pip安装的也可以直接使用msi安装包，比如Pillow，lxml 。</span><br /><br />libxml2 <a href="http://users.skynet.be/sbi/libxml-python/" title="http://users.skynet.be/sbi/libxml-python/" target="_blank">http://users.skynet.be/sbi/libxml-python/</a><br />lxml  <a href="https://pypi.python.org/pypi/lxml/2.2.8" title="https://pypi.python.org/pypi/lxml/2.2.8" target="_blank">https://pypi.python.org/pypi/lxml/2.2.8</a><br /><br />pip install *** 安装python包，出现Cannot fetch index base URL <a href="http://pypi.python.org/simple/错误提示或者直接安装不成功。" title="http://pypi.python.org/simple/错误提示或者直接安装不成功。" target="_blank">http://pypi.python.org/simple/错误提示或者直接安装不成功。</a><br /><br /><br /><b>解决办法：</b><br /><br />1.windows下创建/%user%/pip/pip.ini，并添加以下内容。<br /><span style="color:Red">C:\Documents and Settings\Administrator\pip</span><br />]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2397]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[CentOS 安装 lxml]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2395]]></link> 
      <category><![CDATA[Python]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 19 Apr 2017 10:54:20 +0800</pubDate> 
      <description><![CDATA[<span style="color:Red">error: command &#39;gcc&#39; failed with exit status 1 的解决办法</span>：出现这个问题就是pip安装的时候缺少依赖包，找到并安装好即可！<br /><br />环境： <br />* CentOS release 6.4 (Final) <br />* Python 2.6.6 <br />（一开始安装的时候已知的就这些了）<br /><br />之前还没安装过 Python 的扩展模块，查了下，比较方便的方式是使用 Python 包管理器，我用的是 pip<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; 先安装 pip <br /> &nbsp; &nbsp; &nbsp; &nbsp; 参考官方的安装页面，一切顺利！<br /> &nbsp; &nbsp; &nbsp; &nbsp; 接下来是安装 lxml <br /> &nbsp; &nbsp; &nbsp; &nbsp; 参考 lxml 的安装页面，最主要的，看了下 Requirements，需要安装 libxml2 和 libxslt，回到 CentOS 确认了下这两个软件都有安装，接下来继续<br /><br /> &nbsp; <br />&#91;code]&#91;/code]]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2395]]></wfw:commentRss>
    </item>
      
  </channel>
</rss>
