<div dir="ltr">Hallo Thomas,<div><br></div><div>ich kann selbst kein P<span style="line-height:1.5">ython. Hab mir aber mal folgende Zeilen zusammen gesucht.</span></div><div><br></div><div><div>#!/usr/bin/python</div><div>import httplib</div><div><br></div><div><br></div><div>conn = httplib.HTTPConnection("<a href="http://192.168.1.210:81">192.168.1.210:81</a>")</div><div>conn.request("GET", "/middleware.php/data/85cxxxxxxxxxxxxxxxx9d1.csv?from=now&to=now&tuples=1")</div><div>response = conn.getresponse()</div><div>data = response.read()</div><div>print(data)</div><div>conn.close()</div></div><div><br></div><div><br></div><div><br></div><div>Grüße</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr"><a href="mailto:Heine.thomas@online.de">Heine.thomas@online.de</a> <<a href="mailto:Heine.thomas@online.de">Heine.thomas@online.de</a>> schrieb am Di., 23. Aug. 2016 um 09:11 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>in meinem Skript steht folgendes:<br>
      <br>
      <b>#Test Werte aus dem VZLogger holen</b><b><br>
      </b><b>value = (GET
<a href="http://192.168.178.51/middleware.php/data/29ac7c80-6204-11e6-87f2-f7e45473c6cc.txt?to=now&tuples=1" target="_blank">http://192.168.178.51/middleware.php/data/29ac7c80-6204-11e6-87f2-f7e45473c6cc.txt?to=now&tuples=1</a>)</b><b><br>
      </b><b>Print value</b><br>
      <br>
      nach dem Ausführen gibts folgendes Ergebnis:<br>
      <br>
      <b>File "tests7.py", line 3</b><b><br>
      </b><b>    value = (GET
<a href="http://192.168.178.51/middleware.php/data/29ac7c80-6204-11e6-87f2-f7e45473c6cc.txt?to=now&tuples=1" target="_blank">http://192.168.178.51/middleware.php/data/29ac7c80-6204-11e6-87f2-f7e45473c6cc.txt?to=now&tuples=1</a>)</b><b><br>
      </b><b>                    ^</b><b><br>
      </b><b>SyntaxError: invalid syntax</b><b><br>
      </b><br>
      <br>
      Was mache ich falsch?<br>
      <br>
      Gruß</div></div><div bgcolor="#FFFFFF" text="#000000"><div><br>
      <br>
      Thomas</div></div><div bgcolor="#FFFFFF" text="#000000"><div><br>
      <br>
      <br>
      Am 23.08.2016 um 08:21 schrieb <a href="mailto:china2013@abwesend.de" target="_blank">china2013@abwesend.de</a>:<br>
    </div></div><div bgcolor="#FFFFFF" text="#000000">
    <blockquote type="cite">Am 23.08.2016 um 07:10 schrieb <a href="mailto:Heine.thomas@online.de" target="_blank">Heine.thomas@online.de</a>:
      <br>
      <blockquote type="cite">Hallo,
        <br>
        <br>
        hab die Verbindung zur S7 nun mit Snap7 und Python hingekriegt.
        <br>
        Gibt es die Möglichkeit einzelne Werte des VZ-Loggers über
        Python abzufragen und im gleichen Skript dann zu übergeben?
        <br>
        <br>
        mit
        <br>
        "Get
<a href="http://192.168.178.51/middleware.php/data/xxxxxxx-xxxx-xxxx-xxxx-xxxxxx.txt?from=now&tuples=1" target="_blank">http://192.168.178.51/middleware.php/data/xxxxxxx-xxxx-xxxx-xxxx-xxxxxx.txt?from=now&tuples=1</a>"<br>
        klappt´s in Python nicht :-(
        <br>
        <br>
        --> Der Profi erkennt, hier ist ein Laie am Werk <--
        <br>
        <br>
        Gruß
        <br>
        Thomas
        <br>
      </blockquote>
      Ha, ha!
      <br>
      genauso reingefallen wie ich auch.
      <br>
      Probiers mal anstatt mit "from" mit "to".
      <br>
      <br>
      (Das "from" hat so seine Eigenarten die ich wohl nie verstehe.
      <br>
      Ich habe 2sec Datenaufzeichnung, also müsste eigentlich das erste
      Tupel maximal 1 sec vom der from URL Angabe weg sein - aber bei
      mir sind es Stunden und die auch noch je nach Kanal
      unterschiedlich
    </blockquote>
  </div></blockquote></div>