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 8980557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:07:03+00:00 2026-06-15T20:07:03+00:00

I am using the collective.python buildout. I have the following .pythonrc (configured with export

  • 0

I am using the collective.python buildout.

I have the following .pythonrc (configured with export PYTHONSTARTUP=~/.pythonrc):

import readline
import rlcompleter
readline.parse_and_bind('tab: complete')

When I run Python in the shell, tab completion works. When I run Plone in debug mode it does not. Unless, I paste the contents of my .pythonrc into the Plone debug Python prompt. What am I missing here?

Note: Pasting the contents of my .pythonrc only works when I install Plone via python bootstrap.py (i.e. bootstrapping Plone buildout with collective.python Python). If I install Plone inside a virtualenv, nothing works. But at least in that scenario, the missing functionality makes sense to me (i.e. something is probably missing from the virtualenv that is required to make tab completion work.)

  • 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-06-15T20:07:04+00:00Added an answer on June 15, 2026 at 8:07 pm

    The instance controller uses two command-line switches; -i for interactive mode, and -c to load the Zope configuration and set up the app variable. The -c switch is what disables the PYTHONSTARTUP environment variable.

    You could modify the plone.recipe.zope2instance package to run the script anyway.

    In plone.recipe.zope2instance, find the plone/recipe/zope2instance/ctl.py file, alter the do_debug() method to:

    def do_debug(self, arg):
        interactive_startup = ("import os;"
            "os.path.exists(os.environ.get('PYTHONSTARTUP', '')) "
            "and execfile(os.environ['PYTHONSTARTUP']); del os;"
            'import Zope2; app=Zope2.app()')
        cmdline = self.get_startup_cmd(self.options.python,
                                       interactive_startup,
                                       pyflags = '-i', )
    

    In fact, I like the idea of supporting PYTHONSTARTUP so much I committed that change to the recipe already, see rev 536f8fc1c4!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a module import issue. using python 2.6 on ubuntu 10.10 I have
I have a small project I am doing in Python using web.py. It's a
I'm using Python Flask + nginx with FCGI. On some requests, I have to
I'm using Python in conjunction with MongoDB. I have an array of words, and
I have done the python application to search the SharePoint content using SharePoint web
I have a python script that is using curl to post a file into
I have a problem implementing the following in python: I have a nxn matrix
I have built a couple of test cases as stand alone python classes using
I have a simple datagrid to which I am binding a collection using ItemsSource.
I'm using Python 3.1.1 and PyQt4 (not sure how to get that version number?).

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.