On 08Aug2024 21:55, Gilmeh Serda wrote:
I guess in a sense Py2 was smarter figuring out what whent where and
where
it came from. Or it was a bad hack that has been removed.
No, Python 2 offered less control.
--
https://mail.python.org/mailman/listinfo/python-list
On 07Aug2024 08:35, Tobiah wrote:
When I do the same import with python3, I get:
Traceback (most recent call last):
File "/home/toby/me", line 1, in
import rcs.dbi
File "/usr/regos-1.0/lib/python/rcs/dbi/__init__.py", line 1, in
On Thu, 8 Aug 2024 at 03:40, Tobiah via Python-list
wrote:
> The one under rcs.dbi contains:
>
> from dbi import *
> from regos import *
>
You probably want these to be package-relative now:
from .dbi import *
from .regos import *
Or, since you're using names
utorial/modules.html
<https://docs.python.org/3/tutorial/modules.html#intra-package-references>
in this link above we have some examples of relative imports:
from . import echo
from .. import formats
from ..filters import equalizer
In your code you're using "import *&quo
i contains:
from dbi import *
from regos import *
With python2, I'd go:
import rcs.dbi
then I'd have access to stuff in regos.py
as:
rcs.dbi.feature() (Where 'feature' is defined in regos.py)
When I do the same import with python3, I get:
Tr
On 16Feb2024 20:32, MRAB wrote:
On 2024-02-16 20:07, Gabor Urban via Python-list wrote:
I need something about modules to be clarified.
Suppose I have written a module eg: ModuleA which imports an other
module, let us say the datetime.
If I import ModuleA in a script, will be datetime
On 2024-02-16 20:07, Gabor Urban via Python-list wrote:
Hi guys,
I need something about modules to be clarified.
Suppose I have written a module eg: ModuleA which imports an other
module, let us say the datetime.
If I import ModuleA in a script, will be datetime imported automatically?
Yes
Hi guys,
I need something about modules to be clarified.
Suppose I have written a module eg: ModuleA which imports an other
module, let us say the datetime.
If I import ModuleA in a script, will be datetime imported automatically?
Thanks in advance,
--
Urbán Gábor
Linux is like a wigwam: no
> but does this mean that even with PEP 649 that forward references will
> still be needed?
Yes. Both of PEP 563 and PEP 649 solves not all forward reference issues.
--
Inada Naoki
--
https://mail.python.org/mailman/listinfo/python-list
Should mention this also affects Protocol[Buzz]
On Fri, Jun 30, 2023, 5:35 PM Joseph Garvin wrote:
> ```
> from __future__ import annotations
> from typing import Generic, TypeVar
>
> T = TypeVar("T")
> class Foo(Generic[T]): ...
> class Bar(Foo[Buzz]): ..
```
from __future__ import annotations
from typing import Generic, TypeVar
T = TypeVar("T")
class Foo(Generic[T]): ...
class Bar(Foo[Buzz]): ... # NameError here
class Buzz: ...
```
This will error, despite the __future__ import, because cpython is trying
to look up Buzz before it
; > >
> > > https://conda-forge.org/
> > > """
> > >
> > > > On 10/11/2022 11:53 AM, Abdul Haseeb Azizi wrote:
> > > &
tem:
> >
> > https://docs.conda.io/en/latest/
> >
> > By the conda-forge project:
> >
> > https://conda-forge.org/
> > """
> >
> > > On 10/11/2022 11:53 AM, Abdul Haseeb Azizi wrote:
> > >> Hi everyone,
> > >> I am n
10/11/2022 11:53 AM, Abdul Haseeb Azizi wrote:
> >> Hi everyone,
> >> I am new to python and I am trying to utilize this code "from osgeo import
> >> gdal".
atest/
By the conda-forge project:
https://conda-forge.org/
"""
On 10/11/2022 11:53 AM, Abdul Haseeb Azizi wrote:
Hi everyone,
I am new to python and I am trying to utilize this code "from osgeo import
gdal". I installed python 3.10 and also I installed anaconda3 to sol
files.
On 10/11/2022 11:53 AM, Abdul Haseeb Azizi wrote:
Hi everyone,
I am new to python and I am trying to utilize this code "from osgeo import
gdal". I installed python 3.10 and also I installed anaconda3 to solve this matter
but I could not succeed. When I run that code I get the
Hi everyone,
I am new to python and I am trying to utilize this code "from osgeo import
gdal". I installed python 3.10 and also I installed anaconda3 to solve this
matter but I could not succeed. When I run that code I get the follo
On Tue, 21 Jun 2022 at 09:22, Wolfgang Grafen wrote:
> I am an experienced Python user and struggle with following statement:
>
> >>> from tklib import *
> Traceback (most recent call last):
> File "", line 1, in
> ModuleNotFoundError: No module named
On Mon, 20 Jun 2022 15:43:26 -0700 (PDT), Wolfgang Grafen
declaimed the following:
>
>There are numerous examples using "from tklib import *" so I assume it works
>for most. In the tk-tutorial below tklib is used without special explanation,
>so I assume it should be ins
On 2022-06-20 23:43, Wolfgang Grafen wrote:
Hello all,
I am an experienced Python user and struggle with following statement:
from tklib import *
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'tklib'
I tried to import tkl
Hello all,
I am an experienced Python user and struggle with following statement:
>>> from tklib import *
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'tklib'
I tried to import tklib as shown above on followi
On Wed, 13 Apr 2022 at 03:37, Stefano Ovus wrote:
>
> found a solution: importing modules instead of classes, ex.
>
> -- square.py
>
> import circle
>
> ...
> @classmethod
> def from_circle(cls, circle: circle.Circle) -> Square:
> ...
> return
found a solution: importing modules instead of classes, ex.
-- square.py
import circle
...
@classmethod
def from_circle(cls, circle: circle.Circle) -> Square:
...
return cls(...)
--
https://mail.python.org/mailman/listinfo/python-list
How can I avoid circular imports keeping separated modules ?
-- square.py
from circle import Cirle
class Square:
def __init__(self):
...
@classmethod
def from_circle(cls, circle: Circle) -> Square:
...
return cls(...)
-- circle.py
from square import Square
class Cir
Daniel Eduardo Almeida Correa writes:
> Hello, I'm trying to use the machine library in python 3.10 version, but I
> can't import it with the pip install machine, could you tell me a way to
> solve it or a python version compatible with the library? Thank you a lot
>
On 2021-11-21 18:36, Daniel Eduardo Almeida Correa wrote:
Hello, I'm trying to use the machine library in python 3.10 version, but I
can't import it with the pip install machine, could you tell me a way to
solve it or a python version compatible with the library? Thank you a lot
for y
Hello, I'm trying to use the machine library in python 3.10 version, but I
can't import it with the pip install machine, could you tell me a way to
solve it or a python version compatible with the library? Thank you a lot
for your answer.
--
https://mail.python.org/mailman/listinfo/python-list
On 20/11/2021 03.38, lucas wrote:
> ok. all good advice. thank you for that. and with all that I've decided
> what to do.
>
> I'm going to close off any server-side python access so that I don't expose
> my server or the file system to vulnerabilities and/or wonton attacks. I am
> building
ok. all good advice. thank you for that. and with all that I've decided what
to do.
I'm going to close off any server-side python access so that I don't expose my
server or the file system to vulnerabilities and/or wonton attacks. I am
building a site for education and what I will configure
On 11/18/21 21:00, Dan Stromberg wrote:
On Thu, Nov 18, 2021 at 6:19 PM Chris Angelico wrote:
On Fri, Nov 19, 2021 at 11:24 AM Dan Stromberg
wrote:
On Thu, Nov 18, 2021 at 12:21 PM Chris Angelico
wrote:
If you're trying to make a Python-in-Python sandbox, I recommend not.
Instead, use
On Fri, Nov 19, 2021 at 3:00 PM Dan Stromberg wrote:
>
>
> On Thu, Nov 18, 2021 at 6:19 PM Chris Angelico wrote:
>>
>> On Fri, Nov 19, 2021 at 11:24 AM Dan Stromberg wrote:
>> >
>> >
>> > On Thu, Nov 18, 2021 at 12:21 PM Chris Angelico wrote:
>> >>
>> >> If you're trying to make a Python-in-Pyt
On Thu, Nov 18, 2021 at 6:19 PM Chris Angelico wrote:
> On Fri, Nov 19, 2021 at 11:24 AM Dan Stromberg
> wrote:
> >
> >
> > On Thu, Nov 18, 2021 at 12:21 PM Chris Angelico
> wrote:
> >>
> >> If you're trying to make a Python-in-Python sandbox, I recommend not.
> >> Instead, use an OS-level sand
On Fri, Nov 19, 2021 at 11:24 AM Dan Stromberg wrote:
>
>
> On Thu, Nov 18, 2021 at 12:21 PM Chris Angelico wrote:
>>
>> If you're trying to make a Python-in-Python sandbox, I recommend not.
>> Instead, use an OS-level sandbox (a chroot, probably some sort of CPU
>> usage limiting, etc), and use
On 2021-11-17, lucas wrote:
> are there any other ways to import a module or package other then
> the "import" or "from...import..." statements? i ask because i'm
> allowing programming on my web2py website and i don't want any
> accessing packages
On Thu, Nov 18, 2021 at 12:21 PM Chris Angelico wrote:
> If you're trying to make a Python-in-Python sandbox, I recommend not.
> Instead, use an OS-level sandbox (a chroot, probably some sort of CPU
> usage limiting, etc), and use that to guard the entire Python process.
> Python-in-Python will b
On Fri, Nov 19, 2021 at 7:09 AM lucas wrote:
>
> hello one and all,
>
> are there any other ways to import a module or package other then the
> "import" or "from...import..." statements? i ask because i'm allowing
> programming on my web2py website a
hello one and all,
are there any other ways to import a module or package other then the "import"
or "from...import..." statements? i ask because i'm allowing programming on my
web2py website and i don't want any accessing packages like os or sys.
thank you i
n /home/foo/coolprog
>2) You look up the AST for /home/foo/coolprog/a/b/c.py
>3) /home/foo/coolprog/a/b/c.py has a relative import of ..blah
Look at the functions provided by `os.path`.
Maybe, you do not need relative path: look at `importlib`
(which also supports import via absolute paths)
.py
3) /home/foo/coolprog/a/b/c.py has a relative import of ..blah
Is there something preexisting that can figure out what path blah is
supposed to have, assuming 100% pure python code?
Or is it necessary to actually import to get that? I think I could import
and then check __file__, but I
rate number of bits (1088 for sha3_256, and 576 for sha3_512) of
data which have not yet been incorporated into the `S`-state.
Is there a simple way to export these two internal values from a
sha3_256 or sha3_512 object, and conversely, a simple way to import
these two exported values back into a n
On Mon, Aug 23, 2021 at 12:26 AM Dan Stromberg wrote:
>
>
> On Sun, Aug 22, 2021 at 7:14 AM Chris Angelico wrote:
>>
>> On Mon, Aug 23, 2021 at 12:08 AM Dan Stromberg wrote:
>> >
>> > In 'from foo import bar':
>> >
>> > With th
On Sun, Aug 22, 2021 at 7:14 AM Chris Angelico wrote:
> On Mon, Aug 23, 2021 at 12:08 AM Dan Stromberg
> wrote:
> >
> > In 'from foo import bar':
> >
> > With the ast module, I see how to get bar, but I do not yet see how to
> get
> >
On Mon, Aug 23, 2021 at 12:08 AM Dan Stromberg wrote:
>
> In 'from foo import bar':
>
> With the ast module, I see how to get bar, but I do not yet see how to get
> the foo.
>
> There are clearly ast.Import and ast.ImportFrom, but I do not see the foo
> part in
In 'from foo import bar':
With the ast module, I see how to get bar, but I do not yet see how to get
the foo.
There are clearly ast.Import and ast.ImportFrom, but I do not see the foo
part in ast.ImportFrom.
?
Thanks!
--
https://mail.python.org/mailman/listinfo/python-list
Spot on!! Thank you very much, am back on track with your aid
On Sat, Nov 28, 2020 at 9:23 PM MRAB wrote:
> On 2020-11-28 15:59, A. M. Thomas [PETech MIET MBA] wrote:
> > Kindly guide on how to solve this problem from Python3.9 with pycharm.
> See
> > the below
> >
&g
On 2020-11-28 15:59, A. M. Thomas [PETech MIET MBA] wrote:
Kindly guide on how to solve this problem from Python3.9 with pycharm. See
the below
import numpy as np
import pandas as pd
from pandas import series
object = series([5,10,15,20])
print (object)
C:\Users\THOMAS\AppData\Local\Programs
Kindly guide on how to solve this problem from Python3.9 with pycharm. See
the below
import numpy as np
import pandas as pd
from pandas import series
object = series([5,10,15,20])
print (object)
C:\Users\THOMAS\AppData\Local\Programs\Python\Python39\python.exe
C:/Users/THOMAS/PycharmProjects
My import function mysteriously stop working. Is there a way to restore it as I
need the second screen to see the turtle move when I command it from python
3.8.5 shell but when I hit enter nothing happens.
--
https://mail.python.org/mailman/listinfo/python-list
>
> import pandas; pd = pandas
>
> >df = pd.from_csv (...)
> >from selenium import webdriver
>
> import selenium.webdriver; webdriver = selenium.webdriver
>
Thank you, this works.
--
https://mail.python.org/mailman/listinfo/python-list
On Aug 9, 2020 11:41 AM, "Mats Wichmann" wrote:
>
> On 8/9/20 12:51 AM, Gabor Urban wrote:
> > Hi guys,
> >
> > I have a quite simple question but I could not find the correct answer.
> >
> > I have twoo modules A and B. A imports B. If I import A in
Hi guys,
Thanks for the answers. IT is clear Noé.
Gábor
--
https://mail.python.org/mailman/listinfo/python-list
Jason Friedman wrote at 2020-8-8 21:23 -0600:
> ...
>The cherry-on-top would be to import with the "aliasing" and "from" they
>will most likely see on the web, so that my code matches what they see
>there. In other words, instead of:
>
>import pandas
>df
On 8/9/20 12:51 AM, Gabor Urban wrote:
> Hi guys,
>
> I have a quite simple question but I could not find the correct answer.
>
> I have twoo modules A and B. A imports B. If I import A in a script, Will
> be B imported automatically? I guess not, but fő not know exactly.
&g
Gabor Urban writes:
> Hi guys,
>
> I have a quite simple question but I could not find the correct answer.
>
> I have twoo modules A and B. A imports B. If I import A in a script, Will
> be B imported automatically? I guess not, but fő not know exactly.
>
> Thanks fo
Hi guys,
I have a quite simple question but I could not find the correct answer.
I have twoo modules A and B. A imports B. If I import A in a script, Will
be B imported automatically? I guess not, but fő not know exactly.
Thanks for your answer ín advance,
Gábor
--
https://mail.python.org
On Sun, Aug 9, 2020 at 1:25 PM Jason Friedman wrote:
>
> I have some code I'm going to share with my team, many of whom are not yet
> familiar with Python. They may not have 3rd-party libraries such as pandas
> or selenium installed. Yes I can instruct them how to install, but the path
> of least
is to have my code to check for missing dependencies
and attempt to install for them. This code works as desired:
import importlib
import subprocess
PIP_EXE = "/opt/python/bin/pip3"
for module_name in ("module1", "module2", "module3"):
try:
imp
ncies
and attempt to install for them. This code works as desired:
import importlib
import subprocess
PIP_EXE = "/opt/python/bin/pip3"
for module_name in ("module1", "module2", "module3"):
try:
importlib.import_module(module_name)
except Mod
Am 29.07.20 um 23:01 schrieb Chris Green:
Even more annoying is that most of what's in pyscand.so is constants,
there's only a couple of functions in there, so there's very little to
it really.
If there are really only constants, you could import it into Python 2
and dump the co
Christian Heimes wrote:
> On 29/07/2020 15.34, Chris Green wrote:
> > I have some Python Gtk 2 code I'm trying to convert to Python
> > pygobject GTK 3.
> >
> > However I'm stuck on an import statement that fails:-
> >
> >
On 29/07/2020 15.34, Chris Green wrote:
> I have some Python Gtk 2 code I'm trying to convert to Python
> pygobject GTK 3.
>
> However I'm stuck on an import statement that fails:-
>
> import pyscand
>
>
> The error message is:-
>
> File &quo
> pyscand is a .so file so I fear I may be a bit stuffed unless I can
> find the source code for it.
> ...
> In fact looking for this error it seems that is is a Python version
> mismatch error and I need to recompile pyscand.so against Python 3. Is
> there no way to sort of convert it to Python 3
I have some Python Gtk 2 code I'm trying to convert to Python
pygobject GTK 3.
However I'm stuck on an import statement that fails:-
import pyscand
The error message is:-
File "/usr/libexec/okimfputl.new/guicom.py", line 66, in
import pyscand
Impor
Liste guru wrote:
> Il 24/07/2020 10:31, Chris Green ha scritto:
>
>
> ...
>
> > I'm a *fairly* competant Python programmer so, if I have to, I
> > willconsider converting from using the gtk module to using the gi
> > module,are there any good tutorials which might help me down this road?
lt python and the Oki software no
> longer runs.
>
> The error I am getting is:-
>
> chris@esprimo$ ./scantool.py
> Traceback (most recent call last):
> File "./scantool.py", line 52, in
> import gtk
> ImportError: No module named gt
Il 24/07/2020 10:31, Chris Green ha scritto:
...
I'm a *fairly* competant Python programmer so, if I have to, I
willconsider converting from using the gtk module to using the gi
module,are there any good tutorials which might help me down this road?
If you look at the pygobject docum
hanges to code beyond the usual 2to3
> Python migration.
>
So is that what I'm getting by installing the things noted above.
I.e. 'import pygtk' is importing GObject things whereas 'import gtk'
is after the older stuff.
I'm a *fairly* competant Python programmer so
is
accessed via something called GObject Introspection (module "gi")
which requires significant changes to code beyond the usual 2to3
Python migration.
You might be able to get the program working using pygtkcompat.
Try inserting these lines near the beginning of the program:
fro
I am getting is:-
chris@esprimo$ ./scantool.py
Traceback (most recent call last):
File "./scantool.py", line 52, in
import gtk
ImportError: No module named gtk
So what do I need to install on my Ubuntu 20.04 system to provide the
gtk module?
Alternatively (
Hi Peter,
Thank you for your inputs. This really helped me.
Thanks!
--
CONFIDENTIALITY. This email and any attachments are confidential to Alef
Edge Inc., and may also be privileged, except where the email states it can
be disclosed. If this email is received in error, please do not disclos
y
> └── run.py
>
> In my run.py file, I want to import everything from test.py(contains
> methods).
>
> I have found relative path for test.py as "p.q".
> I tried with exec() to import as : exec("from p.q import *"),
> but this
Hi,
I am a beginner to Python. I want to achieve the following:
My directory structure:
a
└── b
└── c
├── p
│ └── q
│ └── test.py
└── x
└── y
└── run.py
In my run.py file, I want to import everything from test.py(contains
The (rightful) obsession with modules in PEP-451 and the import machinery hit
me with a gotcha when I was trying to implement importing .NET stuff that
mimicked IronPython and Python.NET in my interpreter project.
The meat of the question:
Is it important that the spec loader actually return a
thons-import-machinery-works
And eventually just started looking at PEP 451. Neither is really explaining
relative imports. I decided to try this garbage:
from importlib.util import spec_from_loader, module_from_spec
from importlib.machinery import SourceFileLoader
spec = spec_from_l
On Sun, Apr 19, 2020 at 7:40 AM Adam Preble wrote:
>
> On Saturday, April 18, 2020 at 1:15:35 PM UTC-5, Alexandre Brault wrote:
> > >>> def f():
> > ... â â from sys import path, argv ...
>
> So I figured it out and all but I wanted to ask about the special c
On Sun, Apr 19, 2020 at 7:36 AM Adam Preble wrote:
>
> On Friday, April 17, 2020 at 1:37:18 PM UTC-5, Chris Angelico wrote:
> > The level is used for package-relative imports, and will basically be
> > the number of leading dots (eg "from ...spam import x" will ha
On Saturday, April 18, 2020 at 1:15:35 PM UTC-5, Alexandre Brault wrote:
> >>> def f():
> ... â â from sys import path, argv ...
So I figured it out and all but I wanted to ask about the special characters in
that output. I've seen that a few times and never figured out
On Friday, April 17, 2020 at 1:37:18 PM UTC-5, Chris Angelico wrote:
> The level is used for package-relative imports, and will basically be
> the number of leading dots (eg "from ...spam import x" will have a
> level of 3). You're absolutely right with your an
On 2020-04-17 2:22 p.m., Adam Preble wrote:
Given this in Python 3.6.8:
from dis import dis
def import_from_test():
from sys import path
dis(import_from_test)
2 0 LOAD_CONST 1 (0)
2 LOAD_CONST 2 (('path',))
On Sat, Apr 18, 2020 at 4:26 AM Adam Preble wrote:
>
> Given this in Python 3.6.8:
>
> from dis import dis
>
> def import_from_test():
>from sys import path
>
> >>> dis(import_from_test)
> 2 0 LOAD_CONST 1 (0)
>
IMPORT_FROM pushes the module back on to the stack afterwards so that
multiple import-from's can be executed off of it. This is then terminated with
a POP_TOP:
>>> def import_from_multi():
... from sys import path, bar
...
>>> dis(import_from_multi)
2
Given this in Python 3.6.8:
from dis import dis
def import_from_test():
from sys import path
>>> dis(import_from_test)
2 0 LOAD_CONST 1 (0)
2 LOAD_CONST 2 (('path',))
4 IMPORT_NAME 0 (s
This application has 8 data entry/edit view modules of tkinter widgets and
an additional module called commonDlg which is imported into each of the
others.
Each view module has a comments tk.Text widget:
self.inputs['Notes'] = cd.LabelInput(
taxoninfo, "notes",
input_class
Dieter Maurer wrote:
> Stephan Lukits wrote at 2020-3-31 17:44 +0300:
>>background:
>>
>>- a daemon creates package p1 (e.g. directory with __init__.py-file) and
>>in p1 a module m1 is created.
>>
>>- Then the daemon wants to import from m1, which functions
On 3/31/20 8:00 PM, Dieter Maurer wrote:
Stephan Lukits wrote at 2020-3-31 17:44 +0300:
background:
- a daemon creates package p1 (e.g. directory with __init__.py-file) and
in p1 a module m1 is created.
- Then the daemon wants to import from m1, which functions (so far all
the time
On 3/31/20 9:01 PM, Pieter van Oostrum wrote:
"Dieter Maurer" writes:
Stephan Lukits wrote at 2020-3-31 17:44 +0300:
background:
- a daemon creates package p1 (e.g. directory with __init__.py-file) and
in p1 a module m1 is created.
- Then the daemon wants to import from
Pieter van Oostrum writes:
>
> The first import creates a file __pycache__ in the directory p1.
That should be 'a directory __pycache__'
> To remove it use rmtree(path.join(P1,'__pycache__'))
> Then the second import will succeed.
> --
> Pieter van Oostr
"Dieter Maurer" writes:
> Stephan Lukits wrote at 2020-3-31 17:44 +0300:
>>background:
>>
>>- a daemon creates package p1 (e.g. directory with __init__.py-file) and
>>in p1 a module m1 is created.
>>
>>- Then the daemon wants to impor
Stephan Lukits wrote at 2020-3-31 17:44 +0300:
>background:
>
>- a daemon creates package p1 (e.g. directory with __init__.py-file) and
>in p1 a module m1 is created.
>
>- Then the daemon wants to import from m1, which functions (so far all
>the time).
>
>- Then a mod
Hello,
background:
- a daemon creates package p1 (e.g. directory with __init__.py-file) and
in p1 a module m1 is created.
- Then the daemon wants to import from m1, which functions (so far all
the time).
- Then a module m2 is created in p1 and the daemon wants to import from
m2 which
I'm not a professional coder. I'm an environmental consultant and I use a
I take it all back then...
No! No need to feel apologetic, the Python community works hard to be
inclusive - which I take to include levels of expertise, not merely
countering the various "-isms".
variety of tools de
On Fri, 27 Mar 2020, DL Neil via Python-list wrote:
My personal approach is to follow 'the Zen of Python' and prefer
"explicit" over "implicit". (it helps beginners, as well as us old-fogies
whose minds cannot retain things for very long)
DL,
That was my original approach.
I see little poin
Some classes in commonDlgs imports other modules.
My question is whether to import into each view class those modules needed
by it or import all supporting modules at the top of commonDlgs.py, then
import that module in each view with:
from . import commonDlgs as cd
rather than importing specific cl
On Thu, 26 Mar 2020, Schachner, Joseph wrote:
I can only tell you my preference. I prefer that Python modules be as
self-contained as possible, because "global" is within a module; to share
between modules you have to import something, as you know.
Joseph,
This makes good sense. I
stion is whether to import into each view class those modules needed
by it or import all supporting modules at the top of commonDlgs.py, then
import that module in each view with:
from . import commonDlgs as cd
rather than importing specific classes in each view module?
Rich
--
https://mail.pytho
PYTHONPATH to this lib
> > dir, but rtmidi/__init__.py gives the following error:
> >
> > Traceback (most recent call last):
> > File "main.py", line 6, in
> > from pkmidicron import MainWindow, util, ports
> > File "/Users/patrick/dev/pkm
t PYTHONPATH to this lib dir,
> but rtmidi/__init__.py gives the following error:
>
> Traceback (most recent call last):
> File "main.py", line 6, in
> from pkmidicron import MainWindow, util, ports
> File "/Users/patrick/dev/pkmidicron/pkmidicron/__init
t PYTHONPATH to this lib dir,
> but rtmidi/__init__.py gives the following error:
>
> Traceback (most recent call last):
> File "main.py", line 6, in
> from pkmidicron import MainWindow, util, ports
> File "/Users/patrick/dev/pkmidicron/pkmidicron/__init
tmidi.cpython-36dm-darwin.so. I have set PYTHONPATH to this lib dir,
> but rtmidi/__init__.py gives the following error:
>
> Traceback (most recent call last):
> File "main.py", line 6, in
>from pkmidicron import MainWindow, util, ports
> File "/Users/patrick
/__init__.py gives the following error:
Traceback (most recent call last):
File "main.py", line 6, in
from pkmidicron import MainWindow, util, ports
File "/Users/patrick/dev/pkmidicron/pkmidicron/__init__.py", line 1, in
from .mainwindow import *
File "/Use
1 - 100 of 4247 matches
Mail list logo