On 09Oct2019 16:50, DL Neil wrote:
Another option might be to add a symlink* from the application's
directory to wherever you've downloaded and expanded the GitHub .zip
archive.
I do this. A current project is using Spectra's ds3 Python library.
The project itself has a directory for the add
On 9/10/19 4:34 PM, jf...@ms4.hinet.net wrote:
jf...@ms4.hinet.net於 2019年10月8日星期二 UTC+8上午10時45分36秒寫道:
For example:
from my-dir import test
I know it can be solved by renaming, but any alternative?
--Jach
Maybe another (better?) solution is:
import sys
sys.path.append(r'my-dir')
import test
jf...@ms4.hinet.net於 2019年10月8日星期二 UTC+8上午10時45分36秒寫道:
> For example:
> from my-dir import test
>
> I know it can be solved by renaming, but any alternative?
>
> --Jach
Maybe another (better?) solution is:
import sys
sys.path.append(r'my-dir')
import test
--Jach
--
https://mail.python.org/mail
On Wed, Oct 9, 2019 at 12:56 PM DL Neil via Python-list
wrote:
>
> On 9/10/19 2:46 PM, Chris Angelico wrote:
> > On Wed, Oct 9, 2019 at 12:36 PM DL Neil via Python-list
> > wrote:
> ...
>
> > (Or just using pip to install directly from GitHub, although not
> > everyone knows that that's possible.
On 9/10/19 2:46 PM, Chris Angelico wrote:
On Wed, Oct 9, 2019 at 12:36 PM DL Neil via Python-list
wrote:
...
(Or just using pip to install directly from GitHub, although not
everyone knows that that's possible.)
Come on, you just knew I was going to ask how...
--
Regards =dn
--
https://mai
On Wed, Oct 9, 2019 at 12:36 PM DL Neil via Python-list
wrote:
>
> On 9/10/19 2:12 PM, jf...@ms4.hinet.net wrote:
> > dieter於 2019年10月8日星期二 UTC+8下午1時33分20秒寫道:
> >> jf...@ms4.hinet.net writes:
> >>> ...
> >>> But most of the download from Github has a directory named '-master'
> >>> which caus
On 9/10/19 2:12 PM, jf...@ms4.hinet.net wrote:
dieter於 2019年10月8日星期二 UTC+8下午1時33分20秒寫道:
jf...@ms4.hinet.net writes:
...
But most of the download from Github has a directory named '-master' which
causes a trouble sometimes.
Those are likely not meant to be imported directly.
Typically, y
dieter於 2019年10月8日星期二 UTC+8下午1時33分20秒寫道:
> jf...@ms4.hinet.net writes:
> > ...
> > But most of the download from Github has a directory named '-master'
> > which causes a trouble sometimes.
>
> Those are likely not meant to be imported directly.
>
> Typically, you have a "setup" step which i
jf...@ms4.hinet.net writes:
> ...
> But most of the download from Github has a directory named '-master'
> which causes a trouble sometimes.
Those are likely not meant to be imported directly.
Typically, you have a "setup" step which installs (in some way)
a "distribution". This step usually
DL Neil於 2019年10月8日星期二 UTC+8上午11時02分20秒寫道:
> On 8/10/19 3:45 PM, jf...@ms4.hinet.net wrote:
> > For example:
> > from my-dir import test
> >
> > I know it can be solved by renaming, but any alternative?
>
>
> The manual is your friend:
> - import
> - importlib
>
> (the latter allows modules to
On 8/10/19 3:45 PM, jf...@ms4.hinet.net wrote:
For example:
from my-dir import test
I know it can be solved by renaming, but any alternative?
The manual is your friend:
- import
- importlib
(the latter allows modules to be identified by strings)
However, Pythons has naming rules. If you try
For example:
from my-dir import test
I know it can be solved by renaming, but any alternative?
--Jach
--
https://mail.python.org/mailman/listinfo/python-list
12 matches
Mail list logo