How to add all subfolders a folder to PYTHONPATH The Next CEO of Stack OverflowTo install...
How to Implement Deterministic Encryption Safely in .NET
Is it ok to trim down a tube patch?
Easy to read palindrome checker
In the "Harry Potter and the Order of the Phoenix" video game, what potion is used to sabotage Umbridge's speakers?
TikZ: How to fill area with a special pattern?
free fall ellipse or parabola?
Is it correct to say moon starry nights?
Purpose of level-shifter with same in and out voltages
Could a dragon use its wings to swim?
What would be the main consequences for a country leaving the WTO?
Yu-Gi-Oh cards in Python 3
Why don't programming languages automatically manage the synchronous/asynchronous problem?
IC has pull-down resistors on SMBus lines?
How did Beeri the Hittite come up with naming his daughter Yehudit?
What difference does it make using sed with/without whitespaces?
Can you teleport closer to a creature you are Frightened of?
Do scriptures give a method to recognize a truly self-realized person/jivanmukta?
Aggressive Under-Indexing and no data for missing index
Airplane gently rocking its wings during whole flight
The Ultimate Number Sequence Puzzle
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Spaces in which all closed sets are regular closed
how one can write a nice vector parser, something that does pgfvecparse{A=B-C; D=E x F;}
How to add all subfolders a folder to PYTHONPATH
The Next CEO of Stack OverflowTo install Markdown's extensions by PythonThe suggested way to handle pip(easy_install) with homebrew?Environment variables in bash_profile or bashrc?Fix Python sys.path after MacPorts install of Pythonhow to include python modules not under distribution root in setup.py?How to install PyGTK for Python 2.7 on CentOS 6?How to add c++ header files to windows path?Add folder to path, or copy symbolic links to existent directory in path?Removing all but original system-default python on macOSHow to quickly encrypt/decrypt files in folder with python/bash in Ubuntu & Mac?
All of my Python module sources are in the folder /src/*
:
/src/module1
/src/module2
...
/src/modules100
If I want to add all of these modules to my PYTHONPATH
, I need to add them individually in my .bashrc
by using the export
command. Is it possible to add them by one command? (basically adding everything under the /src/*
folder to my PYTHONPATH)
python path bashrc
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
All of my Python module sources are in the folder /src/*
:
/src/module1
/src/module2
...
/src/modules100
If I want to add all of these modules to my PYTHONPATH
, I need to add them individually in my .bashrc
by using the export
command. Is it possible to add them by one command? (basically adding everything under the /src/*
folder to my PYTHONPATH)
python path bashrc
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
All of my Python module sources are in the folder /src/*
:
/src/module1
/src/module2
...
/src/modules100
If I want to add all of these modules to my PYTHONPATH
, I need to add them individually in my .bashrc
by using the export
command. Is it possible to add them by one command? (basically adding everything under the /src/*
folder to my PYTHONPATH)
python path bashrc
All of my Python module sources are in the folder /src/*
:
/src/module1
/src/module2
...
/src/modules100
If I want to add all of these modules to my PYTHONPATH
, I need to add them individually in my .bashrc
by using the export
command. Is it possible to add them by one command? (basically adding everything under the /src/*
folder to my PYTHONPATH)
python path bashrc
python path bashrc
asked Oct 16 '17 at 17:59
motam79motam79
2009
2009
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can find various options to do that over on Stack Overflow. One of the easiest:
PYTHONPATH="$(printf "%s:" /src/*/)"
Here, /src/*/
expands into all directories under /src/
. printf
then uses a colon (:
) as separator character.
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1259652%2fhow-to-add-all-subfolders-a-folder-to-pythonpath%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can find various options to do that over on Stack Overflow. One of the easiest:
PYTHONPATH="$(printf "%s:" /src/*/)"
Here, /src/*/
expands into all directories under /src/
. printf
then uses a colon (:
) as separator character.
add a comment |
You can find various options to do that over on Stack Overflow. One of the easiest:
PYTHONPATH="$(printf "%s:" /src/*/)"
Here, /src/*/
expands into all directories under /src/
. printf
then uses a colon (:
) as separator character.
add a comment |
You can find various options to do that over on Stack Overflow. One of the easiest:
PYTHONPATH="$(printf "%s:" /src/*/)"
Here, /src/*/
expands into all directories under /src/
. printf
then uses a colon (:
) as separator character.
You can find various options to do that over on Stack Overflow. One of the easiest:
PYTHONPATH="$(printf "%s:" /src/*/)"
Here, /src/*/
expands into all directories under /src/
. printf
then uses a colon (:
) as separator character.
answered Oct 16 '17 at 18:45
slhckslhck
163k47450474
163k47450474
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1259652%2fhow-to-add-all-subfolders-a-folder-to-pythonpath%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown