Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-08 Thread Egon Frerich via Python-list
i[fLG2], i[fTYP]) for i in Felder])    File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder]) NameError: name 'fCONV_AUSRICHTG' is not defined You see "Felder" and

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Greg Ewing via Python-list
On 8/11/23 8:10 am, MRAB wrote: Something to do with how scoping is implemented in comprehensions? Yes, together with the way class scopes work during class construction. Behind the scenes, the body of a listcomp happens to be implemented as a nested function. Usually you don't notice this, b

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread MRAB via Python-list
On 2023-11-07 20:56, Thomas Passin via Python-list wrote: On 11/7/2023 3:29 PM, MRAB via Python-list wrote: On 2023-11-07 19:20, Jim Schwartz via Python-list wrote: Where do you define fCONV_AUSRICHTG? It must be initialized or defined somewhere. Did you leave out a statement from the python 2

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Thomas Passin via Python-list
27;', 'right', 'center'], ['Belegnr', 5, 7, 's', '', 'right', 'center'], ['Bank', 2, 4, 'u', '', 'center', 'center'], ['Art', 2, 3, 'u', '', 

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread MRAB via Python-list
Aufg', 2, 4, 'u', '', 'center', 'center'], ['Text', 25, 25, 's', '-', 'left', 'left'], ['Ergänzung', 12, 12, 's', '-', 'left', 'left'], [&#x

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Jim Schwartz via Python-list
ght', 'center'], ['Monat', 2, 5, 'u', '', >> 'right', 'center'], ['Tag', 2, 3, 'u', '', 'right', 'center'], ['Belegnr', >> 5, 7, 's', '', 

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread MRAB via Python-list
e/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in     ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder]) NameError: name 'fCONV_AUSRICHTG' is not defined You see "Felder" and with "0 0 3 4" the correct value 4 for f

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Thomas Passin via Python-list
x27;, 'center'], ['Art', 2, 3, 'u', '', 'center', 'center'], ['Aufg', 2, 4, 'u', '', 'center', 'center'], ['Text', 25, 25, 's', '-', 'left', 

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread dn via Python-list
ig.py", line 90, in     ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder]) NameError: name 'fCONV_AUSRICHTG' is not defined You see "Felder" and with "0 0 3 4" the correct value 4 for fCONV_AUSRICHTG. But there is the NameError. Wh

fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Egon Frerich via Python-list
enter'], ['Aufg', 2, 4, 'u', '', 'center', 'center'], ['Text', 25, 25, 's', '-', 'left', 'left'], ['Ergänzung', 12, 12, 's', '-', 'left', 'left'], ['Betrag', 13, 13, 's', '', 'right', 'right'], ['W', 1, 2, 's', '', 'center', 'center'], ['WBetrag', 7, 7, 's', '', 'right', 'right'], ['Kurs', 6, 6, 's', '', 'right', 'right']] 0 0 3 4 Traceback (most recent call last):   File "/home/egon/Entw/Geldspur/geldspur/testGeldspurGUI.py", line 15, in     from tests.testU2 import testU2   File "/home/egon/Entw/Geldspur/geldspur/tests/testU2.py", line 9, in     from gui.GUI_Konfig import GUIcfg   File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 11, in     class GUIcfg:   File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in GUIcfg     ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder])   File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in     ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder]) NameError: name 'fCONV_AUSRICHTG' is not defined You see "Felder" and with "0 0 3 4" the correct value 4 for fCONV_AUSRICHTG. But there is the NameError. What does mean? Is there a change from python2 to python3? Egon -- https://mail.python.org/mailman/listinfo/python-list

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Dieter Maurer via Python-list
Loris Bennett wrote at 2023-10-27 09:29 +0200: > ... >For the application with the system Python this mechanism works, but for >the non-system Python I get the error: > > NameError: name '__version__' is not defined If you get exceptions (they usually end in `Error` (su

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
port importlib_metadata >> >> __version__ = importlib_metadata.version(__name__) >> >> For the application with the system Python this mechanism works, but for >> the non-system Python I get the error: >> >> NameError: name '__versio

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
For the application with the system Python this mechanism works, but for > the non-system Python I get the error: > > NameError: name '__version__' is not defined > > For the 3.6 application I have > > PYTHONPATH=/nfs/local/lib/python3.6/site-packages >

NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
: NameError: name '__version__' is not defined For the 3.6 application I have PYTHONPATH=/nfs/local/lib/python3.6/site-packages PYTHONUSERBASE=/nfs/local PYTHON_VERSION=3.6 PYTHON_VIRTUALENV= and for the 3.10 application I have PYTHONPATH=/nfs/easybuild/software/Python/3.10

Re: name 'sys' is not defined

2019-12-30 Thread Pieter van Oostrum
gt; --> 120 self.binary = os.path.join(sys.prefix, "bin", "treemix") > 121 self.binary = (binary if binary else self.binary) > 122 self.raise_root_error = raise_root_error > > NameError: name 'sys' is not defined As t

Re: name 'sys' is not defined

2019-12-29 Thread Frank Millman
On 2019-12-30 7:20 AM, safiq...@gmail.com wrote: Deal all, Could you please help me how can I avoid this problem my Jupyter Notebook code was help pls [snip] NameError: name 'sys' is not defined I know nothing about Jupyter Notebook but somewhere, usually at the top, you have t

name 'sys' is not defined

2019-12-29 Thread safiq713
self.raise_root_error = raise_root_error NameError: name 'sys' is not defined -- https://mail.python.org/mailman/listinfo/python-list

Re: NameError: name 'msvcrt' is not defined

2019-09-26 Thread MRAB
On 2019-09-27 03:14, Hongyi Zhao wrote: Hi, I use python on Debian, when running some python codes, I meet the following error: --- input_username.py", line 18, in read_input if msvcrt.kbhit(): NameError: name 'msvcrt' is not defined How to solve th

NameError: name 'msvcrt' is not defined

2019-09-26 Thread Hongyi Zhao
Hi, I use python on Debian, when running some python codes, I meet the following error: --- input_username.py", line 18, in read_input if msvcrt.kbhit(): NameError: name 'msvcrt' is not defined How to solve this issue? -- https://mail.python.org/m

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Thank you sir. I think you may be on to something there. I've done mainframe, machine, 3GL, and 4GL languages, but the last couple I've taken on have given me headaches. I guess I'll have to just read a bunch first and then try and write something simpler than what I'm attempting to take on...

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 3:49 PM, DL Neil wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects - https://www.l

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects - https://www.learnpython.org/en/Classes_and_Objects

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 2:28 PM, DL Neil wrote: Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ ..

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
urerName = "Glock" print(MyWeapon.printWeaponInfo()) Results: python3 ./weaponTest.py Traceback (most recent call last):   File "./weaponTest.py", line 1, in     import class_weapon   File "/home/jack/Py/weaponTrack/class_weapon.py", line

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
manufacturerName >>> >>> def printWeaponInfo(self): >>> infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId, >>> self.manufacturerName) >>> return infoString >>> >>> >>> >>>

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
= "Glock" print(MyWeapon.printWeaponInfo) executing 'python3 weaponTrack.py' results in this bailing on the first element in the class with "not defined". I've been staring at templates of this exact structure for about an hour try

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
quot; % (self.weaponId, >> self.manufacturerName) >> return infoString >> >> >> >> import class_weapon >> >> MyWeapon=weapon() >> MyWeapon.weaponId = 100 >> MyWeapon.manufacturerName = "Glock" >> >> print(MyWeapo

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
weaponId = 100 MyWeapon.manufacturerName = "Glock" print(MyWeapon.printWeaponInfo) executing 'python3 weaponTrack.py' results in this bailing on the first element in the class with "not defined". I've been staring at templates of this exact

Re: Not Defined error in basic code

2019-03-14 Thread Jason Friedman
return infoString > > > > import class_weapon > > MyWeapon=weapon() > MyWeapon.weaponId = 100 > MyWeapon.manufacturerName = "Glock" > > print(MyWeapon.printWeaponInfo) > > executing 'python3 weaponTrack.py' results in this bailing on the firs

Re: Not Defined error in basic code

2019-03-14 Thread Dan Sommers
3 weaponTrack.py' results in this bailing on the first element in the class with "not defined". I've been staring at templates of this exact structure for about an hour trying to figure out why this isn't running at all. Is it simply because it isn't all in one f

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
ot; > > print(MyWeapon.printWeaponInfo) > > executing 'python3 weaponTrack.py' results in this bailing on the first > element in the class with "not defined". I've been staring at templates > of this exact structure for about an hour trying to figure out

Not Defined error in basic code

2019-03-14 Thread Jack Dangler
rt class_weapon MyWeapon=weapon() MyWeapon.weaponId = 100 MyWeapon.manufacturerName = "Glock" print(MyWeapon.printWeaponInfo) executing 'python3 weaponTrack.py' results in this bailing on the first element in the class with "not defined". I've been staring at te

Re: python3.7 error PYQT5 - NameError: name 'self' is not defined

2018-09-21 Thread Christopher Mullins
> > Hi when I disconnect the internet I get an error NameError: name 'self' is > not defined. I really dont get it.. thanks all. Is that a bug? or my fault? Exception in thread Thread-1: > Traceback (most recent call last): > File "C:\programming Alon\stock market

python3.7 error PYQT5 - NameError: name 'self' is not defined

2018-09-21 Thread alon . najman
Hi when I disconnect the internet I get an error NameError: name 'self' is not defined. I really dont get it.. thanks all. Is that a bug? or my fault? Exception in thread Thread-1: Traceback (most recent call last): File "C:\programming Alon\stock market app\PROJECT\AlonStockM

Re: name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__"

2018-08-09 Thread Steven D'Aprano
On Fri, 10 Aug 2018 08:15:09 +0200, Karsten Hilbert wrote: > On Fri, Aug 10, 2018 at 12:24:25AM +0800, xuanwu348 wrote: > >> Yes, move the code from positionA(can run normally) to >> positionB(exception with name undefined) I find this content >> "https://docs.python.org/3.3/tutorial/classes.html

Re: Re: name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__"

2018-08-09 Thread Karsten Hilbert
On Fri, Aug 10, 2018 at 12:24:25AM +0800, xuanwu348 wrote: > Yes, move the code from positionA(can run normally) to positionB(exception > with name undefined) > I find this content > "https://docs.python.org/3.3/tutorial/classes.html#python-scopes-and-namespaces"; > But I still don't undewrstand

回复: Re: name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__"

2018-08-09 Thread jinliang
Thanks, I think I get the answer. thanks all, have a good day! 从三星移动设备发送 原始邮件 发件人: MRAB 日期:2018-08-10 03:05 (GMT+08:00) 收件人: python-list@python.org 主题: Re: name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__&q

Re: name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__"

2018-08-09 Thread MRAB
On 2018-08-09 16:16, xuanwu348 wrote: Hi team Good day The problem I meet when I add "aLOCK = threading.RLock()" to PositionB, the program will report error "name 'aLOCK' is not defined ", but when I change this code to PositionA, it can run normally, is ther

Re:Re: name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__"

2018-08-09 Thread xuanwu348
, 2018 at 11:16:37PM +0800, xuanwu348 wrote: > >> The problem I meet when I add "aLOCK = threading.RLock()" to PositionB, the >> program will report error "name 'aLOCK' is not defined ", > >You mean to say: *move*, not *add*. > >That is why aLoc

Re: name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__"

2018-08-09 Thread Karsten Hilbert
On Thu, Aug 09, 2018 at 11:16:37PM +0800, xuanwu348 wrote: > The problem I meet when I add "aLOCK = threading.RLock()" to PositionB, the > program will report error "name 'aLOCK' is not defined ", You mean to say: *move*, not *add*. That is why aLock is out

name 'aLOCK' is not defined When I add aLOCK = threading.RLock() behind if __name__ == "__main__"

2018-08-09 Thread xuanwu348
Hi team Good day The problem I meet when I add "aLOCK = threading.RLock()" to PositionB, the program will report error "name 'aLOCK' is not defined ", but when I change this code to PositionA, it can run normally, is there any difference for the code between &#x

Output not defined

2018-06-01 Thread jonas . thornvall
Can any web programmer tell me why output is not defined? I know this is python group but my code is so rudimentary that probably any sufficient good webprogrammer can figure it out, but i am lost."I've tried comp.lang.javascript" Problem is I've looked upon this for a wee

Re: class inheritance when not defined

2017-09-08 Thread Ben Finney
Steve D'Aprano writes: > Good way: > > Foreigner speaking English as their second language: > "Who is the father of this class?" > > Native English speaker: > "The father is 'object', but in English we would normally ask > 'what is the parent?' instead." Of the three scenario

Re: class inheritance when not defined

2017-09-08 Thread Steve D'Aprano
On Fri, 8 Sep 2017 07:03 pm, Ben Finney wrote: >> Who is the father of ExampleClass1 ? > > No-one, since classes do not have gender. (The convention is to use the > gender-neutral “parent” to refer to that relationship.) Possibly not the case in Russia. Besides, words have gender in many langua

Re: class inheritance when not defined

2017-09-08 Thread Ben Finney
Andrej Viktorovich writes: > I found several class creation samples: > > class ExampleClass1: > > class ExampleClass2(object): > > > What is difference between them? Very little difference. In Python 3, both create classes that inherit from one other class, ‘object’. In Python 2, the first cre

Re: class inheritance when not defined

2017-09-08 Thread Thomas Jollans
On 2017-09-08 10:17, Andrej Viktorovich wrote: > Hello > > I found several class creation samples: > > class ExampleClass1: > > class ExampleClass2(object): > > > What is difference between them? Who is the father of ExampleClass1 ? > In Python 3, unless you've redefined "object", these are

class inheritance when not defined

2017-09-08 Thread Andrej Viktorovich
Hello I found several class creation samples: class ExampleClass1: class ExampleClass2(object): What is difference between them? Who is the father of ExampleClass1 ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Don't understand a probleme of module time not defined when calling a foo func

2016-05-31 Thread Ni Va
ne 16, in PyExecReplace > > File "", line 22, in > > File "", line 11, in foo > > NameError: global name 'time' is not defined > > > > Based on your traceback it looks like the problem is actually not in your > code, but in the way you

Re: Don't understand a probleme of module time not defined when calling a foo func

2016-05-30 Thread Matt Wheeler
On Mon, 30 May 2016, 21:08 Ni Va, wrote: > > _ > Output: > Traceback (most recent call last): > File "", line 1, in > File "", line 16, in PyExecReplace > File "", line 22, in > File "", line 11, in foo

Don't understand a probleme of module time not defined when calling a foo func

2016-05-30 Thread Ni Va
, line 16, in PyExecReplace File "", line 22, in File "", line 11, in foo NameError: global name 'time' is not defined -- https://mail.python.org/mailman/listinfo/python-list

Re: 'open' is not defined

2015-07-31 Thread dieter
writes: > What about using the append function to remove duplicate outputs entered on > or thereafter line no. 9, i.e., As far as I know, "append" does not have intelligence in this respect. Thus, if you need intelligence, your program must implement it. In cases like yours, I use a) added

Re: 'open' is not defined

2015-07-30 Thread ltc.hotspot
: dieter Sent: ‎Thursday‎, ‎July‎ ‎30‎, ‎2015 ‎11‎:‎22‎ ‎PM To: python-list@python.org writes: > ... > Why is open not defined in the following code:NameError: name 'open' is not > defined > > Code reads as follows: > > fname = raw_input("Enter file name: &q

Re: 'open' is not defined

2015-07-30 Thread dieter
writes: > ... > Why is open not defined in the following code:NameError: name 'open' is not > defined > > Code reads as follows: > > fname = raw_input("Enter file name: ") > if len(fname) < 1 : fname = "mbox-short.txt" > fh = open(fname

'open' is not defined

2015-07-30 Thread ltc.hotspot
Hi Everyone: Why is open not defined in the following code:NameError: name 'open' is not defined Code reads as follows: fname = raw_input("Enter file name: ") if len(fname) < 1 : fname = "mbox-short.txt" fh = open(fname) count = 0 for line

Re: NameError: name 'requests' is not defined ?

2014-07-27 Thread Steven D'Aprano
On Mon, 28 Jul 2014 11:52:03 +0800, 水静流深 wrote: > there is a simple file `mydown.py` saved in > `D:\Python34\Lib\site-packages` > there is only one line in mydown.py . > > import requests Just because mydown has imported requests, doesn't mean it is visible everywhere. Each module is a sepa

Re: NameError: name 'requests' is not defined ?

2014-07-27 Thread Miki Tebeka
Greetings, > there is only one line in mydown.py . >   > > import requests   > ... > >>> import mydown > >>> requests.get(url) > > Traceback (most recent call last): > >   File "", line 1, in > > NameError: name 'reque

Re: NameError: name 'requests' is not defined ?

2014-07-27 Thread Dan Stromberg
, '__cached__', '__doc__', '__file__', '__loader__', > '__name__', > '__package__', '__spec__', 'requests'] >>>> url='http://quote.eastmoney.com/hk/0.html?StockCode=0' >

NameError: name 'requests' is not defined ?

2014-07-27 Thread 水静流深
_package__', '__spec__', 'requests'] >>> url='http://quote.eastmoney.com/hk/0.html?StockCode=0' >>> requests.get(url) Traceback (most recent call last): File "", line 1, in NameError: name 'requests' is not defined why it run into "NameError: name 'requests' is not defined"?‍-- https://mail.python.org/mailman/listinfo/python-list

Re: NameError: name 'pyver' is not defined

2014-03-06 Thread Pavan Rikhi
On Wed, Mar 05, 2014 at 10:53:46PM -0800, שולמית מירל wrote: > execfile(configfile,globals()) You could replace the above line in cvstop4lib.py with the following: exec(open(configfile).read(), globals()) signature.asc Description: GnuPG Digital Signature -- https://mail.python.org/mailman

Re: NameError: name 'pyver' is not defined

2014-03-06 Thread שולמית מירל
I tried first to run the script under 2.6 version, but than the "argparse" was missing. I couldn't find python 2.7 for unix download -- https://mail.python.org/mailman/listinfo/python-list

Re: NameError: name 'pyver' is not defined

2014-03-06 Thread שולמית מירל
בתאריך יום חמישי, 6 במרץ 2014 10:26:34 UTC+2, מאת Ned Deily: > In article , ?AIOE??OE?I wrote: > We have python 2.6 & 3.2 installed on Sun solaris. > When running py utility, we get the below error: > > "NameError: global name 'execfile' is not defined&quo

Re: NameError: name 'pyver' is not defined

2014-03-06 Thread Ned Deily
In article , Ned Deily wrote: > execfile() no long exists in Python 3 so chances are you are trying to > run a Python 3 program with Python 2. Try running the script explicitly > under Python 2: Er, "trying to run a Python 2 program with Python 3", of course. -- Ned Deily, n...@acm.org -

Re: NameError: name 'pyver' is not defined

2014-03-06 Thread Ned Deily
In article , ?AIOE??OE?I wrote: > We have python 2.6 & 3.2 installed on Sun solaris. > When running py utility, we get the below error: > > "NameError: global name 'execfile' is not defined" > > > > p4convert-cvs.py > EXCEPTION: [Errno 17]

Re: NameError: name 'pyver' is not defined

2014-03-06 Thread Steven D'Aprano
On Wed, 05 Mar 2014 22:53:46 -0800, שולמית מירל wrote: > Hello, > > We have python 2.6 & 3.2 installed on Sun solaris. When running py > utility, we get the below error: > > "NameError: global name 'execfile' is not defined" Sounds like you are

NameError: name 'pyver' is not defined

2014-03-05 Thread שולמית מירל
Hello, We have python 2.6 & 3.2 installed on Sun solaris. When running py utility, we get the below error: "NameError: global name 'execfile' is not defined" > p4convert-cvs.py EXCEPTION: [Errno 17] File exists: './LOGS' Traceback (most recent call last)

Re: NameError: global name '' is not defined , but a bit differences

2013-09-05 Thread Mohsen Pahlevanzadeh
On Wed, 2013-09-04 at 22:38 -0700, Benjamin Kaplan wrote: > On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh > wrote: > > Dear all , > > > > i get the error : > > > > NameError: global name 'ui' is not defined > > > > Complete questi

Re: NameError: global name '' is not defined , but a bit differences

2013-09-05 Thread Terry Reedy
On 9/5/2013 1:38 AM, Benjamin Kaplan wrote: On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh wrote: i get the error : NameError: global name 'ui' is not defined Complete question is at : http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-d

Re: NameError: global name '' is not defined , but a bit differences

2013-09-04 Thread Benjamin Kaplan
On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh wrote: > Dear all , > > i get the error : > > NameError: global name 'ui' is not defined > > Complete question is at : > http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-bu

NameError: global name '' is not defined , but a bit differences

2013-09-04 Thread Mohsen Pahlevanzadeh
Dear all , i get the error : NameError: global name 'ui' is not defined Complete question is at : http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-differences Before answering, Thank you for your attention...! Yours, Mohsen -- https://mail.

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread Chris Angelico
On Thu, Sep 6, 2012 at 10:07 PM, shaun wrote: > Hi Chris, > > I'm changing it into multiple classes because the script is going to get > much larger its more for maintainability reasons rather than functionality > reasons. Doesn't necessarily have to be multiple classes. Python gives you t

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread shaun
Hi Chris, I'm changing it into multiple classes because the script is going to get much larger its more for maintainability reasons rather than functionality reasons. Thanks so much man it was the "self" fix you stated above. I woe you a pint of Guinness :D Thanks again, Shaun -- http:/

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread MRAB
On 06/09/2012 12:37, shaun wrote: Sorry guys here is the full code for the class: #!/usr/bin/python # Echo client program import cx_Oracle import socket import pprint from struct import * import sys from binascii import * Don't use "from something import *". It'll import a whole load of names.

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread Chris Angelico
On Thu, Sep 6, 2012 at 9:37 PM, shaun wrote: > class StringCall: > results=[] > def databasebatchcall(self,termid, batchid): > con = > cx_Oracle.connect('user/user...@odb4.dcc.company.ie/ODB4TEST.COMPANY.IE') > cur = con.cursor() > c

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread shaun
This is the code in the script im calling: batchObject=StringCall() batchObject.databasebatchcall(termid, batchid) batchObject.fetchbatchdata() batchObject.createbatchstrings() BatchHeaderPacket =batchObject.returnbatchheader() ParameterPacket =batchObject.returnparameterpacket() TrailerPacket =

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread shaun
Sorry guys here is the full code for the class: #!/usr/bin/python # Echo client program import cx_Oracle import socket import pprint from struct import * import sys from binascii import * import time import datetime class StringCall: results=[] def databasebatchcall(self,termid,

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread Peter Otten
he following error which I don't understand I'm very new to python and have no idea about this any help would be appreciated > File "/home/dcroke/mdcFDACStringCall.py", line 21, in fetchbatchdata > results = cur.fetchall() > NameError: global name 

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread Dave Angel
ne I get the following error which I don't understand I'm > >very new to python and have no idea about this any help would be appreciated > > > // > > File "/home/dcroke/mdcFDACStringCall.py&quo

Re: Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread Chris Angelico
t; > // > > File "/home/dcroke/mdcFDACStringCall.py", line 21, in fetchbatchdata > results = cur.fetchall() > NameError: global name 'cur' is not defined > >

Need help fixing this error please:NameError: global name is not defined

2012-09-06 Thread shaun
ea about this any help would be appreciated // File "/home/dcroke/mdcFDACStringCall.py", line 21, in fetchbatchdata results = cur.fetchall() NameError: global name 'cur' is not defined ///

Problem running pylons webtests. ImportError and TestController is not defined error.

2011-05-19 Thread SONAL ...
File "test_vendor.py", line 3, in class TestVendorController(TestController): exceptions.NameError: name 'TestController' is not defined * How to remove these errors??? Suggest me solution... Thanks in advance... -- http://mail.python.org/mailman/listinfo/python-list

Re: NameError: global name 'btn_Matlab' is not defined ?

2010-12-29 Thread Stef Mientki
nt locals()['btn_Matlab'] >> >> > 0x3602d28> > >> >> but if I try to print the button (at exactly the same location), I get >> an error >> >> print btn_Matlab >> >> NameError: global name 'btn_Matlab' is not defined ? &

Re: NameError: global name 'btn_Matlab' is not defined ?

2010-12-28 Thread Steven D'Aprano
the same location), I get > an error > > print btn_Matlab > > NameError: global name 'btn_Matlab' is not defined ? > > Why isn't the compiler first checking the local namespace ? any clues ? My guess is that you've declared btn_Matlab as global, a

NameError: global name 'btn_Matlab' is not defined ?

2010-12-28 Thread Stef Mientki
locals()['btn_Matlab'] > but if I try to print the button (at exactly the same location), I get an error print btn_Matlab NameError: global name 'btn_Matlab' is not defined ? Why isn't the compiler first checking the local namespace ? any clues ? thanks,

Re: Aaaargh! "global name 'eggz' is not defined"

2009-11-03 Thread Singletoned
On Oct 30, 8:53 am, Bruno Desthuilliers wrote: > Robert Kern a écrit :> On 2009-10-29 16:52 PM, Aahz wrote: > (snip) > >> Coincidentally, I tried PyFlakes yesterday and was unimpressed with the > >> way it doesn't work with "import *". > > > I consider "import *" the first error to be fixed, so it

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-31 Thread Alan Franzoni
On 10/29/09 9:48 PM, kj wrote: > How can one check that a Python script is lexically correct? You can use a pseudo-static analyzer like pyflakes, pylint or pydoctor. Or, better, you can avoid wild imports, excessive local or global namespace manipulation, and break you program in smaller parts an

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-30 Thread Fabio Zadrozny
On Thu, Oct 29, 2009 at 6:48 PM, kj wrote: > > How can one check that a Python script is lexically correct? > > As my Python apps grow in complexity and execution, I'm finding it > more often the situation in which a program dies after a lengthy > (i.e. expensive) run because the execution reaches

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-30 Thread Lie Ryan
Aahz wrote: In article , Robert Kern wrote: I like using pyflakes. It catches most of these kinds of typo errors, but is much faster than pylint or pychecker. Coincidentally, I tried PyFlakes yesterday and was unimpressed with the way it doesn't work with "import *". If only IDLE's Intell

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-30 Thread Bruno Desthuilliers
Robert Kern a écrit : On 2009-10-29 16:52 PM, Aahz wrote: (snip) Coincidentally, I tried PyFlakes yesterday and was unimpressed with the way it doesn't work with "import *". I consider "import *" the first error to be fixed, so it doesn't bother me much. :-) +1 QOTW -- http://mail.python.

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread alex23
kj wrote: > As my Python apps grow in complexity and execution, I'm finding it > more often the situation in which a program dies after a lengthy > (i.e. expensive) run because the execution reaches, say, a typo. This is a good reason for breaking your program down into testable units and verifyi

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Ben Finney
Albert Hopkins writes: > On Thu, 2009-10-29 at 17:27 -0500, Robert Kern wrote: > > I consider "import *" the first error to be fixed, so it doesn't > > bother me much. :-) > > But does pyflakes at least *warn* about the use of "import *" (I've > never used it so just asking)? That's easy enough

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Albert Hopkins
On Thu, 2009-10-29 at 17:27 -0500, Robert Kern wrote: > I consider "import *" the first error to be fixed, so it doesn't > bother me much. :-) But does pyflakes at least *warn* about the use of "import *" (I've never used it so just asking)? -- http://mail.python.org/mailman/listinfo/python-li

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: > Coincidentally, I tried PyFlakes yesterday and was unimpressed with > the way it doesn't work with "import *". That's pretty much the reason to avoid ‘from foo import *’: it makes the namespace indeterminate without actually running the code. Just as much a p

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread exarkun
On 09:52 pm, a...@pythoncraft.com wrote: In article , Robert Kern wrote: I like using pyflakes. It catches most of these kinds of typo errors, but is much faster than pylint or pychecker. Coincidentally, I tried PyFlakes yesterday and was unimpressed with the way it doesn't work with "imp

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Robert Kern
On 2009-10-29 16:52 PM, Aahz wrote: In article, Robert Kern wrote: I like using pyflakes. It catches most of these kinds of typo errors, but is much faster than pylint or pychecker. Coincidentally, I tried PyFlakes yesterday and was unimpressed with the way it doesn't work with "import *".

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Aahz
In article , Robert Kern wrote: > >I like using pyflakes. It catches most of these kinds of typo errors, but is >much faster than pylint or pychecker. Coincidentally, I tried PyFlakes yesterday and was unimpressed with the way it doesn't work with "import *". -- Aahz (a...@pythoncraft.com)

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Robert Kern
On 2009-10-29 15:48 PM, kj wrote: How can one check that a Python script is lexically correct? As my Python apps grow in complexity and execution, I'm finding it more often the situation in which a program dies after a lengthy (i.e. expensive) run because the execution reaches, say, a typo. Of

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Diez B. Roggisch
kj schrieb: How can one check that a Python script is lexically correct? As my Python apps grow in complexity and execution, I'm finding it more often the situation in which a program dies after a lengthy (i.e. expensive) run because the execution reaches, say, a typo. Of course, this typo needs

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Mick Krippendorf
kj wrote: > How can one check that a Python script is lexically correct? By using pylint. Mick. -- http://mail.python.org/mailman/listinfo/python-list

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread Daniel da Silva
There are several static analysis tools that can check whether a variable name is used before it is defined. At my old workplace we used "pylint", so I can recommend that: http://www.logilab.org/857 --Daniel -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >