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

  • Home
  • SEARCH
  • 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 530565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:12:36+00:00 2026-05-13T09:12:36+00:00

Python Shell – shell.appspot.com is acting weird? or am I missing something? Google App

  • 0

Python Shell – shell.appspot.com is acting weird? or am I missing something?

Google App Engine/1.3.0
Python 2.5.2 (r252:60911, Apr  7 2009, 17:42:26) 
[GCC 4.1.0]

>>> mycolors = ['red','green','blue']
>>> mycolors.append('black')
>>> print mycolors
['red', 'green', 'blue']

But the below result is expected

['red', 'green', 'blue', 'black']

And also same with the dictionary data type.

Thanks,

Abhinay

  • 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-13T09:12:36+00:00Added an answer on May 13, 2026 at 9:12 am

    Short Answer

    That is a known bug. Short answer:

    • Include everything on one line: mycolors.append('black'); print mycolors
    • Use my free software tool, App Engine Console. My code is derived from the shell and I have fixed this bug.

    Long answer

    The bug involves the way that state is stored in between every command you type. Web requests are stateless and request/response only; however the shell (and my console app) is supposed to feel like a stream of consciousness as it is at the traditional Python prompt.

    The implementation is roughly this:

    1. Get a request from a browser which includes a line to execute
    2. Pull up the specific session which the browser is “in”. Basically that is a module similar to __main__ with some variable bindings.
    3. Execute the given line of code in that module’s context
    4. Save state by looping through all variable bindings in the context and…
      • If the variable is hitherto unseen, store its name and value in the datastore
      • If not, ignore it. Here is the bug. You should actually check whether the variable has changed.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I do something like this in a python shell for my Django app:
I'm using the Python Shell in this way: >>> s = 'Ã' >>> s
In shells like the interactive python shell, you can usually use the arrow keys
Can someone explain to me this odd thing: When in python shell I type
Possible Duplicate: How do I determine if my python shell is executing in 32bit
Why? C:\path\>manage.py shell Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
When i start django shell by typing python manage.py shell the ipython shell is
My python script executes fine in Jail shell, putting out html which I can
I have a Python script that needs to issue a number of shell commands.
I have a python function that makes a subprocess call to a shell script

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.