Python Forum
Hello World issues when using %% with ipython
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hello World issues when using %% with ipython
#1
In [44]: %%python3 hello.py
    ...: 
UsageError: %%python3 is a cell magic, but the cell body is empty.

In [45]: %%python3 hello.py
    ...: d
    ...: 
Hello World

----------------
Above is what displayed on ipython.

It is weird I type"%%python3 hello.py" and ENTER, error message comes out.
But, if I typed something, e.g. "d" after ENTER, and then ENTER again, my "Hello World" is printed from hello.py.

Why? Thanks.

L
Reply


Messages In This Thread
Hello World issues when using %% with ipython - by landlord1984 - Dec-11-2016, 05:58 AM
RE: Hello World issues - by Yoriz - Dec-11-2016, 10:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  IPython errors for numpy array min/max methods muelaner 1 561 Nov-04-2023, 09:22 PM
Last Post: snippsat
  Can a program execute code in iPython shell and get result? deanhystad 3 1,735 Jun-17-2022, 03:45 AM
Last Post: Larz60+
  Hello World! rufenghk 0 968 Jun-02-2022, 09:48 PM
Last Post: rufenghk
  Very new to Python world daveseaman 0 1,480 Jun-25-2021, 07:17 PM
Last Post: daveseaman
  IPython console vs Spyder script losc 3 2,728 Apr-30-2020, 04:57 AM
Last Post: deanhystad
  How can I create a multiline input in ipython? DataMower 3 4,372 Oct-28-2019, 08:50 PM
Last Post: DataMower
  ipython autocomplete broke indentation! Exsul 6 4,527 Aug-20-2019, 01:29 AM
Last Post: Exsul
  Help | Classes to use in real world soothsayerpg 9 4,162 Jul-08-2019, 07:30 PM
Last Post: nilamo
  How to clear IPython console in Spyder? Vai 7 55,937 Aug-20-2018, 09:43 PM
Last Post: james_balcomb
  Stopwatch in Python/IPython shell suvadip 3 4,303 Jul-06-2018, 01:51 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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