question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

print() is a function in Python 3

See original GitHub issue

flake8 testing of https://github.com/chrisdonahue/wavegan on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./backup.py:19:40: E999 SyntaxError: invalid syntax
    print 'Waiting for first checkpoint'
                                       ^
./train_specgan.py:112:11: E999 SyntaxError: invalid syntax
  print '-' * 80
          ^
./train_wavegan.py:39:11: E999 SyntaxError: invalid syntax
  print '-' * 80
          ^
./data/count_tfrecord.py:40:9: E999 SyntaxError: invalid syntax
  print n
        ^
./data/preview_tfrecord.py:50:13: E999 SyntaxError: invalid syntax
    print '-' * 80
            ^
./data/ljspeech/split.py:36:15: E999 SyntaxError: invalid syntax
      print '-' * 80
              ^
./data/sc09/split.py:26:15: E999 SyntaxError: invalid syntax
      print '-' * 80
              ^
./eval/inception/score.py:147:35: E999 SyntaxError: invalid syntax
  print 'Inception score: {} +- {}'.format(mean, std)
                                  ^
./eval/inception/train.py:168:27: E999 SyntaxError: invalid syntax
        print 'Preview: {}'.format(latest_ckpt_fp)
                          ^
./eval/noise/noise.py:56:18: E999 SyntaxError: invalid syntax
  print '{} +- {}'.format(np.mean(X_weighted_mean), np.std(X_weighted_mean))
                 ^
./eval/similarity/sim.py:14:24: E999 SyntaxError: invalid syntax
  print 'Creating model'
                       ^
./web/bundle.py:19:16: E999 SyntaxError: invalid syntax
  print '{}->{}'.format(path, out_path)
               ^
12    E999 SyntaxError: invalid syntax
12

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kolemikkocommented, Jun 12, 2018

I already updated my Wavegan files to work with Python 3.x, quite small change after all. I can share them if it helps!

0reactions
cclausscommented, Jun 18, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Your Guide to the Python print() Function
In this step-by-step tutorial, you'll learn about the print() function in Python and discover some of its lesser-known features.
Read more >
Why `print` became a function in Python 3
In its most basic form, print A is the equivalent of sys.stdout.write(str(A) + '\n') . If you pass extra arguments separated by commas...
Read more >
What's New In Python 3.0 — Python 3.11.1 documentation
The print statement has been replaced with a print() function, with keyword arguments to replace most of the special syntax of the old...
Read more >
Python | Output using print() function - GeeksforGeeks
Python print() function prints the message to the screen or any other standard output device. Syntax: print(value(s), sep= ' ', end = '\n', ......
Read more >
Python print() - Programiz
The print() function prints the given object to the standard output device (screen) or to the text stream file. Example. message = 'Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found