This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _full_path(self, partial, useFallBack=False): | |
if partial.startswith("/"): | |
partial = partial[1:] | |
# Find out the real path. If has been requesetd for a fallback path, | |
# use it | |
path = primaryPath = os.path.join( | |
self.fallbackPath if useFallBack else self.root, partial) | |
# If the pah does not exists and we haven't been asked for the fallback path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getattr(self, path, fh=None): | |
full_path = self._full_path(path) | |
st = os.lstat(full_path) | |
return dict((key, getattr(st, key)) for key in ('st_atime', 'st_ctime', | |
'st_gid', 'st_mode', 'st_mtime', 'st_nlink', 'st_size', 'st_uid', 'st_blocks')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def readdir(self, path, fh): | |
dirents = ['.', '..'] | |
full_path = self._full_path(path) | |
# print("listing " + full_path) | |
if os.path.isdir(full_path): | |
dirents.extend(os.listdir(full_path)) | |
if self.fallbackPath not in full_path: | |
full_path = self._full_path(path, useFallBack=True) | |
# print("listing_ext " + full_path) | |
if os.path.isdir(full_path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
class A: | |
def __init__(self): | |
pass | |
class C: | |
def __init__(self): | |
print("deva") | |
pass | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Engine class of the RPN Calculator | |
""" | |
import math | |
class rpn_engine: | |
def __init__(self): | |
""" Constructor """ | |
self.stack = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Engine class of the RPN Calculator | |
""" | |
import math | |
class rpn_engine: | |
def __init__(self): | |
""" Constructor """ | |
self.stack = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Engine class of the RPN Calculator | |
""" | |
import math | |
class rpn_engine: | |
def __init__(self): | |
""" Constructor """ | |
self.stack = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Engine class of the RPN Calculator | |
""" | |
import math | |
class rpn_engine: | |
def __init__(self): | |
""" Constructor """ | |
self.stack = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Engine class of the RPN Calculator | |
""" | |
import math | |
from inspect import signature | |
class rpn_engine: | |
def __init__(self): | |
""" Constructor """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import with_statement | |
import os | |
import sys | |
import errno | |
from fuse import FUSE, FuseOSError, Operations |
OlderNewer