George R Goffe wrote:
> When you run a python program, it appears that stdin, stdout, and stderr
> are opened automatically.
>
> I've been trying to find out how you tell if there's data in stdin (like
> when you pipe data to a python program) rather than in a named input file.
> It seems like mo
On 18/10/14 19:36, George R Goffe wrote:
When you run a python program, it appears that stdin, stdout, and stderr are
opened automatically.
correct.
I've been trying to find out how you tell if there's data in stdin
Same way you tell if there's data in any file/stream - you read
from it.
Dear All,
or improve my understanding o python I would like to learn how to draw simple
figures using loops.
I start from this code in java:
import java.util.Scanner;
public class Eserc2_8 {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
// Altezz
On Sun, Oct 19, 2014 at 7:32 AM, jarod...@libero.it wrote:
>
> Dear All,
> or improve my understanding o python I would like to learn how to draw simple
> figures using loops.
> I start from this code in java:
> import java.util.Scanner;
>
> public class Eserc2_8 {
> public static void main(St
* Peter Otten <__pete...@web.de> [2014-10-19 10:05]:
> George R Goffe wrote:
>
> > When you run a python program, it appears that stdin, stdout, and stderr
> > are opened automatically.
> >
> > I've been trying to find out how you tell if there's data in stdin (like
> > when you pipe data to a py
Hi,
Wow. Lots of feedback. REALLY GOOD FEEDBACK!
This was my first question to this list. Let me clarify my question.
I want to use tst.py as follows:
tst.py input-file output-file OR
cat data-file | tst.py - output-file OR
cat data-file | tst.py output-file
tst.py input-file output-file works
On Sun, Oct 19, 2014 at 9:27 AM, jarod...@libero.it wrote:
> thanks for the help:
> In [60]: for i in range(10):
>: for t in range(6-i):
>: print " "
>: for item in range(i+1):
>: print "*"
>:
>
> *
>
> *
>
> *
>
> *
>
> *
>
> *
>
> *
In Java, System.out represents the standard output device. In Python,
there's a similar value in sys.stdout.
https://docs.python.org/2/library/sys.html#sys.stdout
In your Python program, you should be able to say:
import sys
at the beginning of your program, and then use:
sys.st
Hell,
My name is Amna and I am totally new to python world with zero experience
in programming. I am facing the challenge of converting data from pdf to
excel. The data within pdf is numbers separated by space not within a table.
I need a help to figure out a code that help me to convert these pdf
On 10/18/2014 02:36 PM, George R Goffe wrote:
> Hi,
>
> When you run a python program, it appears that stdin, stdout, and stderr are
> opened automatically.
>
> I've been trying to find out how you tell if there's data in stdin (like when
> you pipe data to a python program) rather
> than in a
On Sun, Oct 19, 2014 at 7:27 AM, AMNA MOHAMMED ALRUHEILI
wrote:
> My name is Amna and I am totally new to python world with zero experience in
> programming. I am facing the challenge of converting data from pdf to excel.
> The data within pdf is numbers separated by space not within a table.
> I
raw_table = ('''
a: Asky: Dividend Yield
b: Bid d: Dividend per Share
b2: Ask (Realtime) r1: Dividend Pay Date
b3: Bid (Realtime)q: Ex-Dividend Date
p: Previous Close
o: Open''')
key_name = raw_table.rstrip('\t')
print(key_name)
a: Asky: Dividend Yie
On 19/10/14 23:26, Clayton Kirkwood wrote:
raw_table = ('''
a: Asky: Dividend Yield
b: Bid d: Dividend per Share
b2: Ask (Realtime) r1: Dividend Pay Date
...
o: Open’’’)
key_name = raw_table.rstrip('\t')
rstrip() strips characters from the *right* hand side. When it finds a
On Sun, Oct 19, 2014 at 03:26:44PM -0700, Clayton Kirkwood wrote:
> raw_table = ('''
> a: Asky: Dividend Yield
[...]
> o: Open''')
> key_name = raw_table.rstrip('\t')
> print(key_name)
[...]
> #why is the tab not being removed?
How do you know that the raw_table contains tabs rather than space
14 matches
Mail list logo