简体   繁体   中英

Python: cannot print (execution flow ?)

I am interested in a small python application, which can be downloaded here: https://launchpad.net/treemap

If you run it, like this:

python treemap-basic.py examle-world-population.txt

It works just fine. The problem is that even if I type a print command in the "treemap-basic.py" file:

print "Hello World !" @ treemap-basic.py

I cannot see the message "Hello World !" at the Terminal. Why?

I downloaded this script, and inserted

print "Hello World"

on line 64. When simply trying ./treemap-basic.py on the terminal, you get an IndexError since treemap-basic.py expects a command line argument. When you specify a file to work on:

./treemap-basic examle-world-population.txt

You see a bunch of output in stout. If you scroll up to the top (right below where you first entered the command in the terminal) you should see "Hello World" as the first line of output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM