Hello all,

I'm beginning in Python and I need to input some information in a declared variable, like this:

XML = """<?xml version="1.0" encoding="utf-8"?>
            <Authentication xmlns="http://xxx">
            <SendMessage xmlns="http://xxx">
			<Phone>[B]I need to input text here[/B]</Phone>

I search how to make this, I found anything related to raw_input(), but nothing useful is this case.


Function raw_input() would force the user to type in the entire XML code. I don't think you want this.

Normally the XML code would come from file, something like this:

fin = open("Myxml.xml", "r")
xml_string = fin.read()

# now the xml code is represented by xml_string for you to work on.

Solved! I'm using sys.argv[] for this issue.