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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:31:58+00:00 2026-05-26T16:31:58+00:00

Sometimes when I open a python file (.py extension) in the PyDev Package Explorer,

  • 0

Sometimes when I open a python file (.py extension) in the PyDev Package Explorer, that file is opened as a plain text file – without syntax highlighting, breakpoint setting and all the other great PyDev features. I cannot see any differences to other files in the same folder. When I create another .py file (this time PyDev realises that it is a python source file), add an import unrecognised_file statement with a breakpoint, debug the file and choose to “Step into” the unrecognised file, it suddenly comes good and I can see syntax highlighting and can use breakpoints and all.

After closing the unrecognised_file and re-opening it, it is back to dumb text mode an I can’t use the PyDev features.

Any clues about what is going wrong? What is the algorithm for determining if a file is a python file or a text file?

  • 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-26T16:31:59+00:00Added an answer on May 26, 2026 at 4:31 pm

    If this happens (and the association for file marks “Python editor” as the default in the preferences), you can right-click the file and do “open with > other” and choose “Python editor” from the list.

    That setting should be persisted for that file later on (what could’ve happened is that you opened the file as text and Eclipse persists that, so, opening again with the PyDev editor should make the association correct again).

    p.s.: the debugger forces opening files with the PyDev editor, but that setting is not persisted as when you open the file through the PyDev Package Explorer (that’s why it works when you’re in a debug session).

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

Sidebar

Related Questions

I have seen that in perl sometimes to open a file for writing they
I have a window that I sometimes open using Show() and sometimes using ShowDialog()
Sometimes, when I open the a file like so: FILE *file = fopen(fname, wb);
I read the ini file to open a file in python. The thing is
I have a CSV-like text file that has about 1000 lines. Between each record
In Python 2.x with 'file-like' object: sys.stdout.write(bytes_) tempfile.TemporaryFile().write(bytes_) open('filename', 'wb').write(bytes_) StringIO().write(bytes_) How to do
I'm trying to write some generic http response handler functions that sometimes open UIAlertViews.
For the following Python code: fp = open('output.txt', 'wb') # Very big file, writes
currently im making some crawler script, one of problem is sometimes if i open
When running my application I sometimes get an error about too many files open

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.