code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
import warnings def saveit(func): """A decorator that caches the return value of a function""" name = '_' + func.__name__ def _wrapper(self, *args, **kwds): if not hasattr(self, name): setattr(self, name, func(self, *args, **kwds)) return getattr(self, name) return _wrappe...
[ [ 1, 0, 0.0128, 0.0128, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 2, 0, 0.1026, 0.1154, 0, 0.66, 0.1429, 877, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.0641, 0.0128, 1, 0....
[ "import warnings", "def saveit(func):\n \"\"\"A decorator that caches the return value of a function\"\"\"\n\n name = '_' + func.__name__\n def _wrapper(self, *args, **kwds):\n if not hasattr(self, name):\n setattr(self, name, func(self, *args, **kwds))\n return getattr(self, nam...
import rope.base.pyobjects from rope.base import exceptions, utils class PyName(object): """References to `PyObject`\s inside python programs""" def get_object(self): """Return the `PyObject` object referenced by this `PyName`""" def get_definition_location(self): """Return a (module, li...
[ [ 1, 0, 0.005, 0.005, 0, 0.66, 0, 626, 0, 1, 0, 0, 626, 0, 0 ], [ 1, 0, 0.0101, 0.005, 0, 0.66, 0.0769, 632, 0, 2, 0, 0, 632, 0, 0 ], [ 3, 0, 0.0427, 0.0402, 0, 0.6...
[ "import rope.base.pyobjects", "from rope.base import exceptions, utils", "class PyName(object):\n \"\"\"References to `PyObject`\\s inside python programs\"\"\"\n\n def get_object(self):\n \"\"\"Return the `PyObject` object referenced by this `PyName`\"\"\"\n\n def get_definition_location(self):...
import rope.base.builtins import rope.base.pynames import rope.base.pyobjects from rope.base import ast, astutils, exceptions, pyobjects, arguments, worder BadIdentifierError = exceptions.BadIdentifierError def eval_location(pymodule, offset): """Find the pyname at the offset""" return eval_location2(pymodul...
[ [ 1, 0, 0.0031, 0.0031, 0, 0.66, 0, 74, 0, 1, 0, 0, 74, 0, 0 ], [ 1, 0, 0.0062, 0.0031, 0, 0.66, 0.0769, 903, 0, 1, 0, 0, 903, 0, 0 ], [ 1, 0, 0.0093, 0.0031, 0, 0....
[ "import rope.base.builtins", "import rope.base.pynames", "import rope.base.pyobjects", "from rope.base import ast, astutils, exceptions, pyobjects, arguments, worder", "BadIdentifierError = exceptions.BadIdentifierError", "def eval_location(pymodule, offset):\n \"\"\"Find the pyname at the offset\"\"\"...
class RopeError(Exception): """Base exception for rope""" class ResourceNotFoundError(RopeError): """Resource not found exception""" class RefactoringError(RopeError): """Errors for performing a refactoring""" class InterruptedTaskError(RopeError): """The task has been interrupted""" class Histo...
[ [ 3, 0, 0.0246, 0.0328, 0, 0.66, 0, 367, 0, 0, 0, 0, 645, 0, 0 ], [ 8, 1, 0.0328, 0.0164, 1, 0.08, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.0902, 0.0328, 0, 0.66, ...
[ "class RopeError(Exception):\n \"\"\"Base exception for rope\"\"\"", " \"\"\"Base exception for rope\"\"\"", "class ResourceNotFoundError(RopeError):\n \"\"\"Resource not found exception\"\"\"", " \"\"\"Resource not found exception\"\"\"", "class RefactoringError(RopeError):\n \"\"\"Errors fo...
import cPickle as pickle import os import shutil import sys import warnings import rope.base.fscommands from rope.base import exceptions, taskhandle, prefs, history, pycore, utils from rope.base.resourceobserver import * from rope.base.resources import File, Folder, _ResourceMatcher class _Project(object): def ...
[ [ 1, 0, 0.0027, 0.0027, 0, 0.66, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0053, 0.0027, 0, 0.66, 0.0667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.008, 0.0027, 0, 0...
[ "import cPickle as pickle", "import os", "import shutil", "import sys", "import warnings", "import rope.base.fscommands", "from rope.base import exceptions, taskhandle, prefs, history, pycore, utils", "from rope.base.resourceobserver import *", "from rope.base.resources import File, Folder, _Resourc...
"""Base rope package This package contains rope core modules that are used by other modules and packages. """ __all__ = ['project', 'libutils', 'exceptions']
[ [ 8, 0, 0.4375, 0.75, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 1, 0.125, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "\"\"\"Base rope package\n\nThis package contains rope core modules that are used by other modules\nand packages.\n\n\"\"\"", "__all__ = ['project', 'libutils', 'exceptions']" ]
import rope.base.builtins import rope.base.codeanalyze import rope.base.pynames from rope.base import ast, exceptions, utils class Scope(object): def __init__(self, pycore, pyobject, parent_scope): self.pycore = pycore self.pyobject = pyobject self.parent = parent_scope def get_names...
[ [ 1, 0, 0.0032, 0.0032, 0, 0.66, 0, 74, 0, 1, 0, 0, 74, 0, 0 ], [ 1, 0, 0.0064, 0.0032, 0, 0.66, 0.1111, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.0096, 0.0032, 0, 0....
[ "import rope.base.builtins", "import rope.base.codeanalyze", "import rope.base.pynames", "from rope.base import ast, exceptions, utils", "class Scope(object):\n\n def __init__(self, pycore, pyobject, parent_scope):\n self.pycore = pycore\n self.pyobject = pyobject\n self.parent = par...
class Prefs(object): def __init__(self): self.prefs = {} self.callbacks = {} def set(self, key, value): """Set the value of `key` preference to `value`.""" if key in self.callbacks: self.callbacks[key](value) else: self.prefs[key] = value de...
[ [ 3, 0, 0.5122, 1, 0, 0.66, 0, 772, 0, 7, 0, 0, 186, 0, 5 ], [ 2, 1, 0.0976, 0.0732, 1, 0.55, 0, 555, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 2, 0.0976, 0.0244, 2, 0.13, 0...
[ "class Prefs(object):\n\n def __init__(self):\n self.prefs = {}\n self.callbacks = {}\n\n def set(self, key, value):\n \"\"\"Set the value of `key` preference to `value`.\"\"\"", " def __init__(self):\n self.prefs = {}\n self.callbacks = {}", " self.prefs = {}"...
import rope.base.change from rope.base import exceptions, evaluate, worder, codeanalyze from rope.refactor import functionutils, sourceutils, occurrences class IntroduceParameter(object): """Introduce parameter refactoring This refactoring adds a new parameter to a function and replaces references to an ...
[ [ 1, 0, 0.0105, 0.0105, 0, 0.66, 0, 682, 0, 1, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0211, 0.0105, 0, 0.66, 0.3333, 632, 0, 4, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0316, 0.0105, 0, ...
[ "import rope.base.change", "from rope.base import exceptions, evaluate, worder, codeanalyze", "from rope.refactor import functionutils, sourceutils, occurrences", "class IntroduceParameter(object):\n \"\"\"Introduce parameter refactoring\n\n This refactoring adds a new parameter to a function and replac...
from rope.base import (change, taskhandle, evaluate, exceptions, pyobjects, pynames, ast) from rope.refactor import restructure, sourceutils, similarfinder, importutils class UseFunction(object): """Try to use a function wherever possible""" def __init__(self, project, resource, offset...
[ [ 1, 0, 0.0088, 0.0117, 0, 0.66, 0, 632, 0, 7, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0175, 0.0058, 0, 0.66, 0.1429, 545, 0, 4, 0, 0, 545, 0, 0 ], [ 3, 0, 0.3713, 0.6784, 0, ...
[ "from rope.base import (change, taskhandle, evaluate,\n exceptions, pyobjects, pynames, ast)", "from rope.refactor import restructure, sourceutils, similarfinder, importutils", "class UseFunction(object):\n \"\"\"Try to use a function wherever possible\"\"\"\n\n def __init__(self, pr...
import re from rope.base import ast, codeanalyze from rope.base.change import ChangeSet, ChangeContents from rope.base.exceptions import RefactoringError from rope.refactor import (sourceutils, similarfinder, patchedast, suites, usefunction) # Extract refactoring has lots of special cases....
[ [ 1, 0, 0.0013, 0.0013, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0038, 0.0013, 0, 0.66, 0.0476, 632, 0, 2, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0051, 0.0013, 0, ...
[ "import re", "from rope.base import ast, codeanalyze", "from rope.base.change import ChangeSet, ChangeContents", "from rope.base.exceptions import RefactoringError", "from rope.refactor import (sourceutils, similarfinder,\n patchedast, suites, usefunction)", "class _ExtractRefact...
import collections import re import warnings from rope.base import ast, codeanalyze, exceptions def get_patched_ast(source, sorted_children=False): """Adds ``region`` and ``sorted_children`` fields to nodes Adds ``sorted_children`` field only if `sorted_children` is True. """ return patch_ast(ast.p...
[ [ 1, 0, 0.0014, 0.0014, 0, 0.66, 0, 193, 0, 1, 0, 0, 193, 0, 0 ], [ 1, 0, 0.0027, 0.0014, 0, 0.66, 0.1, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0041, 0.0014, 0, 0.6...
[ "import collections", "import re", "import warnings", "from rope.base import ast, codeanalyze, exceptions", "def get_patched_ast(source, sorted_children=False):\n \"\"\"Adds ``region`` and ``sorted_children`` fields to nodes\n\n Adds ``sorted_children`` field only if `sorted_children` is True.\n\n ...
import warnings from rope.base import exceptions, pyobjects, pynames, taskhandle, evaluate, worder, codeanalyze from rope.base.change import ChangeSet, ChangeContents, MoveResource from rope.refactor import occurrences, sourceutils class Rename(object): """A class for performing rename refactoring It can re...
[ [ 1, 0, 0.0046, 0.0046, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0139, 0.0046, 0, 0.66, 0.1429, 632, 0, 7, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0185, 0.0046, 0, ...
[ "import warnings", "from rope.base import exceptions, pyobjects, pynames, taskhandle, evaluate, worder, codeanalyze", "from rope.base.change import ChangeSet, ChangeContents, MoveResource", "from rope.refactor import occurrences, sourceutils", "class Rename(object):\n \"\"\"A class for performing rename ...
from rope.base import ast def find_visible(node, lines): """Return the line which is visible from all `lines`""" root = ast_suite_tree(node) return find_visible_for_suite(root, lines) def find_visible_for_suite(root, lines): if len(lines) == 1: return lines[0] line1 = lines[0] line2 ...
[ [ 1, 0, 0.007, 0.007, 0, 0.66, 0, 632, 0, 1, 0, 0, 632, 0, 0 ], [ 2, 0, 0.0387, 0.0282, 0, 0.66, 0.2, 75, 0, 2, 1, 0, 0, 0, 2 ], [ 8, 1, 0.0352, 0.007, 1, 0.19, ...
[ "from rope.base import ast", "def find_visible(node, lines):\n \"\"\"Return the line which is visible from all `lines`\"\"\"\n root = ast_suite_tree(node)\n return find_visible_for_suite(root, lines)", " \"\"\"Return the line which is visible from all `lines`\"\"\"", " root = ast_suite_tree(nod...
"""This module can be used for finding similar code""" import re import rope.refactor.wildcards from rope.base import codeanalyze, evaluate, exceptions, ast, builtins from rope.refactor import (patchedast, sourceutils, occurrences, wildcards, importutils) class BadNameInCheckError(exceptio...
[ [ 8, 0, 0.0028, 0.0028, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0055, 0.0028, 0, 0.66, 0.0667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.011, 0.0028, 0, 0.66,...
[ "\"\"\"This module can be used for finding similar code\"\"\"", "import re", "import rope.refactor.wildcards", "from rope.base import codeanalyze, evaluate, exceptions, ast, builtins", "from rope.refactor import (patchedast, sourceutils, occurrences,\n wildcards, importutils)", "...
from rope.base import ast, evaluate, builtins, pyobjects from rope.refactor import patchedast, occurrences class Wildcard(object): def get_name(self): """Return the name of this wildcard""" def matches(self, suspect, arg): """Return `True` if `suspect` matches this wildcard""" class Suspec...
[ [ 1, 0, 0.0057, 0.0057, 0, 0.66, 0, 632, 0, 4, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0114, 0.0057, 0, 0.66, 0.1667, 545, 0, 2, 0, 0, 545, 0, 0 ], [ 3, 0, 0.0455, 0.0398, 0, ...
[ "from rope.base import ast, evaluate, builtins, pyobjects", "from rope.refactor import patchedast, occurrences", "class Wildcard(object):\n\n def get_name(self):\n \"\"\"Return the name of this wildcard\"\"\"\n\n def matches(self, suspect, arg):\n \"\"\"Return `True` if `suspect` matches thi...
import copy import rope.base.exceptions from rope.base import pyobjects, taskhandle, evaluate, worder, codeanalyze, utils from rope.base.change import ChangeContents, ChangeSet from rope.refactor import occurrences, functionutils class ChangeSignature(object): def __init__(self, project, resource, offset): ...
[ [ 1, 0, 0.0029, 0.0029, 0, 0.66, 0, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.0088, 0.0029, 0, 0.66, 0.0714, 296, 0, 1, 0, 0, 296, 0, 0 ], [ 1, 0, 0.0117, 0.0029, 0, ...
[ "import copy", "import rope.base.exceptions", "from rope.base import pyobjects, taskhandle, evaluate, worder, codeanalyze, utils", "from rope.base.change import ChangeContents, ChangeSet", "from rope.refactor import occurrences, functionutils", "class ChangeSignature(object):\n\n def __init__(self, pro...
from rope.base import pynames, evaluate, exceptions, worder from rope.refactor.rename import Rename class LocalToField(object): def __init__(self, project, resource, offset): self.project = project self.pycore = project.pycore self.resource = resource self.offset = offset def...
[ [ 1, 0, 0.02, 0.02, 0, 0.66, 0, 632, 0, 4, 0, 0, 632, 0, 0 ], [ 1, 0, 0.04, 0.02, 0, 0.66, 0.5, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 3, 0, 0.55, 0.92, 0, 0.66, 1, ...
[ "from rope.base import pynames, evaluate, exceptions, worder", "from rope.refactor.rename import Rename", "class LocalToField(object):\n\n def __init__(self, project, resource, offset):\n self.project = project\n self.pycore = project.pycore\n self.resource = resource\n self.offse...
import rope.base.pynames from rope.base import ast, utils from rope.refactor.importutils import importinfo from rope.refactor.importutils import actions class ModuleImports(object): def __init__(self, pycore, pymodule, import_filter=None): self.pycore = pycore self.pymodule = pymodule sel...
[ [ 1, 0, 0.0022, 0.0022, 0, 0.66, 0, 903, 0, 1, 0, 0, 903, 0, 0 ], [ 1, 0, 0.0044, 0.0022, 0, 0.66, 0.1111, 632, 0, 2, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0066, 0.0022, 0, ...
[ "import rope.base.pynames", "from rope.base import ast, utils", "from rope.refactor.importutils import importinfo", "from rope.refactor.importutils import actions", "class ModuleImports(object):\n\n def __init__(self, pycore, pymodule, import_filter=None):\n self.pycore = pycore\n self.pymo...
"""A package for handling imports This package provides tools for modifying module imports after refactorings or as a separate task. """ import rope.base.evaluate from rope.base.change import ChangeSet, ChangeContents from rope.refactor import occurrences, rename from rope.refactor.importutils import module_imports, ...
[ [ 8, 0, 0.0117, 0.0201, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0234, 0.0033, 0, 0.66, 0.0909, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0268, 0.0033, 0, 0.66...
[ "\"\"\"A package for handling imports\n\nThis package provides tools for modifying module imports after\nrefactorings or as a separate task.\n\n\"\"\"", "import rope.base.evaluate", "from rope.base.change import ChangeSet, ChangeContents", "from rope.refactor import occurrences, rename", "from rope.refactor...
class ImportStatement(object): """Represent an import in a module `readonly` attribute controls whether this import can be changed by import actions or not. """ def __init__(self, import_info, start_line, end_line, main_statement=None, blank_lines=0): self.start_line = st...
[ [ 3, 0, 0.1418, 0.2786, 0, 0.66, 0, 919, 0, 10, 0, 0, 186, 0, 4 ], [ 8, 1, 0.0224, 0.0299, 1, 0.65, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.0697, 0.0547, 1, 0.65, ...
[ "class ImportStatement(object):\n \"\"\"Represent an import in a module\n\n `readonly` attribute controls whether this import can be changed\n by import actions or not.\n\n \"\"\"", " \"\"\"Represent an import in a module\n\n `readonly` attribute controls whether this import can be changed\n ...
import os import sys from rope.base import pyobjects, exceptions, stdmods from rope.refactor import occurrences from rope.refactor.importutils import importinfo class ImportInfoVisitor(object): def dispatch(self, import_): try: method_name = 'visit' + import_.import_info.__class__.__name__ ...
[ [ 1, 0, 0.0028, 0.0028, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0056, 0.0028, 0, 0.66, 0.0667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0111, 0.0028, 0, ...
[ "import os", "import sys", "from rope.base import pyobjects, exceptions, stdmods", "from rope.refactor import occurrences", "from rope.refactor.importutils import importinfo", "class ImportInfoVisitor(object):\n\n def dispatch(self, import_):\n try:\n method_name = 'visit' + import_.i...
from rope.base import pynames, taskhandle, evaluate, exceptions, worder, utils from rope.base.change import ChangeSet, ChangeContents from rope.refactor import sourceutils, occurrences class EncapsulateField(object): def __init__(self, project, resource, offset): self.pycore = project.pycore self...
[ [ 1, 0, 0.005, 0.005, 0, 0.66, 0, 632, 0, 6, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0099, 0.005, 0, 0.66, 0.2, 682, 0, 2, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0149, 0.005, 0, 0.66, ...
[ "from rope.base import pynames, taskhandle, evaluate, exceptions, worder, utils", "from rope.base.change import ChangeSet, ChangeContents", "from rope.refactor import sourceutils, occurrences", "class EncapsulateField(object):\n\n def __init__(self, project, resource, offset):\n self.pycore = projec...
import rope.base.exceptions import rope.base.pyobjects from rope.base.builtins import Lambda from rope.base import worder class DefinitionInfo(object): def __init__(self, function_name, is_method, args_with_defaults, args_arg, keywords_arg): self.function_name = function_name sel...
[ [ 1, 0, 0.0045, 0.0045, 0, 0.66, 0, 296, 0, 1, 0, 0, 296, 0, 0 ], [ 1, 0, 0.009, 0.0045, 0, 0.66, 0.1429, 626, 0, 1, 0, 0, 626, 0, 0 ], [ 1, 0, 0.0135, 0.0045, 0, 0...
[ "import rope.base.exceptions", "import rope.base.pyobjects", "from rope.base.builtins import Lambda", "from rope.base import worder", "class DefinitionInfo(object):\n\n def __init__(self, function_name, is_method, args_with_defaults,\n args_arg, keywords_arg):\n self.function_name ...
import rope.refactor.importutils from rope.base.change import ChangeSet, ChangeContents, MoveResource, CreateFolder class ModuleToPackage(object): def __init__(self, project, resource): self.project = project self.pycore = project.pycore self.resource = resource def get_changes(self)...
[ [ 1, 0, 0.0312, 0.0312, 0, 0.66, 0, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0625, 0.0312, 0, 0.66, 0.5, 682, 0, 4, 0, 0, 682, 0, 0 ], [ 3, 0, 0.5781, 0.875, 0, 0.66...
[ "import rope.refactor.importutils", "from rope.base.change import ChangeSet, ChangeContents, MoveResource, CreateFolder", "class ModuleToPackage(object):\n\n def __init__(self, project, resource):\n self.project = project\n self.pycore = project.pycore\n self.resource = resource\n\n d...
import warnings from rope.base import pyobjects, exceptions, change, evaluate, codeanalyze from rope.refactor import sourceutils, occurrences, rename class MethodObject(object): def __init__(self, project, resource, offset): self.pycore = project.pycore this_pymodule = self.pycore.resource_to_py...
[ [ 1, 0, 0.0115, 0.0115, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0345, 0.0115, 0, 0.66, 0.3333, 632, 0, 5, 0, 0, 632, 0, 0 ], [ 1, 0, 0.046, 0.0115, 0, 0...
[ "import warnings", "from rope.base import pyobjects, exceptions, change, evaluate, codeanalyze", "from rope.refactor import sourceutils, occurrences, rename", "class MethodObject(object):\n\n def __init__(self, project, resource, offset):\n self.pycore = project.pycore\n this_pymodule = self....
from rope.base import ast, codeanalyze def get_indents(lines, lineno): return codeanalyze.count_line_indents(lines.get_line(lineno)) def find_minimum_indents(source_code): result = 80 lines = source_code.split('\n') for line in lines: if line.strip() == '': continue resul...
[ [ 1, 0, 0.0109, 0.0109, 0, 0.66, 0, 632, 0, 2, 0, 0, 632, 0, 0 ], [ 2, 0, 0.0489, 0.0217, 0, 0.66, 0.125, 895, 0, 2, 1, 0, 0, 0, 2 ], [ 13, 1, 0.0543, 0.0109, 1, 0....
[ "from rope.base import ast, codeanalyze", "def get_indents(lines, lineno):\n return codeanalyze.count_line_indents(lines.get_line(lineno))", " return codeanalyze.count_line_indents(lines.get_line(lineno))", "def find_minimum_indents(source_code):\n result = 80\n lines = source_code.split('\\n')\n ...
import re import rope.base.pynames from rope.base import pynames, pyobjects, codeanalyze, evaluate, exceptions, utils, worder class Finder(object): """For finding occurrences of a name The constructor takes a `filters` argument. It should be a list of functions that take a single argument. For each po...
[ [ 1, 0, 0.003, 0.003, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.009, 0.003, 0, 0.66, 0.0714, 903, 0, 1, 0, 0, 903, 0, 0 ], [ 1, 0, 0.012, 0.003, 0, 0.66, ...
[ "import re", "import rope.base.pynames", "from rope.base import pynames, pyobjects, codeanalyze, evaluate, exceptions, utils, worder", "class Finder(object):\n \"\"\"For finding occurrences of a name\n\n The constructor takes a `filters` argument. It should be a list\n of functions that take a singl...
"""A module containing classes for move refactoring `create_move()` is a factory for creating move refactoring objects based on inputs. """ from rope.base import pyobjects, codeanalyze, exceptions, pynames, taskhandle, evaluate, worder from rope.base.change import ChangeSet, ChangeContents, MoveResource from rope.ref...
[ [ 8, 0, 0.0056, 0.0095, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0111, 0.0016, 0, 0.66, 0.0769, 632, 0, 7, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0127, 0.0016, 0, 0.66...
[ "\"\"\"A module containing classes for move refactoring\n\n`create_move()` is a factory for creating move refactoring objects\nbased on inputs.\n\n\"\"\"", "from rope.base import pyobjects, codeanalyze, exceptions, pynames, taskhandle, evaluate, worder", "from rope.base.change import ChangeSet, ChangeContents, ...
import rope.base.exceptions import rope.base.pyobjects from rope.base import taskhandle, evaluate from rope.base.change import (ChangeSet, ChangeContents) from rope.refactor import rename, occurrences, sourceutils, importutils class IntroduceFactory(object): def __init__(self, project, resource, offset): ...
[ [ 1, 0, 0.0075, 0.0075, 0, 0.66, 0, 296, 0, 1, 0, 0, 296, 0, 0 ], [ 1, 0, 0.015, 0.0075, 0, 0.66, 0.1667, 626, 0, 1, 0, 0, 626, 0, 0 ], [ 1, 0, 0.0226, 0.0075, 0, 0...
[ "import rope.base.exceptions", "import rope.base.pyobjects", "from rope.base import taskhandle, evaluate", "from rope.base.change import (ChangeSet, ChangeContents)", "from rope.refactor import rename, occurrences, sourceutils, importutils", "class IntroduceFactory(object):\n\n def __init__(self, proje...
"""rope refactor package This package contains modules that perform python refactorings. Refactoring classes perform refactorings in 4 steps: 1. Collect some data for performing the refactoring and use them to construct a refactoring class. Like:: renamer = Rename(project, resource, offset) 2. Some refacto...
[ [ 8, 0, 0.4364, 0.8545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.8727, 0.0182, 0, 0.66, 0.3333, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.8909, 0.0182, 0, 0.66...
[ "\"\"\"rope refactor package\n\nThis package contains modules that perform python refactorings.\nRefactoring classes perform refactorings in 4 steps:\n\n1. Collect some data for performing the refactoring and use them\n to construct a refactoring class. Like::", "from rope.refactor.importutils import ImportOrg...
"""This module can be used for performing cross-project refactorings See the "cross-project refactorings" section of ``docs/library.txt`` file. """ from rope.base import resources, project, libutils class MultiProjectRefactoring(object): def __init__(self, refactoring, projects, addpath=True): """Crea...
[ [ 8, 0, 0.0449, 0.0769, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1026, 0.0128, 0, 0.66, 0.25, 632, 0, 3, 0, 0, 632, 0, 0 ], [ 3, 0, 0.2372, 0.2051, 0, 0.66, ...
[ "\"\"\"This module can be used for performing cross-project refactorings\n\nSee the \"cross-project refactorings\" section of ``docs/library.txt``\nfile.\n\n\"\"\"", "from rope.base import resources, project, libutils", "class MultiProjectRefactoring(object):\n\n def __init__(self, refactoring, projects, add...
# Known Bugs when inlining a function/method # The values passed to function are inlined using _inlined_variable. # This may cause two problems, illustrated in the examples below # # def foo(var1): # var1 = var1*10 # return var1 # # If a call to foo(20) is inlined, the result of inlined function is 20, # but it...
[ [ 1, 0, 0.0309, 0.0016, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0341, 0.0016, 0, 0.66, 0.05, 296, 0, 1, 0, 0, 296, 0, 0 ], [ 1, 0, 0.0358, 0.0016, 0, 0....
[ "import re", "import rope.base.exceptions", "import rope.refactor.functionutils", "from rope.base import (pynames, pyobjects, codeanalyze,\n taskhandle, evaluate, worder, utils)", "from rope.base.change import ChangeSet, ChangeContents", "from rope.refactor import (occurrences, renam...
import warnings from rope.base import change, taskhandle, builtins, ast, codeanalyze from rope.refactor import patchedast, similarfinder, sourceutils from rope.refactor.importutils import module_imports class Restructure(object): """A class to perform python restructurings A restructuring transforms pieces ...
[ [ 1, 0, 0.0033, 0.0033, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0098, 0.0033, 0, 0.66, 0.1667, 632, 0, 5, 0, 0, 632, 0, 0 ], [ 1, 0, 0.013, 0.0033, 0, 0...
[ "import warnings", "from rope.base import change, taskhandle, builtins, ast, codeanalyze", "from rope.refactor import patchedast, similarfinder, sourceutils", "from rope.refactor.importutils import module_imports", "class Restructure(object):\n \"\"\"A class to perform python restructurings\n\n A rest...
import rope.base.evaluate from rope.base import change, pyobjects, exceptions, pynames, worder, codeanalyze from rope.refactor import sourceutils, importutils, functionutils, suites def create_generate(kind, project, resource, offset): """A factory for creating `Generate` objects `kind` can be 'variable', 'f...
[ [ 1, 0, 0.0028, 0.0028, 0, 0.66, 0, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0056, 0.0028, 0, 0.66, 0.0714, 632, 0, 6, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0085, 0.0028, 0, ...
[ "import rope.base.evaluate", "from rope.base import change, pyobjects, exceptions, pynames, worder, codeanalyze", "from rope.refactor import sourceutils, importutils, functionutils, suites", "def create_generate(kind, project, resource, offset):\n \"\"\"A factory for creating `Generate` objects\n\n `kin...
import re from rope.base import (exceptions, pynames, resourceobserver, taskhandle, pyobjects, builtins, resources) from rope.refactor import importutils class AutoImport(object): """A class for finding the module that provides a name This class maintains a cache of global names in py...
[ [ 1, 0, 0.0046, 0.0046, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0161, 0.0092, 0, 0.66, 0.25, 632, 0, 7, 0, 0, 632, 0, 0 ], [ 1, 0, 0.023, 0.0046, 0, 0.6...
[ "import re", "from rope.base import (exceptions, pynames, resourceobserver,\n taskhandle, pyobjects, builtins, resources)", "from rope.refactor import importutils", "class AutoImport(object):\n \"\"\"A class for finding the module that provides a name\n\n This class maintains a cac...
"""For performing many refactorings as a single command `changestack` module can be used to perform many refactorings on top of each other as one bigger command. It can be used like:: stack = ChangeStack(project, 'my big command') #.. stack.push(refactoring1.get_changes()) #.. stack.push(refactoring2.get_...
[ [ 8, 0, 0.1923, 0.3654, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4038, 0.0192, 0, 0.66, 0.5, 632, 0, 1, 0, 0, 632, 0, 0 ], [ 3, 0, 0.7308, 0.5577, 0, 0.66, ...
[ "\"\"\"For performing many refactorings as a single command\n\n`changestack` module can be used to perform many refactorings on top\nof each other as one bigger command. It can be used like::\n\n stack = ChangeStack(project, 'my big command')\n\n #..", "from rope.base import change", "class ChangeStack(objec...
import rope.base.codeanalyze import rope.base.evaluate import rope.base.pyobjects from rope.base import taskhandle, exceptions, worder from rope.contrib import fixsyntax from rope.refactor import occurrences def find_occurrences(project, resource, offset, unsure=False, resources=None, in_hierarch...
[ [ 1, 0, 0.0091, 0.0091, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.0182, 0.0091, 0, 0.66, 0.1, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0273, 0.0091, 0, 0.6...
[ "import rope.base.codeanalyze", "import rope.base.evaluate", "import rope.base.pyobjects", "from rope.base import taskhandle, exceptions, worder", "from rope.contrib import fixsyntax", "from rope.refactor import occurrences", "def find_occurrences(project, resource, offset, unsure=False, resources=None,...
"""rope IDE tools package This package contains modules that can be used in IDEs but do not depend on the UI. So these modules will be used by `rope.ui` modules. """
[ [ 8, 0, 0.5714, 1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"rope IDE tools package\n\nThis package contains modules that can be used in IDEs\nbut do not depend on the UI. So these modules will be used\nby `rope.ui` modules.\n\n\"\"\"" ]
"""Fix the name of modules This module is useful when you want to rename many of the modules in your project. That can happen specially when you want to change their naming style. For instance:: fixer = FixModuleNames(project) changes = fixer.get_changes(fixer=str.lower) project.do(changes) Here it renames a...
[ [ 8, 0, 0.1304, 0.2464, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2609, 0.0145, 0, 0.66, 0.25, 632, 0, 2, 0, 0, 632, 0, 0 ], [ 1, 0, 0.2754, 0.0145, 0, 0.66, ...
[ "\"\"\"Fix the name of modules\n\nThis module is useful when you want to rename many of the modules in\nyour project. That can happen specially when you want to change their\nnaming style.\n\nFor instance::", "from rope.base import change, taskhandle", "from rope.contrib import changestack", "from rope.refac...
"""Finding bad name and attribute accesses `find_errors` function can be used to find possible bad name and attribute accesses. As an example:: errors = find_errors(project, project.get_resource('mod.py')) for error in errors: print '%s: %s' % (error.lineno, error.error) prints possible errors for ``mod.p...
[ [ 8, 0, 0.1429, 0.2747, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2857, 0.011, 0, 0.66, 0.25, 632, 0, 3, 0, 0, 632, 0, 0 ], [ 2, 0, 0.3626, 0.0989, 0, 0.66, ...
[ "\"\"\"Finding bad name and attribute accesses\n\n`find_errors` function can be used to find possible bad name and\nattribute accesses. As an example::\n\n errors = find_errors(project, project.get_resource('mod.py'))\n for error in errors:\n print '%s: %s' % (error.lineno, error.error)", "from rope.base ...
"""rope, a python refactoring library""" INFO = __doc__ VERSION = '0.9.4' COPYRIGHT = """\ Copyright (C) 2006-2012 Ali Gholami Rudi Copyright (C) 2009-2012 Anton Gritsay This program is free software; you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Softw...
[ [ 8, 0, 0.0588, 0.0588, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1765, 0.0588, 0, 0.66, 0.3333, 948, 2, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2353, 0.0588, 0, 0.66...
[ "\"\"\"rope, a python refactoring library\"\"\"", "INFO = __doc__", "VERSION = '0.9.4'", "COPYRIGHT = \"\"\"\\\nCopyright (C) 2006-2012 Ali Gholami Rudi\nCopyright (C) 2009-2012 Anton Gritsay\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of GNU General Public Lice...
from spyderlib.qt.QtGui import (QApplication, QMainWindow, QWidget, QLabel, QLineEdit, QHBoxLayout, QDockWidget, QFont) from spyderlib.qt.QtCore import Qt from spyderlib.widgets.internalshell import InternalShell class MyWidget(QWidget): def __init__(self): QWid...
[ [ 1, 0, 0.0347, 0.0278, 0, 0.66, 0, 314, 0, 8, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0556, 0.0139, 0, 0.66, 0.1667, 529, 0, 1, 0, 0, 529, 0, 0 ], [ 1, 0, 0.0833, 0.0139, 0, ...
[ "from spyderlib.qt.QtGui import (QApplication, QMainWindow, QWidget, QLabel,\n QLineEdit, QHBoxLayout, QDockWidget, QFont)", "from spyderlib.qt.QtCore import Qt", "from spyderlib.widgets.internalshell import InternalShell", "class MyWidget(QWidget):\n def __init__(self):\n ...
# -*- coding:utf-8 -*- # # Copyright © 2011 Santiago Jaramillo # based on p_pylint.py by Pierre Raybaut # # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Profiler Plugin""" from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QLabel from spyderlib.qt.QtCore import SIGNAL, ...
[ [ 8, 0, 0.0638, 0.0071, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.078, 0.0071, 0, 0.66, 0.1, 314, 0, 3, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0851, 0.0071, 0, 0.66, ...
[ "\"\"\"Profiler Plugin\"\"\"", "from spyderlib.qt.QtGui import QVBoxLayout, QGroupBox, QLabel", "from spyderlib.qt.QtCore import SIGNAL, Qt", "from spyderlib.baseconfig import get_translation", "_ = get_translation(\"p_profiler\", dirname=\"spyderplugins\")", "from spyderlib.utils.qthelpers import get_ico...
# -*- coding: utf-8 -*- # # Copyright © 2011 Santiago Jaramillo # based on pylintgui.py by Pierre Raybaut # # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Profiler widget See the official documentation on python profiling: http://docs.python.org/library/profile.html Quest...
[ [ 8, 0, 0.0243, 0.0168, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0355, 0.0019, 0, 0.66, 0.0476, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0411, 0.0056, 0, 0.66...
[ "\"\"\"\nProfiler widget\n\nSee the official documentation on python profiling:\nhttp://docs.python.org/library/profile.html\n\nQuestions for Pierre and others:\n - Where in the menu should profiler go? Run > Profile code ?", "from __future__ import with_statement", "from spyderlib.qt.QtGui import (QHBoxLay...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Pylint widget""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from __future__ import with_stateme...
[ [ 8, 0, 0.0155, 0.0022, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.031, 0.0022, 0, 0.66, 0.0435, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0366, 0.0044, 0, 0.66,...
[ "\"\"\"Pylint widget\"\"\"", "from __future__ import with_statement", "from spyderlib.qt.QtGui import (QHBoxLayout, QWidget, QTreeWidgetItem,\n QMessageBox, QVBoxLayout, QLabel)", "from spyderlib.qt.QtCore import SIGNAL, QProcess, QByteArray, QTextCodec", "locale_codec = QText...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ spyderlib.widgets ================= Widgets defined in this module may be used in any other Qt-based application They are also used in Spyder throug...
[ [ 8, 0, 0.7333, 0.6, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\nspyderlib.widgets\n=================\n\nWidgets defined in this module may be used in any other Qt-based application\n\nThey are also used in Spyder through the Plugin interface\n(see spyderlib.plugins)" ]
# -*- coding: utf-8 -*- # # Copyright © 2012 Jed Ludlow # based loosley on pylintgui.py by Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Breakpoint widget""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disabl...
[ [ 8, 0, 0.0359, 0.0045, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0673, 0.0045, 0, 0.66, 0.0588, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0785, 0.009, 0, 0.66,...
[ "\"\"\"Breakpoint widget\"\"\"", "from __future__ import with_statement", "from spyderlib.qt.QtGui import (QWidget, QTableView, QItemDelegate,\n QVBoxLayout, QMenu)", "from spyderlib.qt.QtCore import (Qt, SIGNAL, QTextCodec,\n QModelIndex, QAbstra...
# -*- coding:utf-8 -*- # # Copyright © 2009-2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Pylint Code Analysis Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtGu...
[ [ 8, 0, 0.0405, 0.0058, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0809, 0.0058, 0, 0.66, 0.1, 314, 0, 4, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0867, 0.0058, 0, 0.66, ...
[ "\"\"\"Pylint Code Analysis Plugin\"\"\"", "from spyderlib.qt.QtGui import QInputDialog, QVBoxLayout, QGroupBox, QLabel", "from spyderlib.qt.QtCore import SIGNAL, Qt", "from spyderlib.baseconfig import get_translation", "_ = get_translation(\"p_pylint\", dirname=\"spyderplugins\")", "from spyderlib.utils....
# -*- coding:utf-8 -*- # # Copyright © 2012 Jed Ludlow # Based loosely on p_pylint.py by Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Breakpoint Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=...
[ [ 8, 0, 0.065, 0.0081, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.122, 0.0081, 0, 0.66, 0.125, 529, 0, 1, 0, 0, 529, 0, 0 ], [ 1, 0, 0.1463, 0.0081, 0, 0.66, ...
[ "\"\"\"Breakpoint Plugin\"\"\"", "from spyderlib.qt.QtCore import SIGNAL", "from spyderlib.baseconfig import get_translation", "_ = get_translation(\"p_breakpoints\", dirname=\"spyderplugins\")", "from spyderlib.utils.qthelpers import get_icon, create_action", "from spyderlib.plugins import SpyderPluginMi...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Spyder ====== The Scientific PYthon Development EnviRonment """ from distutils.core import setup from distutils.command.build import build from distutils.comman...
[ [ 8, 0, 0.0562, 0.0355, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0828, 0.0059, 0, 0.66, 0.0385, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.0888, 0.0059, 0, 0.66...
[ "\"\"\"\nSpyder\n======\n\nThe Scientific PYthon Development EnviRonment\n\"\"\"", "from distutils.core import setup", "from distutils.command.build import build", "from distutils.command.install_data import install_data", "import os", "import os.path as osp", "import subprocess", "import sys", "fro...
# -*- coding: utf-8 -*- # # Copyright © 2012 The Spyder development team # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Create a stand-alone Mac OS X app using py2app To be used like this: $ python create_app.py py2app """ from setuptools import setup from distutils.sysc...
[ [ 8, 0, 0.0473, 0.0299, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0697, 0.005, 0, 0.66, 0.0213, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0796, 0.005, 0, 0.66, ...
[ "\"\"\"\nCreate a stand-alone Mac OS X app using py2app\n\nTo be used like this:\n$ python create_app.py py2app\n\"\"\"", "from setuptools import setup", "from distutils.sysconfig import get_python_lib", "import fileinput", "import inspect", "import shutil", "import os", "import os.path as osp", "im...
#!/usr/bin/env python from spyderlib import start_app start_app.main()
[ [ 1, 0, 0.6667, 0.3333, 0, 0.66, 0, 498, 0, 1, 0, 0, 498, 0, 0 ], [ 8, 0, 1, 0.3333, 0, 0.66, 1, 624, 3, 0, 0, 0, 0, 0, 1 ] ]
[ "from spyderlib import start_app", "start_app.main()" ]
# postinstall script for Spyder """Create Spyder start menu entries""" import os import sys import os.path as osp import struct import _winreg as winreg EWS = "Edit with Spyder" KEY_C = r"Software\Classes\%s" KEY_C0 = KEY_C % r"Python.%sFile\shell\%s" KEY_C1 = KEY_C0 + r"\command" def install(): """Function exec...
[ [ 8, 0, 0.0233, 0.0116, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0465, 0.0116, 0, 0.66, 0.0833, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0581, 0.0116, 0, 0.66...
[ "\"\"\"Create Spyder start menu entries\"\"\"", "import os", "import sys", "import os.path as osp", "import struct", "import _winreg as winreg", "EWS = \"Edit with Spyder\"", "KEY_C = r\"Software\\Classes\\%s\"", "KEY_C0 = KEY_C % r\"Python.%sFile\\shell\\%s\"", "KEY_C1 = KEY_C0 + r\"\\command\"",...
import numpy numpy.
[ [ 1, 0, 1, 1, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ] ]
[ "import numpy" ]
import numpy numpy.linspace
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 8, 0, 1, 0.5, 0, 0.66, 1, 0, 7, 0, 0, 0, 0, 0, 0 ] ]
[ "import numpy", "numpy.linspace" ]
# -*- coding: utf-8 -*- """ Created on Wed Feb 23 15:44:03 2011 @author: Pierre Raybaut """ import time, os.path as osp import rope.base.project import rope.base.libutils import rope.contrib.codeassist ROPE_PREFS = { 'ignore_syntax_errors': True, 'ignore_bad_imports': Tr...
[ [ 8, 0, 0.0381, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0762, 0.0095, 0, 0.66, 0.0714, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0952, 0.0095, 0, 0.66...
[ "\"\"\"\nCreated on Wed Feb 23 15:44:03 2011\n\n@author: Pierre Raybaut\n\"\"\"", "import time, os.path as osp", "import rope.base.project", "import rope.base.libutils", "import rope.contrib.codeassist", "ROPE_PREFS = {\n 'ignore_syntax_errors': True,\n 'ignore_bad_imports': Tr...
# -*- test-case-name: pyflakes -*- # (c) 2005-2010 Divmod, Inc. # See LICENSE file for details import __builtin__ import os.path import _ast from pyflakes import messages # utility function to iterate over an AST node's children, adapted # from Python 2.6's standard ast module try: import ast iter_child_nod...
[ [ 1, 0, 0.008, 0.0016, 0, 0.66, 0, 364, 0, 1, 0, 0, 364, 0, 0 ], [ 1, 0, 0.0096, 0.0016, 0, 0.66, 0.0588, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0112, 0.0016, 0, 0.6...
[ "import __builtin__", "import os.path", "import _ast", "from pyflakes import messages", "try:\n import ast\n iter_child_nodes = ast.iter_child_nodes\nexcept (ImportError, AttributeError):\n def iter_child_nodes(node, astcls=_ast.AST):\n \"\"\"\n Yield all direct child nodes of *node*,...
# (c) 2005 Divmod, Inc. See LICENSE file for details class Message(object): message = '' message_args = () def __init__(self, filename, lineno): self.filename = filename self.lineno = lineno def __str__(self): return '%s:%s: %s' % (self.filename, self.lineno, self.message % sel...
[ [ 3, 0, 0.0691, 0.0851, 0, 0.66, 0, 6, 0, 2, 0, 0, 186, 0, 0 ], [ 14, 1, 0.0426, 0.0106, 1, 0.06, 0, 635, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 1, 0.0532, 0.0106, 1, 0.06, ...
[ "class Message(object):\n message = ''\n message_args = ()\n def __init__(self, filename, lineno):\n self.filename = filename\n self.lineno = lineno\n def __str__(self):\n return '%s:%s: %s' % (self.filename, self.lineno, self.message % self.message_args)", " message = ''", "...
__version__ = '0.5.0'
[ [ 14, 0, 1, 0.5, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = '0.5.0'" ]
import textwrap import _ast from twisted.trial import unittest from pyflakes import checker class Test(unittest.TestCase): def flakes(self, input, *expectedOutputs, **kw): ast = compile(textwrap.dedent(input), "<test>", "exec", _ast.PyCF_ONLY_AST) w = checker.Checker(ast,...
[ [ 1, 0, 0.0741, 0.037, 0, 0.66, 0, 641, 0, 1, 0, 0, 641, 0, 0 ], [ 1, 0, 0.1111, 0.037, 0, 0.66, 0.25, 709, 0, 1, 0, 0, 709, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.66,...
[ "import textwrap", "import _ast", "from twisted.trial import unittest", "from pyflakes import checker", "class Test(unittest.TestCase):\n\n def flakes(self, input, *expectedOutputs, **kw):\n ast = compile(textwrap.dedent(input), \"<test>\", \"exec\",\n _ast.PyCF_ONLY_AST)\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Bootstrapping Spyder (Executing Spyder from source checkout) This script is a contribution from techtonik: http://code.google.com/p/spyderlib/issues/detail?id=741 """ # pylint: ...
[ [ 8, 0, 0.1099, 0.0769, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1868, 0.011, 0, 0.66, 0.0417, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1978, 0.011, 0, 0.66, ...
[ "\"\"\"\nBootstrapping Spyder\n(Executing Spyder from source checkout)\n\nThis script is a contribution from techtonik:\nhttp://code.google.com/p/spyderlib/issues/detail?id=741\n\"\"\"", "import os", "import sys", "import optparse", "parser = optparse.OptionParser(\n usage=\"python bootstrap.py [options]...
#!/usr/bin/python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006 Johann C. Rocholl <johann@rocholl.net> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Soft...
[ [ 8, 0, 0.0434, 0.0507, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0699, 0.0007, 0, 0.66, 0.0132, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0713, 0.0007, 0, 0.66,...
[ "\"\"\"\nCheck Python source code formatting, according to PEP 8:\nhttp://www.python.org/dev/peps/pep-0008/\n\nFor usage and a list of options, try this:\n$ python pep8.py -h\n\nThis program and its regression test suite live here:", "__version__ = '0.6.1'", "import os", "import sys", "import re", "import...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Shell Interpreter""" import sys import atexit import threading import ctypes import os import re import os.path as osp import pydoc from subproces...
[ [ 8, 0, 0.021, 0.003, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.027, 0.003, 0, 0.66, 0.0667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.03, 0.003, 0, 0.66, 0...
[ "\"\"\"Shell Interpreter\"\"\"", "import sys", "import atexit", "import threading", "import ctypes", "import os", "import re", "import os.path as osp", "import pydoc", "from subprocess import Popen, PIPE", "from code import InteractiveConsole", "from spyderlib.utils.dochelpers import isdefined...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Patching matplotlib's FigureManager""" import sys def is_available(): """Is Matplotlib installed version supported by this patch?""" import...
[ [ 8, 0, 0.0449, 0.0064, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0577, 0.0064, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.0962, 0.0449, 0, 0.66...
[ "\"\"\"Patching matplotlib's FigureManager\"\"\"", "import sys", "def is_available():\n \"\"\"Is Matplotlib installed version supported by this patch?\"\"\"\n import matplotlib\n mpl_ver = matplotlib.__version__.split('.')\n if int(mpl_ver[0]) < 1 or int(mpl_ver[0]) == 1 and int(mpl_ver[1]) == 0:\n ...
# -*- coding: utf-8 -*- # # Copyright © 2012 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) import os if os.environ['QT_API'] == 'pyqt': from PyQt4.QtSvg import * # analysis:ignore else: from PySide.QtSvg import * # analysis:ignore
[ [ 1, 0, 0.5833, 0.0833, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 4, 0, 0.875, 0.3333, 0, 0.66, 1, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 1, 0.8333, 0.0833, 1, 0.88, ...
[ "import os", "if os.environ['QT_API'] == 'pyqt':\n from PyQt4.QtSvg import * # analysis:ignore\nelse:\n from PySide.QtSvg import * # analysis:ignore", " from PyQt4.QtSvg import * # analysis:ignore", " from PySide.QtSvg import * # analysis:ignore" ]
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ spyderlib.qt.compat ------------------- Transitional module providing compatibility functions intended to help migrating from PyQt to PySide. This modu...
[ [ 8, 0, 0.061, 0.0585, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0976, 0.0049, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1024, 0.0049, 0, 0.66,...
[ "\"\"\"\nspyderlib.qt.compat\n-------------------\n\nTransitional module providing compatibility functions intended to help \nmigrating from PyQt to PySide.\n\nThis module should be fully compatible with:", "import os", "import sys", "from spyderlib.qt.QtGui import QFileDialog", "PYQT_API_1 = False", "if ...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) import os if os.environ['QT_API'] == 'pyqt': from PyQt4.QtWebKit import * # analysis:ignore else: from PySide.QtWebKit import * # analysis:ignore
[ [ 1, 0, 0.5833, 0.0833, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 4, 0, 0.875, 0.3333, 0, 0.66, 1, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 1, 0.8333, 0.0833, 1, 0.69, ...
[ "import os", "if os.environ['QT_API'] == 'pyqt':\n from PyQt4.QtWebKit import * # analysis:ignore\nelse:\n from PySide.QtWebKit import * # analysis:ignore", " from PyQt4.QtWebKit import * # analysis:ignore", " from PySide.QtWebKit import * # analysis:ignore" ]
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) import os if os.environ['QT_API'] == 'pyqt': from PyQt4.Qt import QKeySequence, QTextCursor # analysis:ignore from PyQt4.QtGui import * # analysis:ignore else: ...
[ [ 1, 0, 0.5385, 0.0769, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 4, 0, 0.8462, 0.3846, 0, 0.66, 1, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 1, 0.7692, 0.0769, 1, 0.08, ...
[ "import os", "if os.environ['QT_API'] == 'pyqt':\n from PyQt4.Qt import QKeySequence, QTextCursor # analysis:ignore\n from PyQt4.QtGui import * # analysis:ignore\nelse:\n from PySide.QtGui import * # analysis:ignore", " from PyQt4.Qt import QKeySequence, QTextCursor # analysis:ignore", " fr...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Transitional package (PyQt4 --> PySide)""" import os os.environ.setdefault('QT_API', 'pyqt') assert os.environ['QT_API'] in ('pyqt', 'pyside') API = os.environ['QT_A...
[ [ 8, 0, 0.14, 0.02, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.18, 0.02, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.22, 0.02, 0, 0.66, 0.3333...
[ "\"\"\"Transitional package (PyQt4 --> PySide)\"\"\"", "import os", "os.environ.setdefault('QT_API', 'pyqt')", "API = os.environ['QT_API']", "API_NAME = {'pyqt': 'PyQt4', 'pyside': 'PySide'}[API]", "if API == 'pyqt':\n # We do not force QString, QVariant, ... API to #1 or #2 anymore \n # as spyderli...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) import os if os.environ['QT_API'] == 'pyqt': from PyQt4.QtCore import * # analysis:ignore from PyQt4.Qt import QCoreApplication # analysis:ignore from PyQt4...
[ [ 1, 0, 0.35, 0.05, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 4, 0, 0.725, 0.6, 0, 0.66, 1, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 1, 0.5, 0.05, 1, 0.57, 0, 454, ...
[ "import os", "if os.environ['QT_API'] == 'pyqt':\n from PyQt4.QtCore import * # analysis:ignore\n from PyQt4.Qt import QCoreApplication # analysis:ignore\n from PyQt4.Qt import Qt # analysis:ignore\n from PyQt4.QtCore import pyqtSignal as Signal # analysis:ignore\n from PyQt4.QtCore import pyqt...
# -*- coding: utf-8 -*- # # Copyright © 2012 The Spyder development team # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) import optparse def get_options(): """ Convert options into commands return commands, message """ parser = optparse.OptionParser(usage="s...
[ [ 1, 0, 0.1458, 0.0208, 0, 0.66, 0, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 2, 0, 0.5938, 0.8333, 0, 0.66, 1, 420, 0, 0, 1, 0, 0, 0, 12 ], [ 8, 1, 0.2396, 0.0833, 1, 0.42, ...
[ "import optparse", "def get_options():\n \"\"\"\n Convert options into commands\n return commands, message\n \"\"\"\n parser = optparse.OptionParser(usage=\"spyder [options] files\")\n parser.add_option('-l', '--light', dest=\"light\", action='store_true',\n default=False,",...
# -*- coding: utf-8 -*- # # Copyright © 2009-2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Running programs utilities""" from distutils.version import LooseVersion import os import os.path as osp import sys import subprocess import imp imp...
[ [ 8, 0, 0.0307, 0.0044, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0395, 0.0044, 0, 0.66, 0.0526, 42, 0, 1, 0, 0, 42, 0, 0 ], [ 1, 0, 0.0439, 0.0044, 0, 0.66, ...
[ "\"\"\"Running programs utilities\"\"\"", "from distutils.version import LooseVersion", "import os", "import os.path as osp", "import sys", "import subprocess", "import imp", "import re", "def is_program_installed(basename):\n \"\"\"Return program absolute path if installed in PATH\n Otherwise...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Text encoding utilities, text file I/O Functions 'get_coding', 'decode', 'encode' and 'to_unicode' come from Eric4 source code (Utilities/__init___.py)...
[ [ 8, 0, 0.0432, 0.0273, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0636, 0.0045, 0, 0.66, 0.0455, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0727, 0.0045, 0, 0.66...
[ "\"\"\"\nText encoding utilities, text file I/O\n\nFunctions 'get_coding', 'decode', 'encode' and 'to_unicode' come from Eric4\nsource code (Utilities/__init___.py) Copyright © 2003-2009 Detlev Offenbach\n\"\"\"", "from __future__ import with_statement", "import re", "import os", "import locale", "import ...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Utilities and wrappers around inspect module""" import inspect import re # Local imports: from spyderlib.utils import encoding SYMBOLS = r"[^\'\"a...
[ [ 8, 0, 0.0237, 0.0034, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0305, 0.0034, 0, 0.66, 0.0667, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0339, 0.0034, 0, 0.66...
[ "\"\"\"Utilities and wrappers around inspect module\"\"\"", "import inspect", "import re", "from spyderlib.utils import encoding", "SYMBOLS = r\"[^\\'\\\"a-zA-Z0-9_.]\"", "def getobj(txt, last=False):\n \"\"\"Return the last valid object name in string\"\"\"\n txt_end = \"\"\n for startchar, endc...
# -*- coding: utf-8 -*- # # Copyright © 2012 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Windows-specific utilities""" set_attached_console_visible = None is_attached_console_visible = None try: import win32gui, win32console, win32con ...
[ [ 8, 0, 0.2414, 0.0345, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3103, 0.0345, 0, 0.66, 0.3333, 880, 1, 0, 0, 0, 0, 9, 0 ], [ 14, 0, 0.3448, 0.0345, 0, 0.66...
[ "\"\"\"Windows-specific utilities\"\"\"", "set_attached_console_visible = None", "is_attached_console_visible = None", "try:\n import win32gui, win32console, win32con\n win32console.GetConsoleWindow() # do nothing, this is just a test\n def set_attached_console_visible(state):\n \"\"\"Show/hid...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Utilities for version control systems""" import os.path as osp import subprocess # Local imports from spyderlib.baseconfig import _ from spyderlib.utils import progra...
[ [ 8, 0, 0.068, 0.0097, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0874, 0.0097, 0, 0.66, 0.0769, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0971, 0.0097, 0, 0.66, ...
[ "\"\"\"Utilities for version control systems\"\"\"", "import os.path as osp", "import subprocess", "from spyderlib.baseconfig import _", "from spyderlib.utils import programs", "from spyderlib.utils.misc import abspardir", "VCS_INFOS = {\n '.hg': dict(name=\"Mercurial\",\n ...
# -*- coding: utf-8 -*- # # Copyright © 2009-2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Qt utilities""" from spyderlib.qt.QtGui import (QAction, QStyle, QWidget, QIcon, QApplication, QLabel, QVBoxLayout, QHBox...
[ [ 8, 0, 0.0167, 0.0024, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0251, 0.0095, 0, 0.66, 0.027, 314, 0, 14, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0322, 0.0048, 0, 0.66...
[ "\"\"\"Qt utilities\"\"\"", "from spyderlib.qt.QtGui import (QAction, QStyle, QWidget, QIcon, QApplication,\n QLabel, QVBoxLayout, QHBoxLayout, QLineEdit,\n QKeyEvent, QMenu, QKeySequence, QToolButton,\n QPixmap)", "fro...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Environment variable utilities """ from spyderlib.qt.QtGui import QDialog, QMessageBox import os # Local imports from spyderlib.baseconfig impor...
[ [ 8, 0, 0.0576, 0.0216, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0791, 0.0072, 0, 0.66, 0.0909, 314, 0, 2, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0935, 0.0072, 0, 0.66...
[ "\"\"\"\nEnvironment variable utilities\n\"\"\"", "from spyderlib.qt.QtGui import QDialog, QMessageBox", "import os", "from spyderlib.baseconfig import _", "from spyderlib.widgets.dicteditor import DictEditor", "def envdict2listdict(envdict):\n \"\"\"Dict --> Dict of lists\"\"\"\n sep = os.path.path...
# -*- coding: utf-8 -*- # # Copyright (C) 2009 Tim Dumol <tim@timdumol.com> # Copyright (C) 2013 The Spyder Development Team # Distributed under the terms of the BSD License """Sphinx conf file for the object inspector rich text mode""" # 3rd party imports from sphinx import __version__ as sphinx_version # Local imp...
[ [ 8, 0, 0.0609, 0.0087, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.087, 0.0087, 0, 0.66, 0.04, 522, 0, 1, 0, 0, 522, 0, 0 ], [ 1, 0, 0.113, 0.0087, 0, 0.66, ...
[ "\"\"\"Sphinx conf file for the object inspector rich text mode\"\"\"", "from sphinx import __version__ as sphinx_version", "from spyderlib.config import CONF", "math = CONF.get('inspector', 'math', '')", "if sphinx_version < \"1.1\" or not math:\n extensions = ['sphinx.ext.jsmath']\nelse:\n extension...
# -*- coding: utf-8 -*- # # Copyright © 2012 Spyder Development team # Licensed under the terms of the MIT or BSD Licenses # (See every file for its license) """ spyderlib.utils.inspector ======================== Configuration files for the object inspector rich text mode """ import sys from spyderlib...
[ [ 8, 0, 0.5938, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.875, 0.0625, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.9375, 0.0625, 0, 0.66, ...
[ "\"\"\"\nspyderlib.utils.inspector\n========================\n\nConfiguration files for the object inspector rich text mode\n\"\"\"", "import sys", "from spyderlib.baseconfig import get_module_source_path", "sys.path.insert(0, get_module_source_path(__name__))" ]
# -*- coding: utf-8 -* """ Process docstrings with Sphinx AUTHORS: - Tim Joseph Dumol (2009-09-29): initial version - The Spyder Development Team: Several changes to make it work with Spyder Copyright (C) 2009 Tim Dumol <tim@timdumol.com> Copyright (C) 2013 The Spyder Development Team Distributed under the terms of ...
[ [ 8, 0, 0.0415, 0.0622, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.083, 0.0041, 0, 0.66, 0.0455, 220, 0, 1, 0, 0, 220, 0, 0 ], [ 1, 0, 0.0871, 0.0041, 0, 0.66,...
[ "\"\"\"\nProcess docstrings with Sphinx\n\nAUTHORS:\n- Tim Joseph Dumol (2009-09-29): initial version\n- The Spyder Development Team: Several changes to make it work with Spyder\n\nCopyright (C) 2009 Tim Dumol <tim@timdumol.com>", "import codecs", "import os", "import os.path as osp", "import shutil", "im...
# -*- coding: utf-8 -*- """Module completion auxiliary functions""" #------------------------------------------------------------------------------ # # Most functions on this file were taken from the file core/completerlib, # which belongs to the IPython project (v0.13). They were added here because # a) IPython is...
[ [ 8, 0, 0.0062, 0.0031, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0652, 0.0031, 0, 0.66, 0.04, 201, 0, 1, 0, 0, 201, 0, 0 ], [ 1, 0, 0.0683, 0.0031, 0, 0.66, ...
[ "\"\"\"Module completion auxiliary functions\"\"\"", "import imp", "import inspect", "import os.path", "import pkgutil", "import re", "from time import time", "import sys", "from zipimport import zipimporter", "from spyderlib.baseconfig import get_conf_path", "from spyderlib.utils.external.pickl...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Debug utilities""" import inspect import traceback import time def log_time(fd): timestr = "Logging time: %s" % time.ctime(time.time()) p...
[ [ 8, 0, 0.0933, 0.0133, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.12, 0.0133, 0, 0.66, 0.1429, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.1333, 0.0133, 0, 0.66, ...
[ "\"\"\"Debug utilities\"\"\"", "import inspect", "import traceback", "import time", "def log_time(fd):\n timestr = \"Logging time: %s\" % time.ctime(time.time())\n print >>fd, \"=\"*len(timestr)\n print >>fd, timestr\n print >>fd, \"=\"*len(timestr)\n print >>fd, \"\"", " timestr = \"Log...
# -*- coding: utf-8 -*- # # Copyright © 2012 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Operating system utilities""" import os # Local imports from spyderlib.utils import programs def windows_memory_usage(): """Return physical mem...
[ [ 1, 0, 0.0294, 0.0294, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0882, 0.0294, 0, 0.66, 0.3333, 105, 0, 1, 0, 0, 105, 0, 0 ], [ 2, 0, 0.4706, 0.6176, 0, ...
[ "import os", "from spyderlib.utils import programs", "def windows_memory_usage():\n \"\"\"Return physical memory usage (float)\n Works on Windows platforms only\"\"\"\n from ctypes import windll, wintypes\n class MemoryStatus(wintypes.Structure):\n _fields_ = [('dwLength', wintypes.DWORD),\n ...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """BSD socket interface communication utilities""" # Be extra careful here. The interface is used to communicate with subprocesses # by redirecting output stream...
[ [ 8, 0, 0.0395, 0.0056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0734, 0.0056, 0, 0.66, 0.0667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0791, 0.0056, 0, 0.66...
[ "\"\"\"BSD socket interface communication utilities\"\"\"", "import os", "import socket", "import struct", "import cPickle as pickle", "import threading", "import errno", "def temp_fail_retry(error, fun, *args):\n \"\"\"Retry to execute function, ignoring EINTR error (interruptions)\"\"\"\n whil...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Source code analysis utilities """ import sys import re import os from subprocess import Popen, PIPE import tempfile # Local import from spyderlib.u...
[ [ 8, 0, 0.0548, 0.0205, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0753, 0.0068, 0, 0.66, 0.0667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0822, 0.0068, 0, 0.66...
[ "\"\"\"\nSource code analysis utilities\n\"\"\"", "import sys", "import re", "import os", "from subprocess import Popen, PIPE", "import tempfile", "from spyderlib.utils import programs", "TASKS_PATTERN = r\"(^|#)[ ]*(TODO|FIXME|XXX|HINT|TIP)( |:)([^#]*)\"", "def find_tasks(source_code):\n \"\"\"F...
# -*- coding: utf-8 -*- # # Copyright © 2009 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Python class/function parser Derived from "Demo/parser/example.py" from Python distribution ******************************** WARNING *********************...
[ [ 8, 0, 0.0612, 0.0561, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0969, 0.0051, 0, 0.66, 0.0769, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.102, 0.0051, 0, 0.66,...
[ "\"\"\"\nPython class/function parser\n\nDerived from \"Demo/parser/example.py\" from Python distribution\n\n******************************** WARNING ***************************************\n This module is not used anymore in Spyder since v1.1.0.\n However, it will still be part of spyderlib module for a lit...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Source code text utilities """ # Order is important: EOL_CHARS = (("\r\n", 'nt'), ("\n", 'posix'), ("\r", 'mac')) def get_eol_chars(text): """...
[ [ 8, 0, 0.1481, 0.0556, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2222, 0.0185, 0, 0.66, 0.125, 844, 0, 0, 0, 0, 0, 8, 0 ], [ 2, 0, 0.2963, 0.0926, 0, 0.66, ...
[ "\"\"\"\nSource code text utilities\n\"\"\"", "EOL_CHARS = ((\"\\r\\n\", 'nt'), (\"\\n\", 'posix'), (\"\\r\", 'mac'))", "def get_eol_chars(text):\n \"\"\"Get text EOL characters\"\"\"\n for eol_chars, _os_name in EOL_CHARS:\n if text.find(eol_chars) > -1:\n return eol_chars", " \"\"...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ spyderlib.utils =============== Spyder utilities """
[ [ 8, 0, 0.7917, 0.5, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\nspyderlib.utils\n===============\n\nSpyder utilities\n\"\"\"" ]
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Find/Replace widget""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtGui impor...
[ [ 8, 0, 0.018, 0.0026, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0387, 0.0077, 0, 0.66, 0.1111, 314, 0, 9, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0438, 0.0026, 0, 0.66,...
[ "\"\"\"Find/Replace widget\"\"\"", "from spyderlib.qt.QtGui import (QHBoxLayout, QGridLayout, QCheckBox, QLabel,\n QWidget, QSizePolicy, QShortcut, QKeySequence,\n QTextCursor)", "from spyderlib.qt.QtCore import SIGNAL, Qt, QTimer", "import re", ...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """pydoc widget""" from spyderlib.qt.QtGui import QApplication, QCursor from spyderlib.qt.QtCore import QThread, QUrl, Qt import sys import os.path as o...
[ [ 8, 0, 0.0614, 0.0088, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0789, 0.0088, 0, 0.66, 0.0909, 314, 0, 2, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0877, 0.0088, 0, 0.66...
[ "\"\"\"pydoc widget\"\"\"", "from spyderlib.qt.QtGui import QApplication, QCursor", "from spyderlib.qt.QtCore import QThread, QUrl, Qt", "import sys", "import os.path as osp", "from spyderlib.baseconfig import _", "from spyderlib.widgets.browser import WebBrowser", "from spyderlib.utils.misc import se...
# -*- coding: utf-8 -*- # # Copyright © 2012 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Status bar widgets""" from spyderlib.qt.QtGui import QWidget, QHBoxLayout, QLabel from spyderlib.qt.QtCore import QTimer, SIGNAL # Local import from spyderlib.basecon...
[ [ 8, 0, 0.0366, 0.0052, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0471, 0.0052, 0, 0.66, 0.0714, 314, 0, 3, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0524, 0.0052, 0, 0.66...
[ "\"\"\"Status bar widgets\"\"\"", "from spyderlib.qt.QtGui import QWidget, QHBoxLayout, QLabel", "from spyderlib.qt.QtCore import QTimer, SIGNAL", "from spyderlib.baseconfig import _", "from spyderlib.guiconfig import get_font", "class StatusBarWidget(QWidget):\n def __init__(self, parent, statusbar):\...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Internal shell widget : PythonShellWidget + Interpreter""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0...
[ [ 8, 0, 0.0155, 0.0022, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0377, 0.0022, 0, 0.66, 0.0455, 364, 0, 1, 0, 0, 364, 0, 0 ], [ 1, 0, 0.0399, 0.0022, 0, 0.66...
[ "\"\"\"Internal shell widget : PythonShellWidget + Interpreter\"\"\"", "import __builtin__", "from spyderlib.widgets.objecteditor import oedit", "__builtin__.oedit = oedit", "import os", "import threading", "from time import time", "from subprocess import Popen", "from spyderlib.qt.QtGui import QMes...
# -*- coding: utf-8 -*- from spyderlib.qt.QtGui import (QLineEdit, QIcon, QHBoxLayout, QColor, QPushButton, QColorDialog, QPixmap) from spyderlib.qt.QtCore import SIGNAL, QSize, Slot, Property class ColorButton(QPushButton): """ Color choosing push button """ ...
[ [ 1, 0, 0.0402, 0.023, 0, 0.66, 0, 314, 0, 7, 0, 0, 314, 0, 0 ], [ 1, 0, 0.0575, 0.0115, 0, 0.66, 0.25, 529, 0, 4, 0, 0, 529, 0, 0 ], [ 3, 0, 0.2759, 0.3793, 0, 0.6...
[ "from spyderlib.qt.QtGui import (QLineEdit, QIcon, QHBoxLayout, QColor,\n QPushButton, QColorDialog, QPixmap)", "from spyderlib.qt.QtCore import SIGNAL, QSize, Slot, Property", "class ColorButton(QPushButton):\n \"\"\"\n Color choosing push button\n \"\"\"\n __pyqtSign...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """External shell's introspection and notification servers""" from spyderlib.qt.QtCore import QThread, SIGNAL, Signal import threading import socket import e...
[ [ 8, 0, 0.0355, 0.0051, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0457, 0.0051, 0, 0.66, 0.0526, 529, 0, 3, 0, 0, 529, 0, 0 ], [ 1, 0, 0.0558, 0.0051, 0, 0.66...
[ "\"\"\"External shell's introspection and notification servers\"\"\"", "from spyderlib.qt.QtCore import QThread, SIGNAL, Signal", "import threading", "import socket", "import errno", "import os", "from spyderlib.baseconfig import get_conf_path, DEBUG", "from spyderlib.utils.misc import select_port", ...
# -*- coding: utf-8 -*- # # Copyright © 2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 import sys import os import os.path as osp from time import ...
[ [ 1, 0, 0.0373, 0.0031, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0404, 0.0031, 0, 0.66, 0.0833, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0435, 0.0031, 0, ...
[ "import sys", "import os", "import os.path as osp", "from time import time, strftime, gmtime", "from spyderlib.qt.QtGui import (QApplication, QWidget, QVBoxLayout,\n QHBoxLayout, QMenu, QLabel, QInputDialog,\n QLineEdit, QToolButton)", "from sp...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """External System Shell widget: execute terminal in a separate process""" import os from spyderlib.qt.QtGui import QMessageBox from spyderlib.qt.QtCore ...
[ [ 8, 0, 0.049, 0.007, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0629, 0.007, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0769, 0.007, 0, 0.66, ...
[ "\"\"\"External System Shell widget: execute terminal in a separate process\"\"\"", "import os", "from spyderlib.qt.QtGui import QMessageBox", "from spyderlib.qt.QtCore import QProcess, SIGNAL, QTextCodec", "locale_codec = QTextCodec.codecForLocale()", "from spyderlib.utils import encoding", "from spyde...
# -*- coding: utf-8 -*- # # Copyright © 2009-2012 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Startup file used by ExternalPythonShell exclusively for IPython kernels (see spyderlib/widgets/externalshell/pythonshell.py)""" import sys import os.pa...
[ [ 8, 0, 0.0403, 0.0108, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0538, 0.0054, 0, 0.66, 0.0556, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0591, 0.0054, 0, 0.66...
[ "\"\"\"Startup file used by ExternalPythonShell exclusively for IPython kernels\n(see spyderlib/widgets/externalshell/pythonshell.py)\"\"\"", "import sys", "import os.path as osp", "def sympy_config(version):\n \"\"\"Sympy configuration\"\"\"\n \n lines = \"\"\"\nfrom __future__ import division\nfrom...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """External Python Shell widget: execute Python script in a separate process""" import sys import os import os.path as osp import socket from spyderlib...
[ [ 8, 0, 0.0114, 0.0016, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0146, 0.0016, 0, 0.66, 0.05, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0163, 0.0016, 0, 0.66, ...
[ "\"\"\"External Python Shell widget: execute Python script in a separate process\"\"\"", "import sys", "import os", "import os.path as osp", "import socket", "from spyderlib.qt.QtGui import QApplication, QMessageBox, QSplitter, QMenu", "from spyderlib.qt.QtCore import QProcess, SIGNAL, Qt, QTextCodec", ...