-
Ich sehe mich veranlasst, die Frage neu zu formulieren.
Ich habe in der ersten zeile eine veränder
liche Struktur vom Typ list erstellen wolle.
Wieso wird das zum unveränderlichen String?
----------------------------
zeile = []
zeile.append() = ef.read() # einlesen aller Elemente
a = len(zeile ...
Die Suche ergab 14 Treffer
- Samstag 19. April 2025, 19:26
- Forum: Allgemeine Fragen
- Thema: Typdefinition Problem list
- Antworten: 6
- Zugriffe: 2501
- Samstag 19. April 2025, 18:19
- Forum: Allgemeine Fragen
- Thema: Typdefinition Problem list
- Antworten: 6
- Zugriffe: 2501
Typdefinition Problem list
Mahlzeit!!
folgendes snippet:
-------------------------8<-----------------
zeile = []
zeile.append() = ef.read() # einlesen aller Elemente
a = len(zeile)
b = zeile.count("\n")
if a == 0:
print("nix gelesen!")
exit()
for i in range (1,a) :
if zeile != "\n":
continue
if zeile =="\n" and i % 4 ...
folgendes snippet:
-------------------------8<-----------------
zeile = []
zeile.append() = ef.read() # einlesen aller Elemente
a = len(zeile)
b = zeile.count("\n")
if a == 0:
print("nix gelesen!")
exit()
for i in range (1,a) :
if zeile != "\n":
continue
if zeile =="\n" and i % 4 ...
- Dienstag 10. August 2021, 14:00
- Forum: Allgemeine Fragen
- Thema: Parameterangabe kommt aus dem Nirvana anstatt von mir
- Antworten: 6
- Zugriffe: 527
Re: Parameterangabe kommt aus dem Nirvana anstatt von mir
Das Programm versucht, eine Datei namens 'reportlab-sample.pdf zu finden, die es aber nicht gibt.
Ich will meine eigene Datei als Parameter übergeben.
Ich will meine eigene Datei als Parameter übergeben.
- Dienstag 10. August 2021, 13:09
- Forum: Allgemeine Fragen
- Thema: Parameterangabe kommt aus dem Nirvana anstatt von mir
- Antworten: 6
- Zugriffe: 527
Parameterangabe kommt aus dem Nirvana anstatt von mir
Es geht um folgenden Codeausschnitt:
------------------------------------------------------------------------------
from PyPDF2 import PdfFileReader
def extract_information(pdf_path):n
with open(pdf_path, 'rb') as f:
pdf = PdfFileReader(f)
information = pdf.getDocumentInfo()
number_of_pages ...
------------------------------------------------------------------------------
from PyPDF2 import PdfFileReader
def extract_information(pdf_path):n
with open(pdf_path, 'rb') as f:
pdf = PdfFileReader(f)
information = pdf.getDocumentInfo()
number_of_pages ...
- Montag 22. April 2019, 19:33
- Forum: Installation/Konfigurieren
- Thema: PySide2
- Antworten: 3
- Zugriffe: 1751
Re: PySide2
Nach weiteren Installationensieht das Ergebnis folgendermassen aus:
---------------------------------------
IPython 5.5.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about ...
---------------------------------------
IPython 5.5.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about ...
- Montag 22. April 2019, 12:43
- Forum: Installation/Konfigurieren
- Thema: PySide2
- Antworten: 3
- Zugriffe: 1751
PySide2
Hallo,
ich habe mit pip pyside2 installiert und ein script laufen lassen, mit folgendem Ergebnis:
--------------------------------------------------------------------------------------------
# Import PySide2 classes
import sys
from PySide2 import QtCore, QtWidgets
# Create a Qt application ...
ich habe mit pip pyside2 installiert und ein script laufen lassen, mit folgendem Ergebnis:
--------------------------------------------------------------------------------------------
# Import PySide2 classes
import sys
from PySide2 import QtCore, QtWidgets
# Create a Qt application ...
- Donnerstag 31. August 2017, 17:05
- Forum: Installation/Konfigurieren
- Thema: Rechtevergabe in pyusb
- Antworten: 3
- Zugriffe: 2671
Rechtevergabe in pyusb
Ich schon wieder....
Fehlermeldung:
runfile('/home/rfr/.spyder2-py3/pyusb-test.py', wdir='/home/rfr/.spyder2-py3')
Stick gefunden
Traceback (most recent call last):
File "<ipython-input-5-9f08422f8540>", line 1, in <module>
runfile('/home/rfr/.spyder2-py3/pyusb-test.py', wdir='/home/rfr ...
Fehlermeldung:
runfile('/home/rfr/.spyder2-py3/pyusb-test.py', wdir='/home/rfr/.spyder2-py3')
Stick gefunden
Traceback (most recent call last):
File "<ipython-input-5-9f08422f8540>", line 1, in <module>
runfile('/home/rfr/.spyder2-py3/pyusb-test.py', wdir='/home/rfr ...
- Donnerstag 31. August 2017, 13:05
- Forum: Installation/Konfigurieren
- Thema: pyusb installieren
- Antworten: 10
- Zugriffe: 6140
Re: pyusb installieren
Alles gemacht. Er hat jetzt eine andere Fehlermeldung und offensichtlich das usb-zeug gefunden.
Vielen Dank!!
(Drohung: ich komme gegebenenfalls wieder
)
Gruss
Robert
Vielen Dank!!
(Drohung: ich komme gegebenenfalls wieder

Gruss
Robert
- Donnerstag 31. August 2017, 12:06
- Forum: Installation/Konfigurieren
- Thema: pyusb installieren
- Antworten: 10
- Zugriffe: 6140
Re: pyusb installieren
Habe ich gemacht, result:
installieren in python3 scheint also nicht zu funktionieren.
Das kann daran liegen, dass die version von pyusb v==1.0 ist.
Ich will das aber für python 3 und nicht 2.7 installieren.
Weitere Hinweise?
rfr@rfr-ThinkPad-T540p:~$ pip install pyusb==3.5
Collecting pyusb==3 ...
installieren in python3 scheint also nicht zu funktionieren.
Das kann daran liegen, dass die version von pyusb v==1.0 ist.
Ich will das aber für python 3 und nicht 2.7 installieren.
Weitere Hinweise?
rfr@rfr-ThinkPad-T540p:~$ pip install pyusb==3.5
Collecting pyusb==3 ...
- Donnerstag 31. August 2017, 11:08
- Forum: Installation/Konfigurieren
- Thema: pyusb installieren
- Antworten: 10
- Zugriffe: 6140
Re: pyusb installieren
Also alles deinstallieren und dann mit pip3 nochmal.
Gibt es irgendwo eine Erklärung zu pip?
Gibt es irgendwo eine Erklärung zu pip?
- Donnerstag 31. August 2017, 10:07
- Forum: Installation/Konfigurieren
- Thema: pyusb installieren
- Antworten: 10
- Zugriffe: 6140
Re: pyusb installieren
Bitte sehr:
rfr@rfr-ThinkPad-T540p:~$ pip show pyusb
Name: pyusb
Version: 1.0.0
Summary: Python USB access module
Home-page: http://pyusb.sourceforge.net
Author: Wander Lairson Costa
Author-email: wander.lairson@gmail.com
License: BSD
Location: /home/rfr/.local/lib/python2.7/site-packages
Requires ...
rfr@rfr-ThinkPad-T540p:~$ pip show pyusb
Name: pyusb
Version: 1.0.0
Summary: Python USB access module
Home-page: http://pyusb.sourceforge.net
Author: Wander Lairson Costa
Author-email: wander.lairson@gmail.com
License: BSD
Location: /home/rfr/.local/lib/python2.7/site-packages
Requires ...
- Donnerstag 31. August 2017, 09:06
- Forum: Installation/Konfigurieren
- Thema: pyusb installieren
- Antworten: 10
- Zugriffe: 6140
Re: pyusb installieren
------8<--------der Code aus dem Beispiel----------8<
# -*- coding: utf-8 -*-
import usb.core
import usb.util
# find our device
dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
# was it found?
if dev is None:
raise ValueError('Device not found')
# set the active configuration. With no ...
# -*- coding: utf-8 -*-
import usb.core
import usb.util
# find our device
dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
# was it found?
if dev is None:
raise ValueError('Device not found')
# set the active configuration. With no ...
- Donnerstag 31. August 2017, 08:19
- Forum: Installation/Konfigurieren
- Thema: pyusb installieren
- Antworten: 10
- Zugriffe: 6140
pyusb installieren
ich arbeite mit xubuntu und spyder und python3.
Ich will pyusb installieren.
Das ging mit pip auch ohne Fehlermeldung.
Leider ist das Beispielprogram nicht operabel: es kann die usb nicht finden, die entsprechende Anweisung steht in der ersten Zeile.
Ich vermute, dass die zweite Anweisung auch ...
Ich will pyusb installieren.
Das ging mit pip auch ohne Fehlermeldung.
Leider ist das Beispielprogram nicht operabel: es kann die usb nicht finden, die entsprechende Anweisung steht in der ersten Zeile.
Ich vermute, dass die zweite Anweisung auch ...
- Mittwoch 28. Oktober 2015, 12:55
- Forum: Allgemeine Fragen
- Thema: permission wird abgelehnt
- Antworten: 0
- Zugriffe: 10090
permission wird abgelehnt
Moin,
ich habe pyusb verwenden wollen und es geschah folgendes:
>>> runfile('/home/rfr/workspace/python/.temp.py', wdir=r'/home/rfr/workspace/python')
DEVICE ID 1a86:5512 on Bus 003 Address 005 =================
bLength : 0x12 (18 bytes)
bDescriptorType : 0x1 Device
bcdUSB : 0x110 USB 1.1 ...
ich habe pyusb verwenden wollen und es geschah folgendes:
>>> runfile('/home/rfr/workspace/python/.temp.py', wdir=r'/home/rfr/workspace/python')
DEVICE ID 1a86:5512 on Bus 003 Address 005 =================
bLength : 0x12 (18 bytes)
bDescriptorType : 0x1 Device
bcdUSB : 0x110 USB 1.1 ...