1 Replies - 168 Views - Last Post: 27 August 2013 - 03:54 AM Rate Topic: -----

#1 vasant_Gowda  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 27-August 13

how to retreive variables from map files

Posted 27 August 2013 - 01:25 AM

From following map file I wanna remove lines starts with # and read the file in another file and extract and print the variables in Linux terminal using Python script. can anybody help

################################################################################
#
# Legend Map
#
# Definition:
# <LegendName> : <Color1> , <Color2> , ... , <ColorN>
#
################################################################################
#
#
# Standard Legend Animator - 9 Colors: Blue to Red
#
Standard_Animator: blue,3f7fff,00bfff,3fffbf,green,bfff3f,ffbf00,ff7f00,red
#
#
#
# Extended Legend Animator - 11 Colors: LightGray -- Blue to Red -- Magenta
#
Extended_Animator: LightGray, blue,3f7fff,00bfff,3fffbf,green,bfff3f,ffbf00,ff7f00,red, Magenta
#
#
# end

Is This A Good Question/Topic? 0
  • +

Replies To: how to retreive variables from map files

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 5960
  • View blog
  • Posts: 23,235
  • Joined: 23-August 08

Re: how to retreive variables from map files

Posted 27 August 2013 - 03:54 AM

Read file line by line
Discard line if starting with #, otherwise parse line.

/ Taking bets on contents of reply...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1