... | ... |
@@ -1900,7 +1900,10 @@ def main(): |
1900 | 1900 |
win = DotWindow() |
1901 | 1901 |
win.connect('destroy', gtk.main_quit) |
1902 | 1902 |
win.set_filter(options.filter) |
1903 |
- if len(args) >= 1: |
|
1903 |
+ if len(args) == 0: |
|
1904 |
+ if not sys.stdin.isatty(): |
|
1905 |
+ win.set_dotcode(sys.stdin.read()) |
|
1906 |
+ else: |
|
1904 | 1907 |
if args[0] == '-': |
1905 | 1908 |
win.set_dotcode(sys.stdin.read()) |
1906 | 1909 |
else: |