예제 #1
0
#!c:\python27\python.exe

# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

### Twisted Preamble
# This makes sure that users don't have to set up their environment
# specially in order to run these programs from bin/.
import sys, os
path = os.path.abspath(sys.argv[0])
while os.path.dirname(path) != path:
    if os.path.basename(path).startswith('Twisted'):
        sys.path.insert(0, path)
        break
    path = os.path.dirname(path)
### end of preamble

from twisted.conch.scripts.cftp import run
run()
예제 #2
0
파일: cftp.py 프로젝트: Mj258/weiboapi
#!E:\wamp\www\weiboapi\weiboapi\srapyDemo\envs\Scripts\python.exe
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

import sys, os
extra = os.path.dirname(os.path.dirname(sys.argv[0]))
sys.path.insert(0, extra)
try:
    import _preamble
except ImportError:
    sys.exc_clear()
sys.path.remove(extra)

from twisted.conch.scripts.cftp import run
run()
예제 #3
0
# -*- coding: utf-8 -*-
import re
import sys

from twisted.conch.scripts.cftp import run

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(run())