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
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 1,056 Nov-15-2023, 06:56 PM
Last Post: jst
  Help creating shell scrip for python file marciokoko 10 1,392 Sep-16-2023, 09:46 PM
Last Post: snippsat
  invoking python in Terminal Euler 2 647 Aug-25-2023, 06:17 AM
Last Post: perfringo
  Code works but doesn't give the right results colin_dent 2 728 Jun-22-2023, 06:04 PM
Last Post: jefsummers
  Launch Python IDLE Shell from terminal Pavel_47 5 1,265 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 1,109 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  Code used to work 100%, now sometimes works! muzicman0 5 1,459 Jan-13-2023, 05:09 PM
Last Post: muzicman0
  Can a program execute code in iPython shell and get result? deanhystad 3 1,761 Jun-17-2022, 03:45 AM
Last Post: Larz60+
  batch file for running python scipt in Windows shell MaartenRo 2 1,907 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Pyspark - my code works but I want to make it better Kevin 1 1,799 Dec-01-2021, 05:04 AM
Last Post: Kevin

Forum Jump:

User Panel Messages

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