On 08/12/14 03:50, diliup gabadamudalige wrote:
I managed to get the output file and input file working.
The output works fine but the input does not. It simply exits the
program. No crash. Exits.It DOES NOT WAIT FOR ME TO TYPE IN THE
inputfile.txt
Can you show us what your input file looks l
On 08/12/14 08:14, Alan Gauld wrote:
1.What I want to do is to redirect the output of the program to a text
file instead of the standard Python output. That is why I opened the
text file. That part of the program works fine.
Thats OK, although its still usual to keep a reference to the real
s
Forwarding tom list
Please always use Reply All (or Reply List) to include the list.
On 08/12/14 03:19, diliup gabadamudalige wrote:
I do not need to save any info in the text files opened for stdout and
stdin.
The text files are empty files used only for Python output or Input.
I only need to
Forwarding tom list
Please always use Reply All (or Reply List) to include the list.
On 08/12/14 03:50, diliup gabadamudalige wrote:
I managed to get the output file and input file working.
The output works fine but the input does not. It simply exits the
program. No crash. Exits.It DOES NOT WA
Forwarding tom list
Please always use Reply All (or Reply List) to include the list.
On 08/12/14 03:11, diliup gabadamudalige wrote:
Dear Allen,
:)
Thank you very much for the responses but some things have been
totally misunderstood here. :)
1.What I want to do is to redirect the output o
On 07/12/14 17:38, diliup gabadamudalige wrote:
if __name__ == '__main__':
You don't really need that unless your code can be treated
as a module, which yours can't.
p = os.getcwd()
filename = "\get scale of choice.txt"
filepath = p + filename
sys.stdout = open(filepath,
> I need to get the stdin input from the text I type into the same text file
> that I have stdout at. How do I do that. None of the answers at
> stackoverflow got me going. Any help on a code snippet would be appreciated.
In-place edits of a file are dangerous, especially as a beginner.
This is be
Dear alll,
my code is given below
if __name__ == '__main__':
p = os.getcwd()
filename = "\get scale of choice.txt"
filepath = p + filename
sys.stdout = open(filepath, "w")
os.startfile(filepath)
for i in data.info: # print all the scale info to window
print i