E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
test.py
python __file__ 与相对路径
taoyh163.blog.163.com/blog/static/195803562008529031652/ 用__file__ 来获得脚本所在的路径是比较方便的,但这可能得到的是一个相对路径,比如在脚本
test.py
greybeard
·
2012-03-02 11:00
python
Python 使用 UTF-8 编码
一般会报错,如下:File"F:\workspace\psh\src\
test.py
",line2SyntaxError:Non-ASCIIcharacter'\xe4'infileF:
joeblackzqq
·
2012-01-30 15:06
Python
Python 使用 UTF-8 编码
一般会报错,如下:File"F:\workspace\psh\src\
test.py
",line2SyntaxError:Non-ASCIIcharacter'\xe4'infileF
JoeBlackzqq
·
2012-01-30 15:00
windows
python
Solr
url
character
encoding
Python GUI 之 TKinter(一)
TKinter是Python发行版中的标准GUI库,也就是说默认安装了Python就可以Tkinter了参考了个教程,写了点代码试试:#file:
test.py
fromTkinterimport*
cenziboy
·
2011-11-30 23:00
windows
python
command
Class
import
button
使用py2exe打包包含pymssql,pyodbc等链接数据库模块出错解决方法
如果在setup.py打包程序中使用简单代码:#setup.py fromdistutils.coreimportsetup importpy2exe setup(windows=["
test.py
"]
zhengyijie
·
2011-11-18 14:00
windows
python
py2exe
可执行程序
python 配置mod_python.publisher 404错误
就没事;
test.py
:frommod_pythonimportapachedefhandler(req): req.content_type='te
ipenny87
·
2011-09-19 13:14
python
职场
休闲
mod_python
.publisher
高亮网页中的嵌入代码
例如,我们本地有一个名为
test.py
的程序,如果我们要在网页中完美展示这段代码,只需要输入:pygmentize-fhtml-Olinenos=1-otest.htmltest.py然后将这
Zhongwei_leg
·
2011-07-27 11:00
高亮网页中的嵌入代码
例如,我们本地有一个名为
test.py
的程序,如果我们要在网页中完美展示这段代码,只需要输入: pygmentize -f html
Zhongwei_leg
·
2011-07-27 11:00
代码
转:linux开机自动运行
实现目标:在Linux启动时,自动运行位于普通用户test1根目录下的脚本程序
test.py
,该程序会在每次执行时自动向本地日志文件追加一条记录,源码如下: from
tianmaotalk
·
2011-07-18 12:00
linux
__init__.py
在目录内增加一个__init__.py使得该目录可以被当作模块导入init_test/ |___test/ | |__ __init__.py | |__
test.py
adream307
·
2011-06-21 09:00
Module
测试
import
eclipse+pydev中文问题
SyntaxError: Non-ASCII character '\xe7' in file /media/编程/Eclipse3_6/linux_ws/pythonTestOnLinux/src/test/
test.py
lingyibin
·
2011-05-18 16:00
eclipse
html
编程
linux
python
Python 入门(3)-- IDLE的使用细节
如运行
test.py
文件:improttest但是
hangyuanbiyesheng
·
2011-04-19 10:00
Python 入门(3)-- IDLE的使用细节
如运行
test.py
文件:improttest但
hangyuanbiyesheng
·
2011-04-19 10:00
python 网络爬虫代码
爬虫是封装在WebCrawler类中的,
Test.py
调用爬虫的craw函数达到下载网页的功能。
Cashey1991
·
2011-03-20 14:00
python
url
Class
input
download
网络爬虫
python 网络爬虫代码
爬虫是封装在WebCrawler类中的,
Test.py
调用爬虫的craw函数达到下载网页的功能。
开水
·
2011-03-20 14:00
Python
python-如何获取命令行是参数
sys.argv[0]表示代码本身文件路径,所有参数从1开始,一下例子说明,创建一个
test.py
文件里面写下#-*-coding:UTF-8-*-importos,sysdefsayHello():
715434211
·
2011-03-14 11:08
职场
休闲
Django学习笔记3
这样pydev就会自动在项目的源文件下面建一个包orders.下面会自动生成models.py,
test.py
,
qiaoqinqie
·
2011-03-11 07:00
sql
Hibernate
django
python
项目管理
python文件的两种编译方法
(针对比较多的文件,推荐该方法)比如:importpy_compilepy_compile.compile("
test.py
") 2、直接使用python命令(若使用脚本进行打包,而且文件少,可
lizhongkan
·
2011-03-02 00:00
python
脚本
import
在Linux中开机自动运行普通用户脚本程序
测试环境:Fedora7,管理员:root,普通用户:test1 实现目标:在Linux启动时,自动运行位于普通用户test1根目录下的脚本程序
test.py
,该程序会在每次执行时自动向本地日志文件追加一条记录
hwzyyx
·
2010-12-07 09:00
linux
python
脚本
配置管理
bash
如何调试Python
1,首先下载并安装Python2.7(http://www.python.org/)2,写一个简单地Python源文件,比如
test.py
,内容如下:importsys,osdeftest(arg1,arg2
c_peterchen2001
·
2010-09-03 13:00
Python
如何顺利实现LINUX系统开机自动启动指定的脚本程序
测试环境:Fedora7,管理员:root,普通用户:test1实现目标:在Linux启动时,自动运行位于普通用户test1根目录下的脚本程序
test.py
,该程序会在每次执行时自动向本地日志文件追加一条记录
hjxhjh
·
2010-07-21 17:00
linux
python
shell
脚本
service
import
python UnicodeEncodeError: 'ascii' codec can't encode characters 解决方法
python UnicodeEncodeError: 'ascii' codec can't encode characters 详解 新建一个
test.py
#coding:utf
sdmzhu3
·
2010-06-25 18:00
python
F#
python中os.path.dirname(__file__)的使用
printos.path.dirname(__file__)"所在脚本是以完整路径被运行的,那么将输出该脚本所在的完整路径,比如: pythond:/pythonSrc/test/
test.py
lxjames833539
·
2010-01-24 20:00
python
脚本
File
warning: Can't open file '/root/.subversion/servers': Permission denied 解决办法
我的一个Python脚本从svn co数据出来,手动$ sudo -u eric python /home/eric/
test.py
正常, 但是用cron自动跑的时候就出错了,以前好好的,搞不懂今天就坏掉了
lxneng
·
2010-01-08 12:00
python
SVN
脚本
subversion
为python脚本传递参数并批量改文件名
import os os.rename(src, dst) 比如要把d:\
test.py
重新命名为
yangjizhong24
·
2010-01-07 10:00
python
脚本
OS
在WINDOWS上将Python 文件转为(生成)可执行程序 exe 文件
Py2exePy2exe下载地址(http://sourceforge.net/projects/py2exe/files/)(直接安装即可)步骤如下:1.编译你的Py文件,确保无误,保存到…(例如:C:\old\
test.py
佚名
·
2009-11-08 23:34
pygtk程序模板
运行方法:1.将代码保存为两个文件
test.py
、test.glade。2.运行pythontest.py
test.py
:#!
ericzhong83
·
2009-10-26 15:00
Class
import
BT
menu
Signal
website
Python import的一个技巧
比如我们在a目录下自己写了一个类 在
test.py
中 在b目录下写的一个程序要调用a目录下的类 其实可以这么操作 import sys sys.path.append('a目录路径') import
tk_zhang
·
2009-10-13 14:00
java
C++
c
windows
python
在WINDOWS上将Python 文件转为(生成)可执行程序 exe 文件
闲话就不多说了,需要 Python 2.5 + Py2exe py2exe下载地址 (直接安装即可) 步骤如下: 1.编译你的Py文件,确保无误,保存到…(例如:C:\old\
test.py
fouri
·
2009-08-11 02:00
C++
c
windows
python
C#
sqlite初用
#
test.py
=
hong201
·
2009-08-08 14:00
python
sqlite
jdbc
import
数据库驱动程序
Types
PyRun_SimpleFile()崩溃问题
PyRun_SimpleFile()造成程序崩溃.例程如下:#include"python.h"intmain(){ Py_Initialize(); FILE*fp=fopen("
test.py
skyremember
·
2008-09-17 10:00
windows
function
python
File
dll
FP
在Linux中,开机自动运行普通用户的脚本程序
测试环境:Fedora7,管理员:root,普通用户:test1实现目标:在Linux启动时,自动运行位于普通用户test1根目录下的脚本程序
test.py
,该程序会在每次执行时自动向本地日志文件追加一条记录
sinboy
·
2008-05-21 15:00
python用法:处理sqlite中的中文字符时遇到的问题
文件
test.py
是utf-8编码的,OK,结果没问题。#!
iihero
·
2008-03-03 12:00
python
sqlite
python用法:处理sqlite中的中文字符时遇到的问题
文件
test.py
是utf-8编码的,OK,结果没问题。#!
wsql
·
2008-03-03 12:00
python
python用法:处理sqlite中的中文字符时遇到的问题
文件
test.py
是utf-8编码的,OK,结果没问题。#!
iihero
·
2008-03-03 12:00
python
sqlite
测试
import
python用法:处理sqlite中的中文字符时遇到的问题
文件
test.py
是utf-8编码的,OK,结果没问题。#!
wsql
·
2008-03-03 12:00
python
利用python复制文件,或目录
importshutil#复制文件shutil.copyfile('listfile.py','d:/
test.py
')#复制目录shutil.copytree('d:/www','c:/temp/')
hongfu_
·
2007-12-12 13:00
开机隐藏cmd运行程序
下面举个小例子来测试一下: 先建一个python文件
test.py
,代码如下: python 代码 if __name__ == "__main
dongin
·
2007-12-03 16:00
C++
c
windows
python
C#
实现一个 django 的 url dispatcher
djangodispatcher.googlecode.com/svn/trunk/mapper.py http://djangodispatcher.googlecode.com/svn/trunk/
test.py
huangyiiiiii
·
2007-06-25 17:00
SVN
django
上一页
20
21
22
23
24
25
26
27
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他