Get Eclipse/PyDev to run scripts that don't end in .py

Discussion in 'Python' started by J, Mar 31, 2010.

  1. J

    J Guest

    Is there any way to tell PyDev in Eclipse to run a script that doesn't
    end in .py? Even if I have to go and manually set something for each
    file...

    I've inherited (in a manner of speaking) a dev project that is done in
    python2.6... I pulled the latest dev branch and have it opened as a
    project in Eclipse, however, none of the python files end in .py, so
    PyDev only sees them as text files. And because of that, I can't run
    them in Eclipse to try my changes, debug, etc.

    So, is there a way to make them show up as python code without the .py
    extension? Because of this, I also don't get any of the fancy
    indenting and highlighting that I'd normally get...

    Cheers,

    Jeff
     
    J, Mar 31, 2010
    #1
    1. Advertising

  2. On 03/31/10 22:37, J wrote:
    > Is there any way to tell PyDev in Eclipse to run a script that doesn't
    > end in .py? Even if I have to go and manually set something for each
    > file...
    >
    > I've inherited (in a manner of speaking) a dev project that is done in
    > python2.6... I pulled the latest dev branch and have it opened as a
    > project in Eclipse, however, none of the python files end in .py, so
    > PyDev only sees them as text files. And because of that, I can't run
    > them in Eclipse to try my changes, debug, etc.
    >
    > So, is there a way to make them show up as python code without the .py
    > extension? Because of this, I also don't get any of the fancy
    > indenting and highlighting that I'd normally get...
    >
    > Cheers,
    >
    > Jeff


    You probably need to do that one level higher, i.e. in Eclipse (hint:
    Preferences>General>Editors>File Associations <don't forget to also add
    a 'Associated editors' for your new defined file type>).

    I do have a couple of remarks though.

    It sounds to me like you inherited something of more or less a 'shipped'
    product. Perhaps it would be wise to invest some time to restructure the
    project so that it works nicely with all the tools you have (unit
    testing, coverage, refactoring, etc.) and build a script that from your
    source builds the actually release (resembling that what you have
    inherited).

    <whining_mode status='on'>
    This question would probably have been more suitable in
    http://sourceforge.net/projects/pydev/forums/forum/293649 (that is the
    PyDev forum), and it is likely that they would have sent you through to
    http://www.eclipse.org/forums/ .
    </whining_mode>

    --
    mph
     
    Martin P. Hellwig, Apr 1, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. angel

    eclipse + pydev

    angel, Jul 23, 2004, in forum: Python
    Replies:
    3
    Views:
    889
    Steve Menard
    Jul 23, 2004
  2. akbowbender
    Replies:
    1
    Views:
    418
    ChrisH
    Aug 24, 2004
  3. David Hirschfeld

    Validator client scripts don't run on web host.

    David Hirschfeld, Jul 13, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    162
  4. Replies:
    13
    Views:
    574
    Anno Siegel
    Sep 10, 2007
  5. Graham Stow

    My Perl scripts don't run anymore

    Graham Stow, Nov 3, 2007, in forum: Perl Misc
    Replies:
    5
    Views:
    101
    Uri Guttman
    Nov 4, 2007
Loading...

Share This Page