text stringlengths 1 93.6k |
|---|
def update():
|
"""
|
Attempt to reload all loaded modulefiles. The
|
environment will be reconfigured to match the
|
environment saved in ${HOME}/.modulesbeginenv (if
|
BEGINENV=1) or the file pointed at by
|
$MODULESBEGINEV (if BEGINENV=99) and the
|
modulefiles will be reloaded. This is only valid
|
if modules was configured with --enable-beginenv
|
(which defines BEGINENV), otherwise this will
|
cause a warning. update will only change the
|
environment variables that the modulefiles set.
|
"""
|
return module('update {0} {1}'.format(directory))
|
def clear():
|
"""
|
Force the Modules package to believe that no
|
modules are currently loaded.
|
"""
|
return module('clear')
|
def purge():
|
"""Unload all loaded modulefiles."""
|
return module('purge')
|
def refresh():
|
"""
|
Force a refresh of all non-persistent components
|
of currently loaded modules. This should be used
|
on derived shells where aliases need to be
|
reinitialized but the environment variables have
|
already been set by the currently loaded modules.
|
"""
|
return module('refresh')
|
def whatis(modulefile):
|
"""
|
Display the information set up by the module-
|
whatis commands inside the specified
|
modulefile(s). If no modulefile is specified, all
|
'whatis' lines will be shown.
|
"""
|
return module('whatis {0}'.format(modulefile))
|
# Module file API
|
def isloaded(modulefile):
|
return bool([m for m in ls() if modulefile in m])
|
# <FILESEP>
|
#!venv/bin/python
|
import os
|
import re
|
import sys
|
SUBS = [
|
("async def", "def"),
|
("async with", "with"),
|
("await ", ""),
|
("async for", "for"),
|
("__aiter__", "__iter__"),
|
("AsyncIterator", "Iterator"),
|
("AsyncFileStorage", "FileStorage"),
|
("AsyncBaseStorage", "BaseStorage"),
|
("AsyncFileManager", "FileManager"),
|
("MockAsyncConnectionPool", "MockConnectionPool"),
|
("MockAsyncTransport", "MockTransport"),
|
("AsyncRedisStorage", "RedisStorage"),
|
("AsyncSQLiteStorage", "SQLiteStorage"),
|
("AsyncInMemoryStorage", "InMemoryStorage"),
|
("AsyncS3Storage", "S3Storage"),
|
("AsyncS3Manager", "S3Manager"),
|
("import redis.asyncio as redis", "import redis"),
|
("AsyncCacheTransport", "CacheTransport"),
|
("AsyncBaseTransport", "BaseTransport"),
|
("AsyncCacheClient", "CacheClient"),
|
("AsyncClient", "Client"),
|
("AsyncIterable", "Iterable"),
|
("AsyncCacheStream", "CacheStream"),
|
("AsyncByteStream", "SyncByteStream"),
|
("AsyncCacheConnectionPool", "CacheConnectionPool"),
|
("handle_async_request", "handle_request"),
|
("aread", "read"),
|
("aclose", "close"),
|
("asleep", "sleep"),
|
("AsyncLock", "Lock"),
|
(
|
"from httpcore._async.interfaces import AsyncRequestInterface",
|
"from httpcore._sync.interfaces import RequestInterface",
|
),
|
("from hishel._async._transports", "from hishel._sync._transports"),
|
("AsyncRequestInterface", "RequestInterface"),
|
("__aenter__", "__enter__"),
|
("__aexit__", "__exit__"),
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.