• 大小: 3.3MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-09
  • 语言: 其他
  • 标签: Openlayers  

资源简介

openlayers 3.4 最新版本源代码,希望对各位有用

资源截图

代码片段和文件信息

#!/usr/bin/env python

from cStringIO import StringIO
import glob
import gzip
import json
import multiprocessing
import os
import re
import shutil
import sys

from pake import Target
from pake import ifind main output rule target variables virtual which
from Queue import Queue
from threading import Thread


class ThreadPool:
    “““A basic pool of worker threads“““
    class Worker(Thread):
        def __init__(self tasks):
            Thread.__init__(self)
            self.tasks = tasks
            self.daemon = True # threads will be killed on exit
            self.start()

        def run(self):
            while True:
                # block until a task is ready to be done
                function args kargs = self.tasks.get()
                try:
                    function(*args **kargs)
                except:
                    print(“ERROR“)
                    for count thing in enumerate(args):
                        print ‘{0}. {1}‘.format(count thing)
                    print(sys.exc_info()[0])
                    print(“ERROR“)
                    self.tasks.errors = True
                self.tasks.task_done()

    def __init__(self num_threads = multiprocessing.cpu_count() + 1):
        self.tasks = Queue(num_threads)
        self.tasks.errors = False
        # create num_threads Workers by default the number of CPUs + 1
        for _ in range(num_threads): self.Worker(self.tasks)

    def add_task(self function *args **kargs):
        self.tasks.put((function args kargs))

    def wait_completion(self):
        # wait for the queue to be empty
        self.tasks.join()
        return self.tasks.errors


if sys.platform == ‘win32‘:

    win = {
        ‘CLEANCSS‘: ‘./node_modules/.bin/cleancss‘
        ‘GIT‘: ‘git.exe‘
        ‘GJSLINT‘: ‘gjslint.exe‘
        ‘JSDOC‘: ‘./node_modules/.bin/jsdoc‘
        ‘JSHINT‘: ‘./node_modules/.bin/jshint‘
        ‘PYTHON‘: ‘python.exe‘
        ‘PHANTOMJS‘: ‘./node_modules/.bin/phantomjs‘
    }

    sys_dir = os.environ.get(‘SYSTEMDRIVE‘)
    program_files = os.environ.get(‘PROGRAMFILES‘)

    if not which(win[‘GIT‘]):
        win[‘GIT‘] = os.path.join(program_files ‘Git‘ ‘cmd‘ ‘git.exe‘)
    if not which(win[‘GIT‘]):
        win[‘GIT‘] = os.path.join(program_files ‘Git‘ ‘bin‘ ‘git.exe‘)

    if not which(win[‘PYTHON‘]):
        win[‘PYTHON‘] = os.path.join(sys_dir ‘Python27‘ ‘python.exe‘)

    if not which(win[‘GJSLINT‘]):
        win[‘GJSLINT‘] = os.path.join(sys_dir ‘Python27‘ ‘scripts‘ ‘gjslint.exe‘)

    if not which(win[‘PHANTOMJS‘]):
        win[‘PHANTOMJS‘] = ‘phantomjs.exe‘
    if not which(win[‘PHANTOMJS‘]):
        win[‘PHANTOMJS‘] = os.path.join(sys_dir ‘phantomjs-1.9.7-windows‘ ‘phantomjs.exe‘)

    if not which(win[‘JSDOC‘]):
        win[‘JSDOC‘] = os.path.join(program_files ‘jsdoc3‘ ‘jsdoc.cmd‘)

    for program path in win.iteritems():
        setattr(variables program path)

else:
    variables.CLEANCSS = ‘./node_modules/.bin/clean

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-03-27 09:22  ol3-3.4.0\
     文件         110  2015-03-27 09:22  ol3-3.4.0\.gitignore
     文件          54  2015-03-27 09:22  ol3-3.4.0\.jshintrc
     文件          88  2015-03-27 09:22  ol3-3.4.0\.npmignore
     文件         182  2015-03-27 09:22  ol3-3.4.0\.travis.yml
     文件       12425  2015-03-27 09:22  ol3-3.4.0\CONTRIBUTING.md
     文件        1504  2015-03-27 09:22  ol3-3.4.0\LICENSE.md
     文件         516  2015-03-27 09:22  ol3-3.4.0\README.md
     目录           0  2015-03-27 09:22  ol3-3.4.0\bin\
     文件       69569  2015-03-27 09:22  ol3-3.4.0\bin\BeautifulSoup.py
     文件         901  2015-03-27 09:22  ol3-3.4.0\bin\check-example.js
     文件         818  2015-03-27 09:22  ol3-3.4.0\bin\combine-examples.py
     文件        6040  2015-03-27 09:22  ol3-3.4.0\bin\example-screenshot.js
     文件        8069  2015-03-27 09:22  ol3-3.4.0\bin\exampleparser.py
     文件        2486  2015-03-27 09:22  ol3-3.4.0\bin\loader_hosted_examples.js
     文件        4132  2015-03-27 09:22  ol3-3.4.0\bin\pyglslunit.py
     文件          56  2015-03-27 09:22  ol3-3.4.0\build.cmd
     文件       28719  2015-03-27 09:22  ol3-3.4.0\build.py
     目录           0  2015-03-27 09:22  ol3-3.4.0\changelog\
     文件         479  2015-03-27 09:22  ol3-3.4.0\changelog\upgrade-notes.md
     文件       32244  2015-03-27 09:22  ol3-3.4.0\changelog\v3.1.0.md
     文件         269  2015-03-27 09:22  ol3-3.4.0\changelog\v3.1.1.md
     文件       11485  2015-03-27 09:22  ol3-3.4.0\changelog\v3.2.0.md
     文件         318  2015-03-27 09:22  ol3-3.4.0\changelog\v3.2.1.md
     文件        5862  2015-03-27 09:22  ol3-3.4.0\changelog\v3.3.0.md
     文件        5758  2015-03-27 09:22  ol3-3.4.0\changelog\v3.4.0.md
     文件         118  2015-03-27 09:22  ol3-3.4.0\closure-util.json
     目录           0  2015-03-27 09:22  ol3-3.4.0\config\
     文件        1853  2015-03-27 09:22  ol3-3.4.0\config\examples-all.json
     目录           0  2015-03-27 09:22  ol3-3.4.0\config\jsdoc\
     目录           0  2015-03-27 09:22  ol3-3.4.0\config\jsdoc\api\
............此处省略873个文件信息

评论

共有 条评论