当前位置: 首页>>代码示例>>Python>>正文


Python Track.path方法代码示例

本文整理汇总了Python中track.Track.path方法的典型用法代码示例。如果您正苦于以下问题:Python Track.path方法的具体用法?Python Track.path怎么用?Python Track.path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在track.Track的用法示例。


在下文中一共展示了Track.path方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: indexFromFile

# 需要导入模块: from track import Track [as 别名]
# 或者: from track.Track import path [as 别名]
	def indexFromFile(self):
		self.file = open(os.getcwd() + '/options/index.txt', 'r')
		path = None
		line = self.file.readline()
		while line != '':
			code = line[0:2]
			if code == "NP":
				path = line[2:-1]
				line = self.file.readline()
			t = Track()
			t.path = path + "/" + line[0:-1]
			t.artist = self.file.readline()[0:-1]
			t.title = self.file.readline()[0:-1]
			t.album = self.file.readline()[0:-1]
			self.tracks.append(t)
			self.gui.addTrack(t)
			line = self.file.readline()
			
		self.file.close()
		self.gui.loading_finished()	
开发者ID:nemo13,项目名称:PySic,代码行数:22,代码来源:indexer.py

示例2: list

# 需要导入模块: from track import Track [as 别名]
# 或者: from track.Track import path [as 别名]
baseNameAdditional = aifSet + "fpBase.nbs"

maxLengthCheck = 100

tracks = list()

os.chdir(aifSet)


# Читаем файлы из директории
for dirname, dirnames, filenames in os.walk(aifSetAll):
    for filename in filenames:
        if fnmatch.fnmatch(filename, "*.aif"):
            path = os.path.join(aifSetAll, filename)
            track = Track()
            track.path = path
            tracks.append(track)


# Преобразование aif to wav
# for track in tracks:
#    wavFileName = os.path.splitext(track.path)[0] + ".wav"
#    subprocess.call([sox, track.path, wavFileName])
#    track.path = wavFileName


# Делаем хеши полных файлов
for track in tracks:
    track.hashPath = os.path.splitext(track.path)[0] + ".hash"
    subprocess.check_output([hashBuild, track.path, track.hashPath])
开发者ID:davidxu27,项目名称:FingerPrintTesting,代码行数:32,代码来源:main.py


注:本文中的track.Track.path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。