Python Forum
code works in python shell, but not in a terminal
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
code works in python shell, but not in a terminal
#6
Thank you, I tried that but there was no hidden character.

Turns out, I had missed a bracket in the line 70 print('Resizing the row heights for row %s to max_row...' % (startRow))

I forgot the last bracket. After that, the routine almost worked, except in line 60 I needed to put str(startRow) because startRow is an integer.

Now it works, and I have learned about the power of brackets!!

Thanks for your good advice!
Reply


Messages In This Thread
RE: code works in python shell, but not in a terminal - by Pedroski55 - Sep-10-2018, 07:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  set -x shell equivalent of python, possible/available? ggpf900 1 622 Jan-25-2025, 08:01 PM
Last Post: Gribouillis
  updating pip, python - understanding terminal and pycharm. endlessnameless 0 1,394 Jun-24-2024, 05:48 AM
Last Post: endlessnameless
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 4,978 Nov-15-2023, 06:56 PM
Last Post: jst
  Help creating shell scrip for python file marciokoko 10 3,850 Sep-16-2023, 09:46 PM
Last Post: snippsat
  invoking python in Terminal Euler 2 1,388 Aug-25-2023, 06:17 AM
Last Post: perfringo
  Code works but doesn't give the right results colin_dent 2 1,525 Jun-22-2023, 06:04 PM
Last Post: jefsummers
  Launch Python IDLE Shell from terminal Pavel_47 5 2,877 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Python VS Code: using print command twice but not getting output from terminal kdx264 4 2,314 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  Code used to work 100%, now sometimes works! muzicman0 5 2,959 Jan-13-2023, 05:09 PM
Last Post: muzicman0
  Can a program execute code in iPython shell and get result? deanhystad 3 2,939 Jun-17-2022, 03:45 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020