Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Get Eclipse/PyDev to run scripts that don't end in .py

Reply
Thread Tools

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

 
 
J
Guest
Posts: n/a
 
      03-31-2010
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
 
Reply With Quote
 
 
 
 
Martin P. Hellwig
Guest
Posts: n/a
 
      04-01-2010
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/pyde...s/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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Scripts run using load in "for" loop run out of order Fa Sidd Ruby 12 01-26-2008 12:06 AM
What is required for perl scripts to run correct when launched from rc scripts on HPUX 11? deanjones7@gmail.com Perl Misc 13 09-10-2007 11:58 AM
How Can I Run Scripts to Get Client Info? vunet.us@gmail.com ASP General 3 04-27-2007 04:14 PM
Cant get perl scripts to run Lee Perl Misc 6 02-25-2004 03:08 PM



Advertisments