<|endoftext|>TPShell:
avatar = make_ftp_shell(avatarId, self._root_path)
return (twisted.protocols.ftp.IFTPShell,
avatar,
getattr(avatar, "logout", lambda: None))
raise NotImplementedError()
class FtpServerFactory(object):
"""
port = FtpServerFactory("/tmp", 2121).makeListner()
self.addCleanup(port.stopListening)
"""
def __init__(self, root_path, port):
factory = twisted.protocols.ftp.FTPFactory()
realm = FTPRealm(root_path)
portal = twisted.cred.portal.Portal(realm)
portal.registerChecker(twisted.cred.checkers.AllowAnonymousAccess(),
twisted.cred.credentials.IAnonymous)
checker = twisted.cred.checkers.\
InMemoryUsernamePasswordDatabaseDontUse()
checker.addUser("john", "john")
portal.registerChecker(checker)
factory.tld = root_path
factory.userAnonymous = "anon"
factory.portal = portal
factory.protocol = twisted.protocols.ftp.FTP
self._factory = factory
self._port = port
def makeListener(self):
# XXX use 0 instead of self._port?
return twisted.internet.reactor.listenTCP(
self._port, self._factory, interface="127.0.0.1")
def parse_options(args):
parser = optparse.OptionParser()
parser.add_option("--log", action="store_true")
parser.add_option("--port", type="int", default=2121)
options, remaining_args = parser.parse_args(args)
options.root_path = remaining_args[0]
return options
def main(argv):
options = parse_options(argv[1:])
if options.log:
log.startLogging(sys.stdout)
factory = FtpServerFactory(options.root_path, options.port)
factory.makeListener()
twisted.internet.reactor.run()
if __name__ == "__main__":
main(sys.argv)
<|endoftext|>Find an HR Job Near You
LOCAL CHAPTERS
Find chapters in your area
Career Development: Coaching HR
HR professionals turn to coaches for time management tips, delegation skills and strategic help if they have to foot the bill.
"I was overwhelmed at work. I’d leave at 8 o’clock at night and still have mountains of work I couldn’t get done,” recalls Sunny Gatz, an HR generalist at a biotech company in Seattle. “I hired a coach to get help improving my situation.”
Gatz says she always had trouble delegating responsibility and learned from her coach how to do that more effectively. “HR people are often asked to do so much with so little that we get very good at being self-reliant,” she says. “The trouble is that the workload can overload you. My coach helped me see the value of delegating and asking for help. She got me over the fear of reaching out for help.”
Gatz is part of a growing number of HR professionals who are turning to coaches to sharpen their career smarts. A coach can be part adviser, part ally, part confidante, part counselor and part friend. And it’s the complexity of this relationship that makes it so satisfying to Beverly Kaye, who has used a coach for years. Kaye is founder of Career Systems International, a management consulting firm in Los Angeles. As president of her firm, she is acting HR director, managing 20 full-time employees and 30 consultants around the country.
“My coach is someone I can bounce ideas off of, brainstorm with and jump-start my energy with,” Kaye relates.
Between 25 percent and 40 percent of Fortune 500 companies hire executive coaches for their employees, according to Philadelphia-based Hay Group, an international consulting and research firm. Although there are no known figures on the number of coaches working with HR executives, experts within the coaching field say the number is on the rise.
Many companies, however, still do not pay for coaches for HR, even though they will pay for managers in other functions. But that hasn’t stopped some in HR. Even if they have to pay out of pocket, they’ll