From spruit_frank at hotmail.com Fri Aug 10 10:36:09 2007 From: spruit_frank at hotmail.com (frankje) Date: Fri, 10 Aug 2007 01:36:09 -0700 (PDT) Subject: [python-nl] if optie Message-ID: <12087423.post@talk.nabble.com> Hallo, Ik ben net begonnen met een cursus python op www.developer.com. Hier staat echter een listing in waarop ik een foutcode krijg (zie hieronder): t1 = "a", t2 = t1*2 if ("b" in t2) print "OK" if ("a" in t2): print "t2" print t2 print "length = ",len(t2) De foutcode die ik krijg is: frank at ubuntu:~/python$ python tuple05.py File "tuple05.py", line 10 if ("b" in t2) ^ SyntaxError: invalid syntax frank at ubuntu:~/python$ Weet iemand wat er hier fout is? Bij voorbaat dank, Frank -- View this message in context: http://www.nabble.com/if-optie-tf4247363.html#a12087423 Sent from the Python - python-nl mailing list archive at Nabble.com. From guyon.moree at gmail.com Fri Aug 10 14:10:25 2007 From: guyon.moree at gmail.com (=?ISO-8859-1?Q?Guyon_Mor=E9e?=) Date: Fri, 10 Aug 2007 14:10:25 +0200 Subject: [python-nl] if optie In-Reply-To: <12087423.post@talk.nabble.com> References: <12087423.post@talk.nabble.com> Message-ID: <78f5441d0708100510r9dcba89ga89f337cabb8218b@mail.gmail.com> Je mist een dubbele-punt achter het if-statement groetjes, Op 10-08-07 heeft frankje het volgende geschreven: > > Hallo, > > Ik ben net begonnen met een cursus python op www.developer.com. Hier staat > echter een listing in waarop ik een foutcode krijg (zie hieronder): > > t1 = "a", > t2 = t1*2 > if ("b" in t2) > print "OK" > if ("a" in t2): > print "t2" > print t2 > print "length = ",len(t2) > > > De foutcode die ik krijg is: > > frank op ubuntu:~/python$ python tuple05.py > File "tuple05.py", line 10 > if ("b" in t2) > ^ > SyntaxError: invalid syntax > frank op ubuntu:~/python$ > > Weet iemand wat er hier fout is? > > > Bij voorbaat dank, Frank > > -- > View this message in context: http://www.nabble.com/if-optie-tf4247363.html#a12087423 > Sent from the Python - python-nl mailing list archive at Nabble.com. > > _______________________________________________ > Python-nl mailing list > Python-nl op python.org > http://mail.python.org/mailman/listinfo/python-nl > -- Guyon Mor?e guyon.moree op gmail.com http://gumuz.looze.net From guyon.moree at gmail.com Fri Aug 10 14:13:15 2007 From: guyon.moree at gmail.com (=?ISO-8859-1?Q?Guyon_Mor=E9e?=) Date: Fri, 10 Aug 2007 14:13:15 +0200 Subject: [python-nl] if optie In-Reply-To: <78f5441d0708100510r9dcba89ga89f337cabb8218b@mail.gmail.com> References: <12087423.post@talk.nabble.com> <78f5441d0708100510r9dcba89ga89f337cabb8218b@mail.gmail.com> Message-ID: <78f5441d0708100513w18e5ad78hbbed0bb9b7e8e1a7@mail.gmail.com> Misschien was dat antwoord iets te kort. Ik bedoelde iig: if ("b" in t2): ipv if ("b" in t2) groet, Op 10-08-07 heeft Guyon Mor?e het volgende geschreven: > Je mist een dubbele-punt achter het if-statement > groetjes, > groetjes, > > Op 10-08-07 heeft frankje het volgende geschreven: > > > > Hallo, > > > > Ik ben net begonnen met een cursus python op www.developer.com. Hier staat > > echter een listing in waarop ik een foutcode krijg (zie hieronder): > > > > t1 = "a", > > t2 = t1*2 > > if ("b" in t2) > > print "OK" > > if ("a" in t2): > > print "t2" > > print t2 > > print "length = ",len(t2) > > > > > > De foutcode die ik krijg is: > > > > frank op ubuntu:~/python$ python tuple05.py > > File "tuple05.py", line 10 > > if ("b" in t2) > > ^ > > SyntaxError: invalid syntax > > frank op ubuntu:~/python$ > > > > Weet iemand wat er hier fout is? > > > > > > Bij voorbaat dank, Frank > > > > -- > > View this message in context: http://www.nabble.com/if-optie-tf4247363.html#a12087423 > > Sent from the Python - python-nl mailing list archive at Nabble.com. > > > > _______________________________________________ > > Python-nl mailing list > > Python-nl op python.org > > http://mail.python.org/mailman/listinfo/python-nl > > > > > -- > Guyon Mor?e > guyon.moree op gmail.com > http://gumuz.looze.net > -- Guyon Mor?e guyon.moree op gmail.com http://gumuz.looze.net From spe.stani.be at gmail.com Fri Aug 10 14:16:46 2007 From: spe.stani.be at gmail.com (Stani's Python Editor) Date: Fri, 10 Aug 2007 14:16:46 +0200 Subject: [python-nl] if optie In-Reply-To: <12087423.post@talk.nabble.com> References: <12087423.post@talk.nabble.com> Message-ID: <46BC572E.5000802@gmail.com> frankje schreef: > Hallo, > > Ik ben net begonnen met een cursus python op www.developer.com. Hier staat > echter een listing in waarop ik een foutcode krijg (zie hieronder): > > t1 = "a", > t2 = t1*2 > if ("b" in t2) > print "OK" > if ("a" in t2): > print "t2" > print t2 > print "length = ",len(t2) > > > De foutcode die ik krijg is: > > frank at ubuntu:~/python$ python tuple05.py > File "tuple05.py", line 10 > if ("b" in t2) > ^ > SyntaxError: invalid syntax > frank at ubuntu:~/python$ > > Weet iemand wat er hier fout is? > > > Bij voorbaat dank, Frank > Je bent een dubbel punt vergeten. Stani -- http://pythonide.stani.be From wichert at wiggy.net Fri Aug 10 14:11:57 2007 From: wichert at wiggy.net (Wichert Akkerman) Date: Fri, 10 Aug 2007 14:11:57 +0200 Subject: [python-nl] if optie In-Reply-To: <12087423.post@talk.nabble.com> References: <12087423.post@talk.nabble.com> Message-ID: <46BC560D.7080804@wiggy.net> frankje wrote: > Hallo, > > Ik ben net begonnen met een cursus python op www.developer.com. Hier staat > echter een listing in waarop ik een foutcode krijg (zie hieronder): > > t1 = "a", > t2 = t1*2 > if ("b" in t2) > print "OK" > if ("a" in t2): > print "t2" > print t2 > print "length = ",len(t2) > > > De foutcode die ik krijg is: > > frank at ubuntu:~/python$ python tuple05.py > File "tuple05.py", line 10 > if ("b" in t2) > ^ > SyntaxError: invalid syntax > frank at ubuntu:~/python$ > > Weet iemand wat er hier fout is? er mist een : aan het eind van die regel. Wichert. -- Wichert Akkerman It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. From reinoud.v at n.leeuwen.net Fri Aug 10 14:39:29 2007 From: reinoud.v at n.leeuwen.net (Reinoud van Leeuwen) Date: Fri, 10 Aug 2007 14:39:29 +0200 Subject: [python-nl] if optie In-Reply-To: <12087423.post@talk.nabble.com> References: <12087423.post@talk.nabble.com> Message-ID: <20070810123929.GO35225@spoetnik.xs4all.nl> On Fri, Aug 10, 2007 at 01:36:09AM -0700, frankje wrote: > > Hallo, > > Ik ben net begonnen met een cursus python op www.developer.com. Hier staat > echter een listing in waarop ik een foutcode krijg (zie hieronder): > > t1 = "a", > t2 = t1*2 > if ("b" in t2) > print "OK" > if ("a" in t2): > print "t2" > print t2 > print "length = ",len(t2) > > > De foutcode die ik krijg is: > > frank at ubuntu:~/python$ python tuple05.py > File "tuple05.py", line 10 > if ("b" in t2) > ^ > SyntaxError: invalid syntax > frank at ubuntu:~/python$ > > Weet iemand wat er hier fout is? Als ik het paste in de python prompt (met een extra enter) werkt het prima hier: >>> t1 = "a", >>> t2 = t1*2 >>> if ("b" in t2): ... print "OK" ... >>> if ("a" in t2): ... print "t2" ... print t2 ... print "length = ",len(t2) ... t2 ('a', 'a') length = 2 >>> -- __________________________________________________ "Nothing is as subjective as reality" Reinoud van Leeuwen reinoud.v at n.leeuwen.net http://www.xs4all.nl/~reinoud __________________________________________________ From spruit_frank at hotmail.com Sun Aug 12 10:45:50 2007 From: spruit_frank at hotmail.com (frankje) Date: Sun, 12 Aug 2007 01:45:50 -0700 (PDT) Subject: [python-nl] qt4-designer Message-ID: <12112419.post@talk.nabble.com> hallo, Ik ben net begonnen met qt4-designer en python, en bij het volgende oefenprogje van de site: http://www.rkblog.rk.edu.pl/w/p/introduction-pyqt4/ krijg ik bij het runnen de volgende fout: frank at ubuntu:~/python$ python test.py Traceback (most recent call last): File "test.py", line 4, in from test_ui import Ui_Form File "/home/frank/python/test_ui.py", line 1 ^ SyntaxError: invalid syntax frank at ubuntu:~/python$ Wat doe ik verkeerd? grtn, Frank -- View this message in context: http://www.nabble.com/qt4-designer-tf4256020.html#a12112419 Sent from the Python - python-nl mailing list archive at Nabble.com. From wichert at wiggy.net Sun Aug 12 10:50:35 2007 From: wichert at wiggy.net (Wichert Akkerman) Date: Sun, 12 Aug 2007 10:50:35 +0200 Subject: [python-nl] qt4-designer In-Reply-To: <12112419.post@talk.nabble.com> References: <12112419.post@talk.nabble.com> Message-ID: <46BEC9DB.3060704@wiggy.net> frankje wrote: > hallo, > > Ik ben net begonnen met qt4-designer en python, en bij het volgende > oefenprogje van de site: http://www.rkblog.rk.edu.pl/w/p/introduction-pyqt4/ > krijg ik bij het runnen de volgende fout: > > frank at ubuntu:~/python$ python test.py > Traceback (most recent call last): > File "test.py", line 4, in > from test_ui import Ui_Form > File "/home/frank/python/test_ui.py", line 1 > > ^ > SyntaxError: invalid syntax > frank at ubuntu:~/python$ > > > Wat doe ik verkeerd? Dat is een XML file, geen python file. Wichert. -- Wichert Akkerman It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. From rob at hooft.net Sun Aug 12 11:06:48 2007 From: rob at hooft.net (Rob Hooft) Date: Sun, 12 Aug 2007 11:06:48 +0200 Subject: [python-nl] qt4-designer In-Reply-To: <46BEC9DB.3060704@wiggy.net> References: <12112419.post@talk.nabble.com> <46BEC9DB.3060704@wiggy.net> Message-ID: <46BECDA8.1000509@hooft.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Wichert Akkerman wrote: > frankje wrote: >> hallo, >> >> Ik ben net begonnen met qt4-designer en python, en bij het volgende >> oefenprogje van de site: http://www.rkblog.rk.edu.pl/w/p/introduction-pyqt4/ >> krijg ik bij het runnen de volgende fout: >> >> frank at ubuntu:~/python$ python test.py >> Traceback (most recent call last): >> File "test.py", line 4, in >> from test_ui import Ui_Form >> File "/home/frank/python/test_ui.py", line 1 >> >> ^ >> SyntaxError: invalid syntax >> frank at ubuntu:~/python$ >> >> >> Wat doe ik verkeerd? > > Dat is een XML file, geen python file. Dan zou hij .ui moeten heten, en kan "pyuic" worden gebruikt om deze om te zetten in een echte .py file. Rob - -- Rob W.W. Hooft || rob at hooft.net || http://www.hooft.net/people/rob/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGvs2oH7J/Cv8rb3QRAj6QAKCgIP1gg5GFnOuZtRrRZ2Y2GM4W2QCbBTNd 6/VZqi0kBIefv4QzCLW2LLE= =D2Xl -----END PGP SIGNATURE----- From lists at janc.be Tue Aug 14 00:54:32 2007 From: lists at janc.be (Jan Claeys) Date: Tue, 14 Aug 2007 00:54:32 +0200 Subject: [python-nl] if optie In-Reply-To: <12087423.post@talk.nabble.com> References: <12087423.post@talk.nabble.com> Message-ID: <1187045672.15232.119.camel@localhost> Op vrijdag 10-08-2007 om 01:36 uur [tijdzone -0700], schreef frankje: > t1 = "a", > t2 = t1*2 > if ("b" in t2) > print "OK" > if ("a" in t2): > print "t2" > print t2 > print "length = ",len(t2) [...] > Weet iemand wat er hier fout is? Daar hebben de anderen al op geantwoord, maar toch even er op wijzen dat er de haakjes na die 'if'-en helemaal niet nodig zijn... t1 = "a", t2 = t1*2 if "b" in t2: print "OK" if "a" in t2: print "t2" print t2 print "length = ",len(t2) -- Jan Claeys