爱情 (1) 安装 (2) 北斗 (1) 毕业 (1) 变量 (1) 测绘局 (1) 测量 (2) 插件 (1) 查询 (1) 常用 (1) 成果转化 (1) 词汇 (1) 慈善 (1) 答辩 (2) 代码 (2) 电台 (1) 发泄 (1) 感悟 (4) 高程 (1) 搞笑 (5) 共产党 (1) 古诗词 (1) 管理 (1) 函数 (3) 绘图 (1) 加密 (1) 交际 (1) 教程 (4) 教育 (2) 解决 (4) 解密 (1) 精度 (1) 酒桌 (2) 开源 (2) 科技 (1) 科学 (1) 刻录 (1) 老外 (1) 励志 (5) 连续剧 (1) 恋爱 (1) 列表 (1) 领导 (1) 美食 (2) 名人 (3) 命令 (4) 区别 (1) 日记 (2) 软件 (12) 商业 (3) 时政 (1) 视频 (1) 数据 (1) 算法 (1) 投影 (2) 图论 (1) 网络 (1) 网站 (1) 卫星 (3) 未成年 (1) 慰问 (1) 文本 (1) 文件 (2) 下载 (4) 笑话 (2) 学习 (9) 遥感 (1) 疑问 (5) 营销 (1) 娱乐 (3) 源代码 (2) 政策 (1) 指导 (3) 智慧 (5) 主成分分析 (2) 抓图 (1) 专家 (1) 资料 (5) 字符串 (1) 最短路径 (1) 坐标 (1) baidu (3) Bernese (1) blog (2) c# (9) China (3) Dijkstra (1) DNS (1) doris (1) dos (1) excel (1) firefox (3) GAMIT (8) gcc (1) GIS (3) GMT (1) GPS (5) ITRF (1) linux (5) mapx (1) matlab (6) movie (4) music (3) oracle (2) pic (1) PPT (3) PROJ.4 (2) python (2) QQ (2) rinex (1) shell (2) sql (1) teqc (3) tools (1) tps (1) ubuntu (5) USA (1) website (1)

2011年3月30日星期三

python调用teqc转tps原始文件为rinex

# -*- coding: utf-8 -*-
#python 2.6
#this is test.to get current directory files
import os
import glob
mydir=os.getcwd() #check current directory
print "this is current directory: " +mydir

#inquiry whether change directory
mydirAnswer=raw_input("would you want to change directory??  n/y: ") #beloew python 3.0,function is raw_input;above python 3.0,function is input.
print mydirAnswer
mydirAnswer=mydirAnswer.lower() #all change to lower-case
if mydirAnswer=='y':
    mydir=raw_input("please input your full direcorty: ")
    print "you input directory is : "+ mydir
elif mydirAnswer=='n':
    print "you input directory is : "+ mydir  
#change directory is over

os.chdir(mydir) #change directory
print "this is your working directory: "+ os.getcwd()

for name in glob.glob('*.tps'):
    print name #topcon file name rule:xxxxmmdds.tps
    sitename=name[0:4]# get site name
    mm=name[4:6]
    dd=name[6:8]
    s=name[8:9]
    #deal every file name string
    #assembing dos command
    strdos='teqc -top tps +obs '+sitename+'.11o +nav'+' '+sitename+'.11n,'+sitename+'.11g'+' '+name
    print strdos
    os.popen(strdos)
raw_input("press ") #waiting your end this

没有评论:

发表评论

浏览统计