Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem mit Python-Script: "global name 'sys' is not defin..

 
   Soft32 Home -> Linux -> General Discussions RSS
Next:  seltsames Netzwerkverhalten Suse 10.0  
Author Message
tiggy

External


Since: Mar 09, 2006
Posts: 14



(Msg. 1) Posted: Sat Mar 18, 2006 4:52 am
Post subject: Problem mit Python-Script: "global name 'sys' is not defined"
Archived from groups: alt>linux>suse (more info?)

Hallo zusammen,

ich have ABCTorrent aus ABC-Linux-V.2.4.3-alpha.tar.gz installiert.

Mit folgendem Script wird es aufgerufen:

#!/bin/sh
cd /opt/abc
python abc.py
rm ~/pingpong-abc* -f

Nach dem Aufruf bekomme ich folgende Fehlermeldung:

---

Traceback (most recent call last):
File "abc.py", line 967, in ?
run([""], abcpath)
File "abc.py", line 959, in run
app = ABCApp(0, params, single_instance_checker, abcpath)
File "abc.py", line 928, in __init__
wxApp.__init__(self, x)
File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py",
line 7473, in __init__
self._BootstrapApp()
File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py",
line 7125, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "abc.py", line 932, in OnInit
self.params, self.abcpath)
File "abc.py", line 697, in __init__
if (sys.platform == 'win32'):
NameError: global name 'sys' is not defined

---

Hat jemand von Euch Ahnung, was hier schief lauft?

Gruss
Tiggy
Back to top
Login to vote
Reinhard Gimbel

External


Since: Oct 29, 2005
Posts: 248



(Msg. 2) Posted: Sat Mar 18, 2006 5:52 am
Post subject: Re: Problem mit Python-Script: "global name 'sys' is not defined" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hallo Gemeinde !

tiggy schrieb:

> ich have ABCTorrent aus ABC-Linux-V.2.4.3-alpha.tar.gz installiert.
>
> Mit folgendem Script wird es aufgerufen:
>
> #!/bin/sh
> cd /opt/abc
> python abc.py
> rm ~/pingpong-abc* -f
>
> Nach dem Aufruf bekomme ich folgende Fehlermeldung:
>
> ---
>
> Traceback (most recent call last):
> File "abc.py", line 967, in ?
> run([""], abcpath)
> File "abc.py", line 959, in run
> app = ABCApp(0, params, single_instance_checker, abcpath)
> File "abc.py", line 928, in __init__
> wxApp.__init__(self, x)
> File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py",
> line 7473, in __init__
> self._BootstrapApp()
> File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py",
> line 7125, in _BootstrapApp
> return _core_.PyApp__BootstrapApp(*args, **kwargs)
> File "abc.py", line 932, in OnInit
> self.params, self.abcpath)
> File "abc.py", line 697, in __init__
> if (sys.platform == 'win32'):
> NameError: global name 'sys' is not defined
>
> ---
>
> Hat jemand von Euch Ahnung, was hier schief lauft?

So wie es aussieht, scheint es sich eher um ein Python-spezifisches
Problem zu handeln. Du dürftest eher eine Antwort in
news:de.comp.lang.python bekommen ...
--
Never give up !

Gruß, Reinhard.

Thread in "c.o.l.m": "Do we need wine ?"
The best answer: "We certainly do. A man can't drink beer all the time."
Back to top
Login to vote
karlheinz klingbeil

External


Since: Jan 23, 2006
Posts: 41



(Msg. 3) Posted: Sat Mar 18, 2006 5:56 am
Post subject: Re: Problem mit Python-Script: "global name 'sys' is not defined" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

tiggy schrub am Samstag, 18. März 2006 10:52 folgendes:

> Hallo zusammen,
>
> ich have ABCTorrent aus
> ABC-Linux-V.2.4.3-alpha.tar.gz installiert.
>
> Mit folgendem Script wird es aufgerufen:
>
> #!/bin/sh
> cd /opt/abc
> python abc.py
> rm ~/pingpong-abc* -f
> NameError: global name 'sys' is not defined
>
> ---
>
> Hat jemand von Euch Ahnung, was hier schief lauft?

Ja...

Wo ist das Problem ? Steht doch _genau_ da, was flasch
ist ?!? Lies er erstmal die Python-Doku, bevor er
Fragen stellt ???

Hint: "import sys"

--
greetz Karlheinz Klingbeil (lunqual)
http://www.lunqual.de http://www.42pixels.de
http://www.rezeptbuch-pro.de
Back to top
Login to vote
tiggy

External


Since: Mar 09, 2006
Posts: 14



(Msg. 4) Posted: Sat Mar 18, 2006 6:46 am
Post subject: Re: Problem mit Python-Script: "global name 'sys' is not defined" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

karlheinz klingbeil wrote:

> Lies er erstmal die Python-Doku, bevor er
> Fragen stellt ???

Also DAS wollte er eigenlich vermeiden!!
Daher die Frage hier.

> Hint: "import sys"

Ich werde es wohl nachschauen muessen.
Muss aber warten, da keine Zeit zur Zeit fuer so wat.

Thx anyway
Tiggy
Back to top
Login to vote
Display posts from previous:   
Related Topics:
kdevelop -> kdebindings3-python -> python-qt - Kdevelop läßt sich nicht installieren ohne kdebindings3-python, kdebindings3-python läßt sich nicht installieren ohne..

Problem mit Variablen in sh-Script - Hi, Hi, wenn ich das Script ls -lad $@' | less laufen lasse bekomme ich als Antwort die Meldung "cannot execut...

Problem mit PHP-Script (pg_exec, pg_fetch_object) - Hi Leute, wie ja einige wissen habe ich vor kurzem unseren WebServer komplett neu aufgesetzt und nun hatte ich einige....

grafische Oberfläche nutzen (Perl, Python) - Guten Morgen! Ich habe mich in letzter Zeit etwas mit Perl beschäftigt. Kann man Perl-Programme auch grafisch aufputze...

init-Script - Hallo, ich möchte mit einem init-script auf meiner Suse 9.0-Maschine mein Xampp in runlevel 3 starten und hab' dazu..

shell-script - Hallo, ich möchte ein Shell-Script schreiben welches Bilder eines Verzeichnisses mittels convert verkleinert. Wie kan...
       Soft32 Home -> Linux -> General Discussions All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]