UPDATE: I resolved this issue - it was an issue with a capitalization of a variable earlier on.
I am new to both python and stackOverflow so pardon any etiquette mistakes that i make.
I am trying to figure out correct syntax for python. If i define a variable that is a long string of information - text and numbers and such like so: (its embedded metadata from a file)
coorSys=str(sD.metadata['coordinate system string'])
then i call it to write to a part of a file like so
where.attrs['Coord System Descript']= 'full string %s' % coorSys
where the syntax i need to follow is
where.attrs['Coord System Descript']='text here'
what is the proper syntax? what i have isn't working. I also tried
where.attrs['Coord System Descript']='full string' & str(coorSys)
I know that coorSys returns the full string as it should... so the variable is right. many thanks in advance for any input. leah
where.attrs['Coord System Descript']='x'
andx
is the value of thecoorSys
variable? I am not sure what "where the syntax I need to follow" means. – Burhan Khalid 2 days agowhere
, and what has it got to do with files? Are you trying to make your Python script create a new file with Python code in it? If so, why? – Karl Knechtel 2 days ago