Re: [Tutor] getting input for stdin

2014-12-08 Thread Alan Gauld
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

Re: [Tutor] Coding

2014-12-08 Thread Alan Gauld
On 08/12/14 02:24, Steven D'Aprano wrote: Python sees it like: if FirstChoice == ('Coke' or 'Pepsi' or 'Water'): So evaluates the bit in parens first which results in a boolean value of True. Actually it sees it as: if ((FirstChoice == 'Coke') or 'Pepsi' or 'Water'): which will always eva

Re: [Tutor] getting input for stdin

2014-12-08 Thread Alan Gauld
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

Re: [Tutor] getting input for stdin

2014-12-08 Thread Alan Gauld
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

Re: [Tutor] getting input for stdin

2014-12-08 Thread Alan Gauld
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

Re: [Tutor] getting input for stdin

2014-12-08 Thread Alan Gauld
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

[Tutor] Plotting subsets of data

2014-12-08 Thread Colin Ross
Good afternoon, I am using the following to code to plot the output from an optical encoder: import numpy as np from numpy import ma, logical_or import pylab from pylab import * import matplotlib.pyplot as plt from matplotlib.ticker import AutoMinorLocator import sys # Defining x and y minorloca

Re: [Tutor] Plotting subsets of data

2014-12-08 Thread Danny Yoo
On Mon, Dec 8, 2014 at 7:48 AM, Colin Ross wrote: > Good afternoon, > > I am using the following to code to plot the output from an optical encoder: Hi Colin, Matplotlib is a third-party library, so you may also consider asking the matplotlib folks. >From a brief look at: http://matplotli

Re: [Tutor] Plotting subsets of data

2014-12-08 Thread Colin Ross
Perfect, thank you Danny! On Mon, Dec 8, 2014 at 3:49 PM, Danny Yoo wrote: > On Mon, Dec 8, 2014 at 7:48 AM, Colin Ross > wrote: > > Good afternoon, > > > > I am using the following to code to plot the output from an optical > encoder: > > Hi Colin, > > Matplotlib is a third-party library, so y

Re: [Tutor] Coding

2014-12-08 Thread Danny Yoo
On Mon, Dec 8, 2014 at 12:14 PM, Awais Idris <2010-3...@slougheton.com> wrote: > The problem is when i enter my first choice it accepts it fine and well. > When it says would you like a second item, andi say yes it listd the options > and says have a good day and the program cuts off. In wondering

Re: [Tutor] Coding

2014-12-08 Thread Awais Idris
Ok thank you i appreciate your help On Monday, 8 December 2014, Danny Yoo wrote: > On Mon, Dec 8, 2014 at 12:14 PM, Awais Idris <2010-3...@slougheton.com > > wrote: > > The problem is when i enter my first choice it accepts it fine and well. > > When it says would you like a second item, andi sa

Re: [Tutor] Coding

2014-12-08 Thread Danny Yoo
On Mon, Dec 8, 2014 at 3:06 PM, Awais Idris <2010-3...@slougheton.com> wrote: > The problem is when i enter my first choice it accepts it fine and well. > When it says would you like a second item, andi say yes it listd the options > and says have a good day and the program cuts off. In wondering i