Python
lvdou2518
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python 学习资料
http://www.360doc.com/userhome.aspx?userid=3046928&cid=7#原创 2013-09-04 17:06:09 · 703 阅读 · 0 评论 -
python help
https://docs.python.org/2.7/tutorial/inputoutput.html#old-string-formatting原创 2014-05-19 14:03:25 · 631 阅读 · 0 评论 -
Python创建服务代码参考
#-*-coding:utf-8 __author__ = 'suwen' import os import arcpy def CreateContectionFile(wrkspc,userName,password,serverName): # con = 'http://localhost:6080/arcgis/admin' con="http://"原创 2014-04-09 11:23:34 · 1113 阅读 · 0 评论 -
Python 目录操作
在Python中,文件操作主要来自os模块,主要方法如下: os.listdir(dirname):列出dirname下的目录和文件 os.getcwd():获得当前工作目录 os.curdir:返回当前目录('.') os.chdir(dirname):改变工作目录到dirname os.path.isdir(name):判断name是不是一个目录,name不是目录就返回false转载 2014-04-18 15:55:49 · 722 阅读 · 0 评论 -
python
1 python语言,在已有的文件夹下创建新的文件夹 import os path = "已有文件夹路径" title = "新文件夹名称" new_path = os.path.join(path, title) if not os.path.isdir(new_path): os.makedirs(new_path) 2Python删除目录下的文件以及文件夹原创 2014-03-31 12:44:52 · 706 阅读 · 0 评论 -
Python 上传服务并覆盖同名服务
import arcpy, os, sys import xml.dom.minidom as DOM arcpy.env.overwriteOutput = True # Update these variables # The tempPath variable is a relative path which is the same directory # t转载 2014-04-17 09:53:30 · 1160 阅读 · 0 评论 -
【转】通过Python脚本自动发布ArcGIS服务
通常我们使用ArcCatalog或者ArcGIS Server Manager等图形界面工具来发布ArcGIS服务,然而有些情况下,比如需要发布的服务数量很多,而且需要不定期随时发布的时候,再使用这些工具进行人工操作就显得力不从心了。ArcGIS的强大之处就在于其为我们提供了多种选择,我们可以通过Python编写脚本,调用ArcPy模块中的功能来实现自动扫描文件夹并将其中的地图文档发布为地图服务。转载 2014-03-20 17:31:27 · 972 阅读 · 0 评论 -
利用python进行批量导出时态图片
4、利用python进行批量导出时态图片,代码如下: import arcpy import os import datetime mxd = arcpy.mapping.MapDocument(r"d:\fengluzhao\ddd.mxd") df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0] #df.time.curren原创 2014-03-31 15:55:55 · 1017 阅读 · 0 评论 -
python字符串截取
str = "0123456789" print str[0:3] #截取第一位到第三位的字符 012 .strip() .lstrip() .rstrip(',') 去空格及特殊符号 复制字符串 Python 1 #strcpy(sStr1,sStr2) 2 sStr1 = 'strcpy' 3 sStr2 = sStr1 4 s转载 2014-03-31 16:45:43 · 1148 阅读 · 0 评论 -
python中文字符
建议在python中要将所有的中文变量前加u 如 filenmae原创 2014-04-15 11:19:33 · 770 阅读 · 0 评论 -
python中关于文件路径的简单操作
python中关于文件路径的简单操作 几个主要的函数: 1: os.listdir(path) //path为目录 功能相当于在path目录下执行dir命令,返回为list类型 举例: print os.listdir('..') 输出: [a,b,c,d] 2: os.path.walk(path,visit,arg) path :是将要转载 2014-04-15 10:08:37 · 802 阅读 · 0 评论 -
Python开发利器spyder
http://code.google.com/p/spyderlib/downloads/list?can=1&q=原创 2014-04-12 21:51:59 · 1463 阅读 · 0 评论
分享