403 Commits

Author SHA1 Message Date
Emmanuel Briot
5bdaecb241 (Block_Commands): New subprogram
(Execute*): Do nothing if commands are temporarily blocked


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89202 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-19 10:46:39 +00:00
Emmanuel Briot
ae42b0a0d1 (Execute_Command): Fix handling of unbound methods
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89147 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-15 13:08:26 +00:00
Emmanuel Briot
14514eba2a Remove debug code in previous check in
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89146 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-15 13:04:16 +00:00
Emmanuel Briot
5998a0a560 (Subprogram_Type): Fix handling of bound methods (see python FAQ in doc)
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89145 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-15 13:03:57 +00:00
Emmanuel Briot
abe2245f72 (PyMethod_Self): New subprogram
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89144 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-15 13:03:41 +00:00
Emmanuel Briot
663e1aee6b Fix handling of commands with hidden output. In particular, when computing
possible completions, the output of the commands was inserted in the middle
 of the user's partial command. Fixed by redirecting sys.stdout.write no
 a do-nothing subprogram


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89126 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-14 09:54:19 +00:00
Emmanuel Briot
0d23fd16b6 (Initialize_IO): New subprogram. Fix build failure on platforms that do not
have python


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89125 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-14 09:02:43 +00:00
Emmanuel Briot
968aa16f34 Comment update
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89124 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-14 08:17:42 +00:00
Emmanuel Briot
6700f0d66f (GPS_Data_Attr): New subprogram. Fixes handling of single inheritance,
broken by support for multiple inheritance (see comments in code)


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89123 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-14 08:15:51 +00:00
Emmanuel Briot
c59776762b (Initialize_IO): New subprogram
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89095 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-13 13:33:57 +00:00
Emmanuel Briot
0653c6cda3 (GPS.Console): Class removed, since replaced by a more general class common
to all shells. This provides better code sharing, and simplifies this
 package a lot
(Initialize_IO): Removed


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89094 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-13 13:33:41 +00:00
Emmanuel Briot
b617c4475a (GPS.Console.__init__): No longer accepts the capture parameter, since we no
longer capture the output of commands
(Run_Command): Do not capture the output of the command, only its returned
 value, as we do for shell functions anyway. This is used in the context
 of GPS actions, and only the returned value is relevant, since the output
 can be redirected to other consoles


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89092 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-13 13:05:39 +00:00
Emmanuel Briot
52415eddaa Remove debug code from previous check in
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89090 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-12 16:16:28 +00:00
Emmanuel Briot
53b23afb37 (Python_Console_Interrupt_Handler): Fix handling of interrupts in python
console, since ctrl-c should be a simple copy-paste when not running a
 command


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89089 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-12 16:16:16 +00:00
Emmanuel Briot
50e9f8ab12 (In_Process): New subprogram
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89088 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-12 16:15:41 +00:00
Emmanuel Briot
f0a190a559 Major code cleanup: the python console is now implemented through a real
Interactive_Console, so that this package no longer has to deal with low-level
 details of Gtk_Text_Buffer.
 This also fixes issues with the handling of the prompt and the location of
 the cursor with the arrow keys


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89083 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-12 14:52:05 +00:00
Emmanuel Briot
6c7bce98b4 (Python_Console_Command_Handler, Python_Console_Completion_Handler,
Python_Console_Interrupt_Handler): New subprograms
(Set_Console): Removed
The python console is now implemented through a real interactive_console.
 Fixes some problems with handling of the prompt and the location of the
 cursor. Code cleanup


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89082 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-12 14:50:36 +00:00
Emmanuel Briot
b32e18bcc6 (PyFile_WriteString): New subprogram
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89081 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-12 14:48:47 +00:00
Emmanuel Briot
2a284f5e16 (Destroy): New subprogram. Protect against the destruction of the python
module, since it is destroyed before the rest of the GPS interface is
 destroyed


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89076 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-12 07:47:11 +00:00
Emmanuel Briot
d2c1ff42d5 Adapted to new API for interactive_console
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89070 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-11 16:37:09 +00:00
Emmanuel Briot
839a721744 Adapted to new API for Set_Data/Get_Data and Is_Subclass.
(Primitive_Free): Only free the pointer for a class_instance if no ref to
 it is left. Fixes Storage_Error when storing a Class_Instance with a
 widget


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@89069 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-11 16:36:54 +00:00
Emmanuel Briot
af3657b655 (Set_Nth_Arg): Inc the reference counting if necessary for instances and
subprograms, since Py_TupleSetItem doesn't do it automatically


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@88991 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-04 12:40:41 +00:00
Emmanuel Briot
609dbe2296 (Register_Module): Set the initial default console for python to the
messages window, so that error messages from ~/.gps/python_startup are
 still readable
(Load_Python_Startup_Files): Show in the Messages window only the output
 containing errors, not expected outputs, to keep the contents of the
 Messages window short


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@88982 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-01 13:41:52 +00:00
Emmanuel Briot
ae5b444235 (Insert_Text): Output in traces if no console is defined, to ease debugging
git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@88981 936e1b1b-40f2-da11-902a-00137254ae57
2004-10-01 13:40:38 +00:00
Emmanuel Briot
042f237389 (Load_Python_Startup_Files): Hide the command used to autoload the GPS
installed files, cleaner


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@88967 936e1b1b-40f2-da11-902a-00137254ae57
2004-09-30 09:33:48 +00:00