PHP 8.2.30
Preview: __init__.py Size: 733 B
/opt/alt/python37/lib/python3.7/site-packages/virtualenv/activation/batch/__init__.py

from __future__ import absolute_import, unicode_literals

import os

from virtualenv.util.path import Path

from ..via_template import ViaTemplateActivator


class BatchActivator(ViaTemplateActivator):
    @classmethod
    def supports(cls, interpreter):
        return interpreter.os == "nt"

    def templates(self):
        yield Path("activate.bat")
        yield Path("deactivate.bat")
        yield Path("pydoc.bat")

    def instantiate_template(self, replacements, template, creator):
        # ensure the text has all newlines as \r\n - required by batch
        base = super(BatchActivator, self).instantiate_template(replacements, template, creator)
        return base.replace(os.linesep, "\n").replace("\n", os.linesep)

Directory Contents

Dirs: 1 × Files: 4

Name Size Perms Modified Actions
- drwxr-xr-x 2024-03-03 22:53:22
Edit Download
1019 B lrw-r--r-- 2022-01-02 15:54:28
Edit Download
510 B lrw-r--r-- 2022-01-02 15:54:28
Edit Download
24 B lrw-r--r-- 2022-01-02 15:54:28
Edit Download
733 B lrw-r--r-- 2022-01-02 15:54:28
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).