Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #4757
| From | Hermann Riemann <nospam.ng@hermann-riemann.de> |
|---|---|
| Newsgroups | de.comp.lang.python |
| Subject | Re: import Problem |
| Date | 2017-04-28 14:48 +0200 |
| Message-ID | <emgs0iFp2fuU1@mid.individual.net> (permalink) |
| References | <emg3qcFkefeU1@mid.individual.net> |
Am 28.04.2017 um 07:55 schrieb Hermann Riemann:
Aktueller Stand:
#---------------------------- globale_funktionen.py
import globale_variable
g=globale_variable.variablen
def f():
g.x=1
#---------------------------- globale_variable.py
class Globale_Variablen:
def __init__(self):
self.x=0
def f(self): f()
variablen=Globale_Variablen()
from globale_funktionen import *
import initialisiere
#---------------------------- initialisiere.py
import globale_variable
g=globale_variable.variablen
g.f()
#---------------------------- test.py
import globale_variable
g=globale_variable.variablen
print(g.x)
Hermann
der die Verzögerungen durch
def f(self): f()
in Kauf nimmt.
--
http://www.hermann-riemann.de
Back to de.comp.lang.python | Previous | Next — Previous in thread | Find similar
import Problem Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-04-28 07:55 +0200
Re: [Python-de] import Problem Christopher Arndt <chris@chrisarndt.de> - 2017-04-28 08:45 +0200
Re: [Python-de] import Problem Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-04-28 09:07 +0200
Re: [Python-de] import Problem Peter Otten <__peter__@web.de> - 2017-04-28 09:44 +0200
Re: [Python-de] import Problem Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-04-28 11:33 +0200
Re: [Python-de] import Problem Peter Otten <__peter__@web.de> - 2017-04-28 12:48 +0200
Re: [Python-de] import Problem Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-04-28 13:21 +0200
Re: [Python-de] import Problem Peter Otten <__peter__@web.de> - 2017-04-28 14:48 +0200
Re: import Problem Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-04-28 14:48 +0200
csiph-web