X7ROOT File Manager
Current Path:
/opt/alt/python34/lib64/python3.4
opt
/
alt
/
python34
/
lib64
/
python3.4
/
ðŸ“
..
📄
__future__.py
(4.48 KB)
📄
__phello__.foo.py
(64 B)
ðŸ“
__pycache__
📄
_bootlocale.py
(1.27 KB)
📄
_collections_abc.py
(19.43 KB)
📄
_compat_pickle.py
(8.12 KB)
📄
_dummy_thread.py
(4.76 KB)
📄
_markupbase.py
(14.26 KB)
📄
_osx_support.py
(18.65 KB)
📄
_pyio.py
(72.16 KB)
📄
_sitebuiltins.py
(3.04 KB)
📄
_strptime.py
(21.54 KB)
📄
_sysconfigdata.py
(28.05 KB)
📄
_threading_local.py
(7.24 KB)
📄
_weakrefset.py
(5.57 KB)
📄
abc.py
(8.42 KB)
📄
aifc.py
(30.84 KB)
📄
antigravity.py
(475 B)
📄
argparse.py
(87.92 KB)
📄
ast.py
(11.75 KB)
📄
asynchat.py
(11.55 KB)
ðŸ“
asyncio
📄
asyncore.py
(20.51 KB)
📄
base64.py
(19.71 KB)
📄
bdb.py
(22.81 KB)
📄
binhex.py
(13.6 KB)
📄
bisect.py
(2.53 KB)
📄
bz2.py
(18.42 KB)
📄
cProfile.py
(5.2 KB)
📄
calendar.py
(22.4 KB)
📄
cgi.py
(35.1 KB)
📄
cgitb.py
(11.76 KB)
📄
chunk.py
(5.3 KB)
📄
cmd.py
(14.51 KB)
📄
code.py
(9.8 KB)
📄
codecs.py
(35.07 KB)
📄
codeop.py
(5.85 KB)
ðŸ“
collections
📄
colorsys.py
(3.97 KB)
📄
compileall.py
(9.39 KB)
ðŸ“
concurrent
ðŸ“
config-3.4m
📄
configparser.py
(48.53 KB)
📄
contextlib.py
(11.37 KB)
📄
copy.py
(8.79 KB)
📄
copyreg.py
(6.67 KB)
📄
crypt.py
(1.83 KB)
📄
csv.py
(15.81 KB)
ðŸ“
ctypes
ðŸ“
curses
📄
datetime.py
(74.03 KB)
ðŸ“
dbm
📄
decimal.py
(223.33 KB)
📄
difflib.py
(79.77 KB)
📄
dis.py
(16.76 KB)
ðŸ“
distutils
📄
doctest.py
(102.04 KB)
📄
dummy_threading.py
(2.75 KB)
ðŸ“
email
ðŸ“
encodings
ðŸ“
ensurepip
📄
enum.py
(21.03 KB)
📄
filecmp.py
(9.6 KB)
📄
fileinput.py
(14.52 KB)
📄
fnmatch.py
(3.09 KB)
📄
formatter.py
(14.82 KB)
📄
fractions.py
(22.66 KB)
📄
ftplib.py
(37.63 KB)
📄
functools.py
(27.84 KB)
📄
genericpath.py
(3.79 KB)
📄
getopt.py
(7.31 KB)
📄
getpass.py
(5.93 KB)
📄
gettext.py
(20.28 KB)
📄
glob.py
(3.38 KB)
📄
gzip.py
(23.74 KB)
📄
hashlib.py
(9.62 KB)
📄
heapq.py
(17.58 KB)
📄
hmac.py
(4.94 KB)
ðŸ“
html
ðŸ“
http
ðŸ“
idlelib
📄
imaplib.py
(49.09 KB)
📄
imghdr.py
(3.45 KB)
📄
imp.py
(9.75 KB)
ðŸ“
importlib
📄
inspect.py
(102.19 KB)
📄
io.py
(3.32 KB)
📄
ipaddress.py
(69.92 KB)
ðŸ“
json
📄
keyword.py
(2.17 KB)
ðŸ“
lib-dynload
ðŸ“
lib2to3
📄
linecache.py
(3.86 KB)
📄
locale.py
(72.78 KB)
ðŸ“
logging
📄
lzma.py
(18.92 KB)
📄
macpath.py
(5.49 KB)
📄
macurl2path.py
(2.67 KB)
📄
mailbox.py
(76.54 KB)
📄
mailcap.py
(7.26 KB)
📄
mimetypes.py
(20.29 KB)
📄
modulefinder.py
(22.87 KB)
ðŸ“
multiprocessing
📄
netrc.py
(5.61 KB)
📄
nntplib.py
(42.07 KB)
📄
ntpath.py
(20 KB)
📄
nturl2path.py
(2.39 KB)
📄
numbers.py
(10 KB)
📄
opcode.py
(5.31 KB)
📄
operator.py
(8.98 KB)
📄
optparse.py
(58.93 KB)
📄
os.py
(33.09 KB)
📄
pathlib.py
(41.47 KB)
📄
pdb.py
(59.56 KB)
📄
pickle.py
(54.68 KB)
📄
pickletools.py
(89.61 KB)
📄
pipes.py
(8.71 KB)
📄
pkgutil.py
(20.72 KB)
ðŸ“
plat-linux
📄
platform.py
(45.67 KB)
📄
plistlib.py
(31.05 KB)
📄
poplib.py
(13.98 KB)
📄
posixpath.py
(13.13 KB)
📄
pprint.py
(14.57 KB)
📄
profile.py
(21.52 KB)
📄
pstats.py
(25.7 KB)
📄
pty.py
(4.65 KB)
📄
py_compile.py
(6.94 KB)
📄
pyclbr.py
(13.2 KB)
📄
pydoc.py
(100.6 KB)
ðŸ“
pydoc_data
📄
queue.py
(8.63 KB)
📄
quopri.py
(7.09 KB)
📄
random.py
(25.47 KB)
📄
re.py
(15.24 KB)
📄
reprlib.py
(4.99 KB)
📄
rlcompleter.py
(5.93 KB)
📄
runpy.py
(10.56 KB)
📄
sched.py
(6.21 KB)
📄
selectors.py
(16.7 KB)
📄
shelve.py
(8.33 KB)
📄
shlex.py
(11.28 KB)
📄
shutil.py
(38.97 KB)
ðŸ“
site-packages
📄
site.py
(21.05 KB)
📄
smtpd.py
(29.29 KB)
📄
smtplib.py
(38.06 KB)
📄
sndhdr.py
(6.11 KB)
📄
socket.py
(18.62 KB)
📄
socketserver.py
(23.8 KB)
ðŸ“
sqlite3
📄
sre_compile.py
(19.44 KB)
📄
sre_constants.py
(7.1 KB)
📄
sre_parse.py
(30.69 KB)
📄
ssl.py
(33.93 KB)
📄
stat.py
(4.3 KB)
📄
statistics.py
(19.1 KB)
📄
string.py
(11.18 KB)
📄
stringprep.py
(12.61 KB)
📄
struct.py
(257 B)
📄
subprocess.py
(63.04 KB)
📄
sunau.py
(17.67 KB)
📄
symbol.py
(2 KB)
📄
symtable.py
(7.23 KB)
📄
sysconfig.py
(24.05 KB)
📄
tabnanny.py
(11.14 KB)
📄
tarfile.py
(89.41 KB)
📄
telnetlib.py
(22.53 KB)
📄
tempfile.py
(22 KB)
ðŸ“
test
📄
textwrap.py
(18.83 KB)
📄
this.py
(1003 B)
📄
threading.py
(47.66 KB)
📄
timeit.py
(11.69 KB)
📄
token.py
(2.96 KB)
📄
tokenize.py
(25 KB)
📄
trace.py
(30.75 KB)
📄
traceback.py
(10.91 KB)
📄
tracemalloc.py
(15.28 KB)
📄
tty.py
(879 B)
📄
types.py
(5.28 KB)
ðŸ“
unittest
ðŸ“
urllib
📄
uu.py
(6.61 KB)
📄
uuid.py
(23.17 KB)
ðŸ“
venv
📄
warnings.py
(13.97 KB)
📄
wave.py
(17.27 KB)
📄
weakref.py
(18.93 KB)
📄
webbrowser.py
(20.93 KB)
ðŸ“
wsgiref
📄
xdrlib.py
(5.77 KB)
ðŸ“
xml
ðŸ“
xmlrpc
📄
zipfile.py
(66.94 KB)
Editing: netrc.py
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, shlex, stat __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" def __init__(self, msg, filename=None, lineno=None): self.filename = filename self.lineno = lineno self.msg = msg Exception.__init__(self, msg) def __str__(self): return "%s (%s, line %s)" % (self.msg, self.filename, self.lineno) class netrc: def __init__(self, file=None): default_netrc = file is None if file is None: try: file = os.path.join(os.environ['HOME'], ".netrc") except KeyError: raise OSError("Could not find .netrc: $HOME is not set") self.hosts = {} self.macros = {} with open(file) as fp: self._parse(file, fp, default_netrc) def _parse(self, file, fp, default_netrc): lexer = shlex.shlex(fp) lexer.wordchars += r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""" lexer.commenters = lexer.commenters.replace('#', '') while 1: # Look for a machine, default, or macdef top-level keyword saved_lineno = lexer.lineno toplevel = tt = lexer.get_token() if not tt: break elif tt[0] == '#': if lexer.lineno == saved_lineno and len(tt) == 1: lexer.instream.readline() continue elif tt == 'machine': entryname = lexer.get_token() elif tt == 'default': entryname = 'default' elif tt == 'macdef': # Just skip to end of macdefs entryname = lexer.get_token() self.macros[entryname] = [] lexer.whitespace = ' \t' while 1: line = lexer.instream.readline() if not line or line == '\012': lexer.whitespace = ' \t\r\n' break self.macros[entryname].append(line) continue else: raise NetrcParseError( "bad toplevel token %r" % tt, file, lexer.lineno) # We're looking at start of an entry for a named machine or default. login = '' account = password = None self.hosts[entryname] = {} while 1: tt = lexer.get_token() if (tt.startswith('#') or tt in {'', 'machine', 'default', 'macdef'}): if password: self.hosts[entryname] = (login, account, password) lexer.push_token(tt) break else: raise NetrcParseError( "malformed %s entry %s terminated by %s" % (toplevel, entryname, repr(tt)), file, lexer.lineno) elif tt == 'login' or tt == 'user': login = lexer.get_token() elif tt == 'account': account = lexer.get_token() elif tt == 'password': if os.name == 'posix' and default_netrc: prop = os.fstat(fp.fileno()) if prop.st_uid != os.getuid(): import pwd try: fowner = pwd.getpwuid(prop.st_uid)[0] except KeyError: fowner = 'uid %s' % prop.st_uid try: user = pwd.getpwuid(os.getuid())[0] except KeyError: user = 'uid %s' % os.getuid() raise NetrcParseError( ("~/.netrc file owner (%s) does not match" " current user (%s)") % (fowner, user), file, lexer.lineno) if (prop.st_mode & (stat.S_IRWXG | stat.S_IRWXO)): raise NetrcParseError( "~/.netrc access too permissive: access" " permissions must restrict access to only" " the owner", file, lexer.lineno) password = lexer.get_token() else: raise NetrcParseError("bad follower token %r" % tt, file, lexer.lineno) def authenticators(self, host): """Return a (user, account, password) tuple for given host.""" if host in self.hosts: return self.hosts[host] elif 'default' in self.hosts: return self.hosts['default'] else: return None def __repr__(self): """Dump the class data in the format of a .netrc file.""" rep = "" for host in self.hosts.keys(): attrs = self.hosts[host] rep = rep + "machine "+ host + "\n\tlogin " + repr(attrs[0]) + "\n" if attrs[1]: rep = rep + "account " + repr(attrs[1]) rep = rep + "\tpassword " + repr(attrs[2]) + "\n" for macro in self.macros.keys(): rep = rep + "macdef " + macro + "\n" for line in self.macros[macro]: rep = rep + line rep = rep + "\n" return rep if __name__ == '__main__': print(netrc())
Upload File
Create Folder