Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > cz.comp.lang.python > #3099

Re: prosím o radu

Newsgroups cz.comp.lang.python
Date 2016-07-26 12:54 -0700
References <3ad0c1bf-de0f-4645-8a59-8991787bf11a@googlegroups.com>
Message-ID <a627841e-4341-4268-8663-990aa44e3c0f@googlegroups.com> (permalink)
Subject Re: prosím o radu
From Aleš Hrubý <ales-hruby@email.cz>

Show all headers | View raw


oprava 
#!/usr/bin/env python
 
import RPi.GPIO as GPIO
import time

promena=3
GPIO.setmode(GPIO.BCM)
GPIO.setup(4, GPIO.OUT)
i=0
while True:

    
        time.sleep(1)
        
	try:
            if i == 1:
                    GPIO.output(4, False)
                    i=0
            else:
                    GPIO.output(4, True)
                    i=1
            except:
                    pass

./test.py 
  File "./test.py", line 22
    except:
         ^
SyntaxError: invalid syntax

Back to cz.comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

prosím o radu ales.hruby33@gmail.com - 2016-07-26 12:32 -0700
  Re: prosím o radu Aleš Hrubý <ales-hruby@email.cz> - 2016-07-26 12:53 -0700
  Re: prosím o radu Aleš Hrubý <ales-hruby@email.cz> - 2016-07-26 12:54 -0700
    Re: [python] prosím o radu Petr Messner <petr.messner@gmail.com> - 2016-07-26 21:56 +0200
  Re: [python] prosím o radu Matěj Cepl <mcepl@cepl.eu> - 2016-07-29 09:35 +0200

csiph-web