Commit Graph

217 Commits

Author SHA1 Message Date
Emmanuel Briot
21e072de50 (Load_Python_Startup_Files): In case of error, no more need to reimport the
file to display the error messages. This trick didn't always work, and a
 better solution has been put in place where error messages are sent to the
 Messages window if the Python console doesn't exist


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@93503 936e1b1b-40f2-da11-902a-00137254ae57
2005-10-04 13:01:05 +00:00
Emmanuel Briot
37f60b4ccc (Run_Command): Even if the output should be hidden, we display unhandled
exceptions in the current console associated with the python interpreter
 (either the Python console if open, or the Messages window, unless these have
 been overriden). Helps debugging scripts


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@93489 936e1b1b-40f2-da11-902a-00137254ae57
2005-10-03 13:21:25 +00:00
Emmanuel Briot
1e341fe667 (Override_Default_IO): new subprogram. Makes sure that changing the console
associated with the python interpreter will also display results of print to
 that console.
 In particular, this fixes the case where a filter set for an action is in
 fact raising an exception, which would be displayed in the python console if
 it exists, and would not be displayed otherwise. If the python console does
 not exist, we fall back on the Messages window, so that such error messages
 and exceptions and filters are properly displayed for the user, which helps
 debugging


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@93488 936e1b1b-40f2-da11-902a-00137254ae57
2005-10-03 13:20:28 +00:00
Emmanuel Briot
16697f7779 (Display_Prompt): Do nothing unless the console is editable (since the prompt
should only be displayed in that case). Fixes issue where the prompt is
 displayed in the Messages window (see the AWS integration)


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@93430 936e1b1b-40f2-da11-902a-00137254ae57
2005-09-27 08:39:50 +00:00
Emmanuel Briot
7f522643c0 Undo temporary change done for E830-020, which breaks the python console
completly (no output ever)


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@93414 936e1b1b-40f2-da11-902a-00137254ae57
2005-09-26 08:14:34 +00:00
Pascal Obry
107ca7567e (Load_Python_Startup_Files): Add support for the GPS_CUSTOM_PATH. This
is consistent with what is done for the .xml files. This way it is
 possible to load Python file in non standard location as pointed by
 the GPS_CUSTOM_PATH variable.
Reorder with clauses.
Minor reformatting.
Part of work for E923-010.


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@93413 936e1b1b-40f2-da11-902a-00137254ae57
2005-09-24 08:59:27 +00:00
Quentin Ochem
d0a44900df (Create_Python_Console): Temporary removed the call to Initialize_IO.
This is a part of E830-020.


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@93304 936e1b1b-40f2-da11-902a-00137254ae57
2005-08-30 18:42:00 +00:00
Emmanuel Briot
c7112254e2 Adapted to the new API for modules
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92704 936e1b1b-40f2-da11-902a-00137254ae57
2005-07-11 15:06:49 +00:00
Arnaud Charlet
57c9e93217 Remove cast to PyCodeObject, not recognized/needed by Python 1.3
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92655 936e1b1b-40f2-da11-902a-00137254ae57
2005-07-08 13:19:49 +00:00
Emmanuel Briot
06353be6b9 (Py_Class_Is_Subclass): Now implemented in our own layer in C
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92640 936e1b1b-40f2-da11-902a-00137254ae57
2005-07-08 08:27:21 +00:00
Emmanuel Briot
b193f870da Various changes to the functions so that we support both Classes and
"new-style" classes of Python (aka objects deriving from the object class)


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92639 936e1b1b-40f2-da11-902a-00137254ae57
2005-07-08 08:27:01 +00:00
Emmanuel Briot
daaa305f5c (Register_Module): Do not added documentation for the GPS module, since this
is done in shell_commands.xml now.


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92509 936e1b1b-40f2-da11-902a-00137254ae57
2005-06-30 09:59:54 +00:00
Emmanuel Briot
ef470b3785 Add support for overriding "+", "-", "<" and ">" when creating a new
class. Used for EditorLocation


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92460 936e1b1b-40f2-da11-902a-00137254ae57
2005-06-24 15:16:16 +00:00
Emmanuel Briot
ad79b4f00d (Set_Data, Get_Data, Get_Instance): New subprograms since it is now the
responsability of each language to associate a widget and a class instance
 to avoid memory leaks and storage_errors
Fixes memory leaks where some python objects were never freed, in particular
 class instances


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92420 936e1b1b-40f2-da11-902a-00137254ae57
2005-06-22 10:32:05 +00:00
Emmanuel Briot
37bcaabe7d Change the way DEBUG works (so that Print_Refcount can always be used in GPS
to debug the reference counting for scripts)


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@92419 936e1b1b-40f2-da11-902a-00137254ae57
2005-06-22 10:31:03 +00:00
Emmanuel Briot
598060b6ae (Get_Refcount): New subprogram
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91968 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-22 15:05:30 +00:00
Arnaud Charlet
ba81502a4d (Load_Python_Startup_Files): Take into account plug-ins directory.
Part of E302-005,E302-007.


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91726 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-11 14:15:45 +00:00
Emmanuel Briot
d60e95115d Make sure the error when "pygtk" is not found doesn't appear on the terminal
when GPS is launched


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91653 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-07 10:06:52 +00:00
Emmanuel Briot
fa516dfced Add flags for pkg-config since gtk.h is now needed to compile python_support.c
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91649 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-07 09:08:57 +00:00
Emmanuel Briot
f100c0cc3b Add needed pragma Unreferenced
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91646 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-07 08:37:51 +00:00
Emmanuel Briot
a49e86b3fb (GPS.MDI.add): New function, registered only when pygtk is found, so that
users can integrate pygtk widgets inside the MDI


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91644 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-07 08:18:56 +00:00
Emmanuel Briot
7a4bf7f1cc (ada_widget_from_pyobject): New function, for better integration with pygtk
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91643 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-07 08:18:29 +00:00
Emmanuel Briot
2cf3e2d837 (Run_Command): Recognize python's error message when the user types
if 1:
   pass
 else:  <return>
We used to stop with an exception. Reported in D902-011


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91625 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-06 13:31:42 +00:00
Emmanuel Briot
7a9afc72cb (Add_Class_Method, Add_Static_Method): Set the documentation to the fully
qualified name of the method so that we can get the documentation properly
 from the python shell (otherwise we do not have access to the name of the
 class.


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91617 936e1b1b-40f2-da11-902a-00137254ae57
2005-04-06 12:48:14 +00:00
Arnaud Charlet
f8864900a7 Replace unnecessary use of 'Unrestricted_Access by 'Unchecked_Access.
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@91212 936e1b1b-40f2-da11-902a-00137254ae57
2005-03-18 13:55:55 +00:00