示例#1
0
#!/usr/local/bin/python
"""
Fetch and play the Monty Python theme song. 
Requires Internet access and an FTP account. Uses audio filters
on Unix and the .au player on Windows.
- Configure getfile.py as needed for platform.
"""

from getpass import getpass
from PP4E.Internet.Ftp.getfile import getfile
from PP4E.System.Media.playfile import playfile

file = "sousa.au"
site = "ftp.rmi.net"
dir = "."
user = ("lutz", getpass("Pswd?"))

getfile(file, site, dir, user)
playfile(file)

# import os
# os.system("getone.py sousa.au")



示例#2
0
文件: sousa.py 项目: bjshan/pp4e
#!/usr/bin/python
"""
Usage: sousa.py. Fetch and play the Monty Python theme song.
This will not work on your system as is: it requires a machine with Internet access
and an FTP server account you can access, and uses audio filters on Unix and your
.au player on Windows. Configure this and playfile.py as needed for your platform.
"""

from getpass import getpass
from PP4E.Internet.Ftp.getfile import getfile
from PP4E.System.Media.playfile import playfile

file = 'sousa.au'		# default file coordinates
site = 'ftp.rmi.net'		# Monty Python theme song
dir = '.'
user = ('lutz', getpass('Pswd?'))

getfile(file, size, dir, user)	# fetch audio file by FTP
playfile(file)			# send it to audio player

# import os
# os.system('getone.py sousa.au')	# equivalent command line
示例#3
0
#!/usr/local/bin/python
"""
Usage: sousa.py.  Fetch and play the Monty Python theme song.
This will not work on your system as is: it requires a machine with Internet access
and an FTP server account you can access, and uses audio filters on Unix and your
.au player on Windows.  Configure this and playfile.py as needed for your platform.
"""

from getpass import getpass
from PP4E.Internet.Ftp.getfile import getfile
from PP4E.System.Media.playfile import playfile

file = 'sousa.au'  # default file coordinates
site = 'ftp.rmi.net'  # Monty Python theme song
dir = '.'
user = ('lutz', getpass('Pswd?'))

getfile(file, site, dir, user)  # fetch audio file by FTP
playfile(file)  # send it to audio player

# import os
# os.system('getone.py sousa.au')      # equivalent command line
示例#4
0
文件: sousa.py 项目: skinkie/Scripts
#!/usr/local/bin/python

# e.g. 13-6

from getpass import getpass
from PP4E.Internet.Ftp.getfile import getfile
from PP4E.System.Media.playfile import playfile


file = 'sousa.au'

site = 'ftp.rmi.net'
dir = '.'
user = ('lutz', getpass('Pswd?'))

getfile(file, site, dir, user)
playfile(file)