I have a file that contains a class, its called test.py. How can i call on that class within another file called xml.py?
adam291086 0 Junior Poster in Training
Recommended Answers
Jump to PostJust make sure they are both in the same directory (probably c:/python or something like that).
Then you can just import the other file and use it like it is a module.import test.py #just imports the file from test.py import * #brings every class and function …
All 4 Replies
mathijs 0 Light Poster
adam291086 0 Junior Poster in Training
Gribouillis 1,391 Programming Explorer Team Colleague
chethan_2 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.