Hi!
I've been working on a GUI for a while. The problem I'm currently having is that the files I'm reading in have the same "tags" for different lines.
For example, the following would be in a file I'm reading in:
[Laser1]
port ="//dev"
type ="lms"
[Laser2]
port ="//dev/s2"
type="hokuyu"
The way I read in files now uses a for loop- and I read in each line (and save things like the port information as variables that I use later in my code.)
Is there a way you can read in lines that says line+1, or something like that?
Ex of Reading in code:
for line in input:
if line[0:7] =="[Laser1]:
global laser1
laser1=StringVar()
laser1="on"
Thanks so much! Let me know if you need any more information!
gertblue 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.