代码搜索结果
找到约 10,000 项符合
Python 的代码
cat.py
#!/usr/bin/env python
# Filename: cat.py
import sys
def readfile(filename):
'''Print a file to the standard output.'''
f=file(filename)
while True:
line=f.readline()
if len(line)==0
backup_ver1.py
#!/usr/bin/env python
# Filename: backup_ver1.py
import os
import time
# 1. The files and directories to be backed up are specified in a list.
source=['/home/swaroop/byte','/home/swaroop/bin']
# If
objvar.py
#!/usr/bin/env python
# Filename: objvar.py
class Person:
'''Represents a person.'''
population=0
def __init__(self,name):
'''Initializes the person's data.'''
self.name=name
prin
raising.py
#!/usr/bin/env python
# Filename: raising.py
class ShortInputException(Exception):
'''A user-defined exception class.'''
def __init__(self,length,atleast):
Exception.__init__(self)
self.length=
backup_ver3.py
#!/usr/bin/env python
# Filename: backup_ver3.py
import os
import time
# 1. The files and directories to be backed up are specified in a list.
source=['/home/swaroop/byte','/home/swaroop/bin'
backup_ver2.py
#!/usr/bin/env python
# Filename: backup_ver2.py
import os
import time
# 1. The files and directories to be backed up are specified in a list.
source=['/home/swaroop/byte','/home/swaroop/bin']
# If
backup_ver4.py
#!/usr/bin/env python
# Filename: backup_ver4.py
import os
import time
# 1. The files and directories to be backed up are specified in a list.
source=['/home/swaroop/byte','/home/swaroop/bin'
cat.py
#!/usr/bin/env python
# Filename: cat.py
import sys
def readfile(filename):
'''Print a file to the standard output.'''
f=file(filename)
while True:
line=f.readline()
if len(line)==0
grid.py
#!/usr/bin/env python
import os, sys, traceback
import Queue
import getpass
import re
from threading import Thread
from string import find, split, join, atof
# svmtrain and gnuplot executable
is_wi
testagrepy.py
#!/usr/bin/env python
'''
This is a simple test program for the dynamically loaded implementation of agrepy
created from the C files agrepy.c, sagrepy.c and lagrepy.c via SWIG and agrepy.i
'''
impor