Hallo,
mir ist aufgefallen das ich nichts importieren kann.
>>> form math include *
File "<stdin>", line 1
form math include *
^
SyntaxError: invalid syntax
Kann mir jemand sagen wo die include Dateien liegen und warum sich das nicht includen lässt?
Gruss Michael
including Fehler
-
- Python-Forum Veteran
- Beiträge: 2010
- Registriert: Freitag 11. Oktober 2002, 18:00
- Wohnort: Salzburg
- Kontaktdaten:
Hi michael,
Gruß
Dookie
weil das bei Python import und nicht include heißt!Kann mir jemand sagen wo die include Dateien liegen und warum sich das nicht includen lässt?
Gruß
Dookie
[code]#!/usr/bin/env python
import this[/code]
import this[/code]
Jo stimmt Shit C/C++
JEdoch wo finde ich die Dateien die ich damit importiere?
Gruss Michael
JEdoch wo finde ich die Dateien die ich damit importiere?
Gruss Michael
Jo stimmt Shit C/C++
JEdoch wo finde ich die Dateien die ich damit importiere?
Gruss Michael
JEdoch wo finde ich die Dateien die ich damit importiere?
Gruss Michael
-
- Python-Forum Veteran
- Beiträge: 16025
- Registriert: Freitag 20. Juni 2003, 16:30
- Kontaktdaten:
Code: Alles auswählen
import sys
print sys.path
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
Irgendwie hab ich das ganze noch nicht richtig configuriert.
>>> from turtle import *
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/lib-tk/turtle.py", line 4, in ?
import Tkinter
File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
Mache das Python für Kids Buch durch nur irgendwie steht da nix weiter wie man das configuriert.
>>> from turtle import *
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/lib-tk/turtle.py", line 4, in ?
import Tkinter
File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
Mache das Python für Kids Buch durch nur irgendwie steht da nix weiter wie man das configuriert.
-
- Python-Forum Veteran
- Beiträge: 16025
- Registriert: Freitag 20. Juni 2003, 16:30
- Kontaktdaten:
Ich würde sagen, du hast Python ohne Tk installiert (ach, das liebe Tk, macht doch immer wieder Ärger und ist auch sonst oft pingelig).
So wie ich das sehe, hast du Python aus den Sourcen selbstkompiliert. Da du aber kein Tk-dev (oder wie das sich bei deinder Distribution nennt) hast, wurde es nicht mitkompiliert. Also sollstest du das Paket nachinstallieren und danach Python Tkinter kompilieren lassen (im Python-2.4/ nochmal ein ./configure und ein make, danach nochmal ein make install).
Hoffe es hilft.
So wie ich das sehe, hast du Python aus den Sourcen selbstkompiliert. Da du aber kein Tk-dev (oder wie das sich bei deinder Distribution nennt) hast, wurde es nicht mitkompiliert. Also sollstest du das Paket nachinstallieren und danach Python Tkinter kompilieren lassen (im Python-2.4/ nochmal ein ./configure und ein make, danach nochmal ein make install).
Hoffe es hilft.
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice