GRAYBYTE WORDPRESS FILE MANAGER2971

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/python34/lib/python3.4/site-packages/setuptools/command/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/python34/lib/python3.4/site-packages/setuptools/command//alias.py
import distutils, os
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import *
from setuptools.command.setopt import edit_config, option_base, config_file

def shquote(arg):
    """Quote an argument for later parsing by shlex.split()"""
    for c in '"', "'", "\\", "#":
        if c in arg: return repr(arg)
    if arg.split() != [arg]:
        return repr(arg)
    return arg        


class alias(option_base):
    """Define a shortcut that invokes one or more commands"""
    
    description = "define a shortcut to invoke one or more commands"
    command_consumes_arguments = True

    user_options = [
        ('remove',   'r', 'remove (unset) the alias'), 
    ] + option_base.user_options

    boolean_options = option_base.boolean_options + ['remove']

    def initialize_options(self):
        option_base.initialize_options(self)
        self.args = None
        self.remove = None

    def finalize_options(self):
        option_base.finalize_options(self)
        if self.remove and len(self.args) != 1:
            raise DistutilsOptionError(
                "Must specify exactly one argument (the alias name) when "
                "using --remove"
            )

    def run(self):
        aliases = self.distribution.get_option_dict('aliases')

        if not self.args:
            print("Command Aliases")
            print("---------------")
            for alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
            return

        elif len(self.args)==1:
            alias, = self.args
            if self.remove:
                command = None
            elif alias in aliases:
                print("setup.py alias", format_alias(alias, aliases))
                return
            else:
                print("No alias definition found for %r" % alias)
                return
        else:
            alias = self.args[0]
            command = ' '.join(map(shquote,self.args[1:]))

        edit_config(self.filename, {'aliases': {alias:command}}, self.dry_run)


def format_alias(name, aliases):
    source, command = aliases[name]
    if source == config_file('global'):
        source = '--global-config '
    elif source == config_file('user'):
        source = '--user-config '
    elif source == config_file('local'):
        source = ''
    else:
        source = '--filename=%r' % source
    return source+name+' '+command
            



[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:37:27
root / linksafe
0755
__pycache__
--
March 03 2024 22:37:27
root / linksafe
0755
__init__.py
0.54 KB
November 13 2023 21:21:17
root / linksafe
0644
alias.py
2.428 KB
November 13 2023 21:21:17
root / linksafe
0644
bdist_egg.py
18.279 KB
November 13 2023 21:21:17
root / linksafe
0644
bdist_rpm.py
1.978 KB
November 13 2023 21:21:17
root / linksafe
0644
bdist_wininst.py
2.229 KB
November 13 2023 21:21:17
root / linksafe
0644
build_ext.py
11.576 KB
November 13 2023 21:21:17
root / linksafe
0644
build_py.py
8.242 KB
November 13 2023 21:21:17
root / linksafe
0644
develop.py
6.296 KB
November 13 2023 21:21:17
root / linksafe
0644
easy_install.py
71.012 KB
November 13 2023 21:21:17
root / linksafe
0755
egg_info.py
13.984 KB
November 13 2023 21:21:17
root / linksafe
0644
install.py
3.97 KB
November 13 2023 21:21:17
root / linksafe
0644
install_egg_info.py
3.743 KB
November 13 2023 21:21:17
root / linksafe
0644
install_lib.py
2.428 KB
November 13 2023 21:21:17
root / linksafe
0644
install_scripts.py
2.02 KB
November 13 2023 21:21:17
root / linksafe
0644
register.py
0.271 KB
November 13 2023 21:21:17
root / linksafe
0644
rotate.py
2.014 KB
November 13 2023 21:21:17
root / linksafe
0644
saveopts.py
0.688 KB
November 13 2023 21:21:17
root / linksafe
0644
sdist.py
8.146 KB
November 13 2023 21:21:17
root / linksafe
0644
setopt.py
4.949 KB
November 13 2023 21:21:17
root / linksafe
0644
test.py
5.793 KB
November 13 2023 21:21:17
root / linksafe
0644
upload_docs.py
6.647 KB
November 13 2023 21:21:17
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF