0

I have the following ini file

[Section]
value=test

When i use the ConfigParser Module :

import ConfigParser
config = ConfigParser.ConfigParser()
config.read('config.ini')
str=config.get('Section', 'value')

if str == 'test':
    print 1

else :
    print 0

it always print 0 could someone help

Kimvais
  • 38,306
  • 16
  • 108
  • 142
ron
  • 281
  • 2
  • 3
  • 9

1 Answers1

0

try

print str

and see what the value is.

James Geng
  • 471
  • 1
  • 5
  • 6