import arcpy

# Create a Describe object
#
desc = arcpy.Describe("C:/Data/chesapeake.gdb") # Print some Describe Object properties
#
if hasattr(desc, "name"):
print "Name: " + desc.name
if hasattr(desc, "dataType"):
print "DataType: " + desc.dataType
#DataType == "Folder" DataType == "Workspace"
#.DataType == "FeatureDataset"
if hasattr(desc, "catalogPath"):
print "CatalogPath: " + desc.catalogPath # Examine children and print their name and dataType
#
print "Children:"
for child in desc.children:
print "\t%s = %s" % (child.name, child.dataType)

  

arcgis python 判断是数据库或是文件夹的更多相关文章

  1. 用Python来实现列举某个文件夹内所有的文件列表

    用Python来实现列举某个文件夹内所有的文件列表.吾八哥我动手写代码之前分析了下,遍历一个文件夹,肯定是需要用到os模块了,查阅模块帮助信息,可知os.listdir()方法可以列举某个文件夹内的所 ...

  2. python之对指定目录文件夹的批量重命名

    python之对指定目录文件夹的批量重命名 import os,shutil,string dir = "/Users/lee0oo0/Documents/python/test" ...

  3. python listdir() 中文路径 中文文件夹 乱码 解决方法

    python listdir() 中文路径 中文文件夹 乱码 解决方法 listdir(path)返回的结果的编码似乎和我们提供的 path 参数的编码有关: path = 'd:/test' try ...

  4. pg数据库data文件夹达到32G

    最近工作中遇到pg数据库data文件夹大小达到32G,大致的排查流程如下: 1.首先查看是哪个文件或者那些文件比较大: 2.根据文件的名称找到对应的数据表a: 3.确认数据表a中数据实际上只有3000 ...

  5. windows下更换MySql数据库数据文件夹位置

    详细解决地址 ,感谢博主  :https://blog.csdn.net/u010953266/article/details/56499361 概述 由于更换硬盘,系统重新安装了一遍,原来的mysq ...

  6. Python 的 pyinotify 模块 监控文件夹和文件的变动

    官方参考: https://github.com/seb-m/pyinotify/wiki/Events-types https://github.com/seb-m/pyinotify/wiki/I ...

  7. 用python脚本通过excel生成文件夹树结构

    大概这样写标题是对的吧... 目标: 通过excel目录结构文档生成文件夹树结构. 也就是: 通过下面的excel

  8. python (1)一个简单的爬虫: python 在windows下 创建文件夹并写入文件

    1.一个简单的爬虫:爬取豆瓣的热门电影的信息 写在前面:如何创建本来存在的文件夹并写入 t_path = "d:/py/inn" #本来不存在inn,先定义路径,然后如果不存在,则 ...

  9. python 小练习之删除文件夹下的所有文件,包括子文件夹中的文件

    先屡一下思路 一步步怎么实现 1  要求是要删除所有文件(只是删除文件 而不是文件夹),所以 我们肯定要遍历这个文件目录 (for  in遍历) 2 每遍历一个元素时(文件),我们要判断该元素的属性是 ...

随机推荐

  1. django 权限控制精简版

    视图代码: 视图代码 def index(request): return render(request,'index.html') def login(request): if request.me ...

  2. Oracle 如何查看当前的实例及切换实例

    一.Oracle查看当前实例 1.打开终端,输入命令sqlpuls / as sysdba连接到数据库 2.输入命令show parameter name便可以查看当前登录数据库的参数配置,如下可以看 ...

  3. 7.Spring整合Hibernate_1

    Spring 整合 Hibernate 1.Spring指定 database,给下面创建的 SessionFactory用 <!-- !!!!!可以使用 @Resource 将 这个bean对 ...

  4. C# 填充无效,无法被移除

    1.本文采用微软的 RijndaelManaged 命名空间: System.Security.Cryptography Assemblies: mscorlib.dll, netstandard.d ...

  5. Python学习记录6-list、tuple、dict、set复习

    数据类型在一门语言中是非常重要的,所以选择再次学习一下加深记忆.本次主要参考了大神廖雪峰的官方网站,非常感谢大神,讲的很清晰,收获很大. 标准数据类型 Number(数字) String(字符串) L ...

  6. python 判断数据类型及释疑

    Python 判断数据类型有type和isinstance 基本区别在于: type():不会认为子类是父类 isinstance():会认为子类是父类类型 class Color(object): ...

  7. BZOJ5093 图的价值——推式子+第二类斯特林数

    原题链接 题解 题目等价于求这个式子 \[ans=n2^{\frac{(n-1)(n-2)}{2}}\sum\limits_{i=0}^{n-1}\binom{n-1}{i}i^k\] 有这么一个式子 ...

  8. 线段树(四)——两个标记(add和set)

    add无序,set有序.规定同时有两个标记时,表示先执行set再执行add. 1. 更新操作: int op,cl,cr,v; void update(int o, int L, int R) { , ...

  9. 牛客国庆集训派对Day6 && CCPC-WannaFly-Camp #1 F. kingdom(DP)

    题目链接:https://www.nowcoder.com/acm/contest/206/F 题意:一棵 n 个点的树,根为 1,重儿子到父亲的费用为 0,其余为 1,问所有点到 1 的最大总费用是 ...

  10. mysql: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    https://www.cnblogs.com/jpfss/p/9734487.html (mysql.sock错误解决方案)