Running a code file

2005-09-04
2012-11-13
  • Nobody/Anonymous

    How can I run a file containing e.g. Java or Python code directly from within the editor? Is it possible to pass the current file as an argument to the interpreter?

    Thx for any help!

     
    • Stepho

      Stepho - 2005-09-27

      Joost> You also don't provide an option to edit the 'launch in firefox' command, which would also have solved the problem by allowing imitation.

      A quick look at the config file allows you to "imitate"; that's how I found out about the $(FULL_CURRENT_PATH). :-)

      But I agree that a simple example in the "Run" dialog box would be helpfull. :-)

       
    • Stepho

      Stepho - 2005-09-08

      I have found 2 solutions to your problem (by looking into the shortcuts.xml config file) :

      1) The lazy one (my favorite) : if the interpreter for your file is associated to this file's extension in the Windows registry (e.g. python.exe is associated to all ".py" files), add this entry in the run menu :
      "$(FULL_CURRENT_PATH)"

      This will ask the shell to execute your file, hence launching the associated interpreter.

      I call this option "lazy" because, you only need to add a single entry to the run menu to handle any file type (provided it's defined in the Windows registry).

      2) If you prefer to have more control : add an entry for each interpreter :
      C:\...\python.exe "$(FULL_CURRENT_PATH)"

      With this solution you can send any file to any of the interpreters you have defined.

      I hope this will suit you :-)

      Stepho.

       
      • Nobody/Anonymous

        Thanks a lot. It might actually help if there were a brief help text in the Run dialog, I should think.

         
    • Nobody/Anonymous

      I agree with adding the help text to the Run dialog. The only reason I'm here is to find out the $(FULL_CURRENT_PATH) thing. I'm quite an experienced windows user, and have tried %1, $1, {}, %s, but nothing worked. You can't expect users to guess the $(FULL_CURRENT_PATH) thing.

      You also don't provide an option to edit the 'launch in firefox' command, which would also have solved the problem by allowing imitation.

      -- Joost

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks