KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.3KB

  1. <?php
  2. /*************************************************************************************
  3. * python.php
  4. * ----------
  5. * Author: Roberto Rossi (rsoftware@altervista.org)
  6. * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2004/08/30
  9. *
  10. * Python language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/12/18
  15. * - Added missing functions and keywords. Also added two new Python 3.0 types. SF#2441839
  16. * 2005/05/26
  17. * - Modifications by Tim (tim@skreak.com): added more keyword categories, tweaked colors
  18. * 2004/11/27 (1.0.1)
  19. * - Added support for multiple object splitters
  20. * 2004/08/30 (1.0.0)
  21. * - First Release
  22. *
  23. * TODO (updated 2004/11/27)
  24. * -------------------------
  25. *
  26. *************************************************************************************
  27. *
  28. * This file is part of GeSHi.
  29. *
  30. * GeSHi is free software; you can redistribute it and/or modify
  31. * it under the terms of the GNU General Public License as published by
  32. * the Free Software Foundation; either version 2 of the License, or
  33. * (at your option) any later version.
  34. *
  35. * GeSHi is distributed in the hope that it will be useful,
  36. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  37. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  38. * GNU General Public License for more details.
  39. *
  40. * You should have received a copy of the GNU General Public License
  41. * along with GeSHi; if not, write to the Free Software
  42. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  43. *
  44. ************************************************************************************/
  45. //This
  46. require(dirname(__FILE__).'/python.php');
  47. $language_data['LANG_NAME'] = 'Python (console mode)';
  48. $language_data['STRICT_MODE_APPLIES'] = GESHI_ALWAYS;
  49. $language_data['SCRIPT_DELIMITERS'][-1] = '/^(>>>).*?$(?:\n\.\.\..*?$)*($)/m';
  50. $language_data['HIGHLIGHT_STRICT_BLOCK'][-1] = true;
  51. $language_data['STYLES']['SCRIPT'][-1] = 'color: #222222;';
  52. if(!isset($language_data['COMMENT_REGEXP'])) {
  53. $language_data['COMMENT_REGEXP'] = array();
  54. }
  55. $language_data['COMMENT_REGEXP'][-1] = '/(?:^|\A\s)(?:>>>|\.\.\.)/m';
  56. $language_data['STYLES']['COMMENTS'][-1] = 'color: #444444;';
  57. ?>