Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:43:10+00:00 2026-05-26T22:43:10+00:00

Currently, I am working on python interactive shell version 6. When i start python

  • 0

Currently, I am working on python interactive shell version 6. When i start python shell, i use to code some line. but i don’t know how to store what i code. So, is there any command or or keyword to save my session on python shell as like .py

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:43:10+00:00Added an answer on May 26, 2026 at 10:43 pm

    Maybe you mean ipython? For this shell, all your input is stored in the In dictionary. Here’s an example session log how to write input lines 2-3 into the script myscript.py:

    Python 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Nov 29 2010, 13:52:51) 
    Type "copyright", "credits" or "license" for more information.
    
    IPython 0.10.1 -- An enhanced Interactive Python.
    ?         -> Introduction and overview of IPython's features.
    %quickref -> Quick reference.
    help      -> Python's own help system.
    object?   -> Details about 'object'. ?object also works, ?? prints more.
    
    In [2]: print "Hello world."
    Hello world.
    
    In [3]: print "Hello world again."
    Hello world again.
    
    In [4]: fid = open("myscript.py", "w")
    
    In [5]: for i in range(2,4):
       ...:     fid.write(In[i])
       ...: 
    
    In [6]: fid.close()
    
    In [7]: run myscript.py
    Hello world.
    Hello world again.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm mainly a C# developer, but I'm currently working on a project in Python.
Im currently working on a Python/Pygame module to wrap some basic sprite animation. Animation
I am currently working on a piece of python code integrated with c++ on
I am currently working on reimplementing some algorithm written in Java in Python. One
I am currently working with the Python package Orange to run some classification tests
I am currently working on making a Python version of the game Connect Four.
I'm currently working on sprite sheet tool in python that exports the organization into
Currently working on a VBScript to automate some of the dirty PST ingestion work
I am currently working on Learn Python the Hard Way by Zed Shaw. I
I'm currently working on a Python/Twisted project which is to be distributed and tested

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.