Andreas Winkler wrote:
I tried to have python call an external 'Word'-file,
and the read the whole text into a single string with
the following code:
[CODE]
source = raw_input('file path')
File = open('source', 'r')
S = input.read()
print S
[/CODE]
Anything inside quotation marks is just a string o
There are two problems: (1) by quoting 'source', you refer to a string
literal, not the variable you defined via raw_input; (2) you have not
defined the variable 'input', so there's no way to call the 'read'
method on it.
Try this instead:
source_path = raw_input('file path: ')
s = open(source_pa
There are two problems: (1) by quoting 'source', you refer to a string
literal, not the variable you defined via raw_input; (2) you have not
defined the variable 'input', so there's no way to call the 'read'
method on it.
Try this instead:
source_path = raw_input('file path: ')
s = open(source_pa
Hi
I tried to have python call an external 'Word'-file,
and the read the whole text into a single string with
the following code:
[CODE]
source = raw_input('file path')
File = open('source', 'r')
S = input.read()
print S
[/CODE]
But when I try to run it, it raises the following
error:
File = op