pydev-code Mailing List for PyDev for Eclipse (Page 20)
Brought to you by:
fabioz
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(14) |
Apr
(18) |
May
(12) |
Jun
(34) |
Jul
(31) |
Aug
(37) |
Sep
(22) |
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(4) |
Mar
(9) |
Apr
(1) |
May
|
Jun
(2) |
Jul
(24) |
Aug
(3) |
Sep
(5) |
Oct
(3) |
Nov
(3) |
Dec
(5) |
2006 |
Jan
(5) |
Feb
(23) |
Mar
(5) |
Apr
(80) |
May
(26) |
Jun
(13) |
Jul
(13) |
Aug
(4) |
Sep
(31) |
Oct
(24) |
Nov
(6) |
Dec
(2) |
2007 |
Jan
(7) |
Feb
|
Mar
(26) |
Apr
(3) |
May
(8) |
Jun
(6) |
Jul
(11) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
(3) |
2008 |
Jan
(7) |
Feb
(1) |
Mar
(6) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
(6) |
Sep
(10) |
Oct
(5) |
Nov
(8) |
Dec
(5) |
2009 |
Jan
(8) |
Feb
(10) |
Mar
(10) |
Apr
(1) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(3) |
Sep
(12) |
Oct
(6) |
Nov
(22) |
Dec
(12) |
2010 |
Jan
(10) |
Feb
(17) |
Mar
(5) |
Apr
(9) |
May
(8) |
Jun
(2) |
Jul
(4) |
Aug
(12) |
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
|
2011 |
Jan
(14) |
Feb
(8) |
Mar
(3) |
Apr
(11) |
May
(6) |
Jun
(5) |
Jul
(10) |
Aug
(7) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(8) |
2012 |
Jan
|
Feb
(8) |
Mar
(10) |
Apr
(5) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(11) |
Nov
(1) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(11) |
Apr
(10) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(20) |
Sep
(4) |
Oct
(18) |
Nov
(5) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(5) |
Mar
(7) |
Apr
(5) |
May
(10) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2015 |
Jan
(1) |
Feb
(1) |
Mar
(8) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
(1) |
Oct
(3) |
Nov
(5) |
Dec
(1) |
2016 |
Jan
(26) |
Feb
(10) |
Mar
(4) |
Apr
|
May
(4) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
(3) |
2017 |
Jan
(3) |
Feb
|
Mar
(9) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(9) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
|
2018 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
2019 |
Jan
(4) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(4) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(11) |
2021 |
Jan
(3) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Fabio Z. <fa...@es...> - 2010-05-02 00:19:18
|
On Fri, Apr 30, 2010 at 11:56 AM, <cla...@at...> wrote: > Thanks for the reply, and sorry for the top-posting; my web-based client > does not work well any other way. > > The FastPythonPartitionScanner class looks like interesting code. What would > it take to finish it? Just from looking at the code, I notice: > 1) No constructor for the class. > 2) The PyCodeScanner class (is this unused? i.e. only used with > FastPythonPartitionScanner) seems to have a cut and paste error: > public void updateColors() { > setupRules(); > } > > The setupRules() call seems to be from a cut and pasted method. > 3) How much would plugin.xml for org.python.pydev have to change to use the > new scanner? Is the extension point the same as for the current scanner? > Just curious how close the combination of FastPythonPartitionScanner, > PyCodeScanner, and PyColoredScanner are to being completed and useful. Actually, the PyCodeScanner and PyColoredScanner already work well with the PyPartitionScanner. The FastPythonPartitionScanner was meant to be a drop-in replacement of the PyPartitionScanner to fix one issues when string partitions are changed (and I'm not sure what would it take to finish it without actually going through the process of implementing it). The code in the PyCodeScanner seems correct for me. Cheers, Fabio |
From: <cla...@at...> - 2010-04-30 14:57:03
|
Thanks for the reply, and sorry for the top-posting; my web-based client does not work well any other way. The FastPythonPartitionScanner class looks like interesting code. What would it take to finish it? Just from looking at the code, I notice: 1) No constructor for the class. 2) The PyCodeScanner class (is this unused? i.e. only used with FastPythonPartitionScanner) seems to have a cut and paste error: public void updateColors() { setupRules(); } The setupRules() call seems to be from a cut and pasted method. 3) How much would plugin.xml for org.python.pydev have to change to use the new scanner? Is the extension point the same as for the current scanner? Just curious how close the combination of FastPythonPartitionScanner, PyCodeScanner, and PyColoredScanner are to being completed and useful. Thanks, Clark -------------- Original message from Fabio Zadrozny <fa...@gm...>: -------------- > On Sat, Apr 24, 2010 at 5:39 PM, wrote: > > Searching for FastPythonPartitionScanner only turns up one hit, in > > FastPythonPartitionScanner.java. Who instantiates this scanner? > > I thought that I had downloaded a ZIP file of all the source code from > > SourceForge, following a link from pydev.org. However, some code must be > > missing from that ZIP file. For example, the pydev.core directory tree is > > not there. I then found another ZIP file that was twice as large and > > included the core directory and some others, but still no luck in searching > > on FastPythonPartitionScanner. > > > That class isn't really used. It's an initial attempt to replace the > actual scanner: org.python.pydev.core.docutils.PyPartitionScanner (but > still didn't get to the point of replacing it). > > Cheers, > > Fabio > > ------------------------------------------------------------------------------ > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code |
From: Fabio Z. <fa...@ap...> - 2010-04-29 17:01:57
|
On Sun, Apr 25, 2010 at 4:07 PM, <cla...@at...> wrote: > Another newbie question. Where can I read the code that calls a Python > interpreter when the user requests that their Python program should be Run? > (Including how it connects to a menu item like Run->Run As->Python.) > Thanks in advance. Take a look at org.python.pydev.debug/plugin.xml and org.python.pydev.debug.ui.launching.LaunchShortcut (and the rest goes from there). Cheers, Fabio |
From: <cla...@at...> - 2010-04-25 19:08:05
|
Another newbie question. Where can I read the code that calls a Python interpreter when the user requests that their Python program should be Run? (Including how it connects to a menu item like Run->Run As->Python.) Thanks in advance. |
From: <cla...@at...> - 2010-04-25 03:28:29
|
Never mind my followup question. I see that a partitioner and partition scanner get connected to the document. |
From: <cla...@at...> - 2010-04-25 02:38:10
|
-------------- Original message from Fabio Zadrozny <fa...@gm...>: -------------- > On Sat, Apr 24, 2010 at 5:39 PM, wrote: > > Searching for FastPythonPartitionScanner only turns up one hit, in > > FastPythonPartitionScanner.java. Who instantiates this scanner? > > I thought that I had downloaded a ZIP file of all the source code from > > SourceForge, following a link from pydev.org. However, some code must be > > missing from that ZIP file. For example, the pydev.core directory tree is > > not there. I then found another ZIP file that was twice as large and > > included the core directory and some others, but still no luck in searching > > on FastPythonPartitionScanner. > > > That class isn't really used. It's an initial attempt to replace the > actual scanner: org.python.pydev.core.docutils.PyPartitionScanner (but > still didn't get to the point of replacing it). > > Cheers, > > Fabio > > Thanks. That makes sense, because I even noticed an obvious cut and paste error in the code for FastPythonPartitionScanner. Now, I cannot see where anyone instantiates PyPartitionScanner or PyPartitioner. Sorry for the dumb questions; I am new to this! Thanks for any help. |
From: Fabio Z. <fa...@gm...> - 2010-04-24 23:08:34
|
On Sat, Apr 24, 2010 at 5:39 PM, <cla...@at...> wrote: > Searching for FastPythonPartitionScanner only turns up one hit, in > FastPythonPartitionScanner.java. Who instantiates this scanner? > I thought that I had downloaded a ZIP file of all the source code from > SourceForge, following a link from pydev.org. However, some code must be > missing from that ZIP file. For example, the pydev.core directory tree is > not there. I then found another ZIP file that was twice as large and > included the core directory and some others, but still no luck in searching > on FastPythonPartitionScanner. That class isn't really used. It's an initial attempt to replace the actual scanner: org.python.pydev.core.docutils.PyPartitionScanner (but still didn't get to the point of replacing it). Cheers, Fabio |
From: <cla...@at...> - 2010-04-24 20:39:25
|
Searching for FastPythonPartitionScanner only turns up one hit, in FastPythonPartitionScanner.java. Who instantiates this scanner? I thought that I had downloaded a ZIP file of all the source code from SourceForge, following a link from pydev.org. However, some code must be missing from that ZIP file. For example, the pydev.core directory tree is not there. I then found another ZIP file that was twice as large and included the core directory and some others, but still no luck in searching on FastPythonPartitionScanner. Thanks for any info. |
From: Jari P. <spa...@ok...> - 2010-04-09 22:10:14
|
Hi! Is it possible to write Jython script to PyDev that adds stuff to auto-completion? Such as classifiers = [ "Programming Language :: Python", "[CTRL+SPACE]", ] Would yield the list given in PyPi, http://pypi.python.org/pypi?:action=list_classifiers I'm also interested is it possible to modify the script that auto creates the docstrings, it would be handy if it were in Eclipse\plugins\org.python.pydev.jython_???\jysrc path so it would be easy to edit... I know it probably is written in Java at the moment so it is not in Jython source path. Currently I'm using Sphinx as doc generation and the @-signs are not used in rST formatted docs, also the used ''' is something that I don't use, I have """ in docstrings. These are matter of taste, but it would be easy to "adjust" the taste if they were Jython scripts... Sometimes doing elaborate configuration dialogs is harder to get right, editing the code would be easier to configure. |
From: Fabio Z. <fa...@ap...> - 2010-04-01 23:10:08
|
Hi All, Pydev 1.5.6 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: ------------------------------- * Django integration: * New Django project can be created through wizards * Can set an existing project as a Django project (right-click project > pydev > set as django project) * Can remove Django project config (right-click project > django > remove django project config) * Custom actions can be passed to the configured manage.py through ctrl+2+dj django_action -- if no action is passed, will open dialog to choose from a list of previously used commands. * Predefined/custom actions can be used through right-clicking the project > django > select custom action * manage.py location and settings module configured * Django shell (with code-completion, history, etc) available * Run/Debug as Django available * See: http://pydev.org/manual_adv_django.html for more details * Find/Replace: * The search in open files is no longer added in the find/replace dialog and now works through Ctrl+2+s word_to_find (in the Pydev editor) and if no word is passed, the editor selection is used * Go to definiton: * Properly works with unsaved files (so, it will work when searching for a definition on an unsaved file) * Properly working with eclipse 3.6 (having FileStoreEditorInput as the editor input) * Editor: * Automatically closing literals. * Removing closing pair on backspace on literal * Improved heuristics for automatically closing (, [ and { * Removing closing pairs on backspace on (,[ and { * ctrl+2+sl (sl comes from 'split lines' -- can be used to add a new line after each comma in the selection * ctrl+2+is (is comes from 'import string' -- can be used to transform the selected import into a string with dots * General: * Code-completion properly working on relative import with an alias. * Fixed racing issue that could deadlock pydev (under really hard to reproduce circumstances) * Removing reloading code while debugging until (if) it becomes more mature in the python side * Fixed issue where a new project created didn't have the source folder correctly set * Text selection in double click no longer has weird behavior * Local refactoring working on files not in the PYTHONPATH * Edit properly working on string substitution variables * Using with statement on python 2.5 no longer makes lines wrong in the AST What is PyDev? --------------------------- PyDev is a plugin that enables users to use Eclipse for Python, Jython and IronPython development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. Cheers, -- Fabio Zadrozny ------------------------------------------------------ Software Developer Aptana http://aptana.com/python Pydev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com |
From: Andy D. <an...@do...> - 2010-03-24 09:13:35
|
I am a newbie to the world of Python and its associated technologies. I wanted to get up to speed and selected PyDev as my vehicle of choice, based on various reviews etc. I also wanted to experiment with developing GUI code and select wxPython as the preferred framework. Unfortunately, I am getting issues with PyDev not recognising the various wxPython symbols, despite the fact that I am importing wxPython. From doing various searches it seems that this is a known bug in PyDev, but can anybody suggest the preferred solution? Component versions: Python 2.6.1 wxPython 2.8 PyDev 1.5.5 Thanks |
From: Peter S. <psh...@bl...> - 2010-03-23 16:44:34
|
I'm not a big fan of any current python documentation tools. My concern is that they document the code as it appears in files, not as it is actually used at runtime. Pydev's introspection is incredible. I was thinking that a little markup and the information that pydev has collected would be vastly superior to any current doc tools. I haven't dug into Pydev's source at all, but how compatable would it be from this workflow? Is the introspector some library I can run, and then walk over the results? How much work would this be to get into a Python interpreter? Is it tied closely to Jython or the rest of the pydev editor? I've been thinking about starting something like this for a little while. How feasible would it be? |
From: Fabio Z. <fa...@gm...> - 2010-03-23 14:39:42
|
On Tue, Mar 23, 2010 at 11:07 AM, jmf <jea...@ma...> wrote: > Hi, > > Just registred to the mailing list ! I'm using pydev for a long time (about > three or four years now). > > I really like this eclipse plugin. > > I have two issues. The first one is related to my current working process & > tools: > > * I'm adding a folder to the pydev python path. > * completion is working well. > * the source folder is deleted and rebuild by my deployment tool (zc.buildout > + collective.recipe.omelette) > * completion doesn't work anymore. > > To fix this, I need to remove the folder from python path, validate, re add it > and validate. > > I'm under Linux with Aptana Studio, build: 2.0.3.1265134283 > > The second one is on performance / memory purpose: > > * my current project load 290 eggs in the python path (lots of code) > * When the project is built and completion refreshed, some times I got memory > related errors. It seems that the more code there is in the python path the > more pydev need memory to build the project. I'm not sure this issue comes > from pydev because I have also the svn plugin that is working, but when I > rebuild from python's path pydev comes to a memory monster : ) > > I have an intel core2 duo with 4 GO on my workstation but not on my laptop, so > I need to remove the main features why I'm using pydev on it: completion. > > Most of vim users complains about memory usage of eclipse/pydev. But eclipse > by default only used 50 MO. When activate pydev and ask for completion on a > simple Plone it comes to 1GO ... a bit too much. Hope you guys will be able to > improve this in the futur. > Can you give details about your setup and create a bug-report for that? (one for the loss of code-completion and another for the memory usage) Please add the following data on the memory report: 1. are those eggs all with .zips or uncompressed? 2. How much memory are you passing to -Xmx ? 3. The problem is on requesting a completion or on a rebuild? Note that java has the habit of going to the maximum and recycling memory after that, so, if you pass 1GB to it, it may use all that even if it could cycle before, as it usually goes for performance rather than memory -- and it depends a lot on where you're seeing that memory usage -- personally, I leave it around 500 MB (and I do work with some large projects). It may be that it has some problem specific to your setup, but I need more details to get into that). Also, if you were able to pass a heap dump of your memory in the case where you see it using too much memory that would help a lot (see the Getting Started of http://www.eclipse.org/mat/ for details on how to get that) -- just don't forget to zip it before sending (although it can still be a big file, so, if you may need to put it in a ftp somewhere so that I can get it). And also, it would be nice if you can get a clean eclipse only with pydev to this test (as having svn or other plugins will probably add too much noise -- in which case I might not be able to get a proper analysis of the dump). Cheers, Fabio |
From: jmf <jea...@ma...> - 2010-03-23 14:08:11
|
Hi, Just registred to the mailing list ! I'm using pydev for a long time (about three or four years now). I really like this eclipse plugin. I have two issues. The first one is related to my current working process & tools: * I'm adding a folder to the pydev python path. * completion is working well. * the source folder is deleted and rebuild by my deployment tool (zc.buildout + collective.recipe.omelette) * completion doesn't work anymore. To fix this, I need to remove the folder from python path, validate, re add it and validate. I'm under Linux with Aptana Studio, build: 2.0.3.1265134283 The second one is on performance / memory purpose: * my current project load 290 eggs in the python path (lots of code) * When the project is built and completion refreshed, some times I got memory related errors. It seems that the more code there is in the python path the more pydev need memory to build the project. I'm not sure this issue comes from pydev because I have also the svn plugin that is working, but when I rebuild from python's path pydev comes to a memory monster : ) I have an intel core2 duo with 4 GO on my workstation but not on my laptop, so I need to remove the main features why I'm using pydev on it: completion. Most of vim users complains about memory usage of eclipse/pydev. But eclipse by default only used 50 MO. When activate pydev and ask for completion on a simple Plone it comes to 1GO ... a bit too much. Hope you guys will be able to improve this in the futur. -- Regards, JeanMichel FRANCOIS Makina-Corpus |
From: Fabio Z. <fa...@gm...> - 2010-03-04 22:25:28
|
Hi All, Pydev 1.5.5 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: ------------------------------- * Predefined completions available for code completion: * Predefined completions may be created for use when sources are not available * Can also be used for providing better completions for compiled modules (e.g.: PyQt, wx, etc.) * Defined in .pypredef files (which are plain Python code) * Provides a way for generating those from a QScintilla .api file (experimental) * See Predefined Completions in manual for more info * Pydev Package Explorer: * Showing the contents of the PYTHONPATH from the interpreter for each project * Shows the folder containing the python interpreter executable (to browse for docs, scripts, etc) * Allows opening files in the interpreter PYTHONPATH (even inside zip files) * Editor options: * Find/replace dialog has option to search in currently opened editors * Move line up/down can move considering Python indentation (not default) * Simple token completions can have a space or a space and colon added when applied. E.g.: print, if, etc (not default) * Refactoring: * Fixed InvalidThreadAccess on refactoring * Fixed problem doing refactoring on external files (no file was found) * Globals Browser (Ctrl+Shift+T): * No longer throwing NullPointerException when the interpreter is no longer available for a previously found token * General: * When creating a new pydev project, the user will be asked before changing to the pydev perspective * Only files under source folders are analyzed (files in the external source folders would be analyzed if they happened to be in the Eclipse workspace) * Interactive console now works properly on non-english systems * Hover working over tokens from compiled modules (e.g.: file, file.readlines) * JYTHONPATH environment variable is set on Jython (previously only the PYTHONPATH was set) * Fixed path translation issues when using remote debugger * Fixed issue finding definition for a method of a locally created token What is PyDev? --------------------------- PyDev is a plugin that enables users to use Eclipse for Python, Jython and IronPython development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. Cheers, -- Fabio Zadrozny ------------------------------------------------------ Software Developer Aptana http://aptana.com/python Pydev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com |
From: patrick f. <pa...@we...> - 2010-02-22 20:01:14
|
Hi - I've been wanting this feature for some time and it finally occurred to me that I might try writing it myself. Should ask first. I'm looking for an emacs-sytle Prev command and Next command for the debug-time eval windows (Console). Where with, say, a single keystroke command you cycle through a buffer of saved commands - including if the commands are multi-line (you get the command as one piece). Does this exist already? If not, then how hard would writing it be and what would be involved? Haven't done any eclipse plugin work yet, but I'm an experienced programmer and I believe I saw demos online already that walk you through the mechanics of doing a trivial plugin. I could go through that and get some sense of the landscape. thanx - pat |
From: Fabio Z. <fa...@es...> - 2010-02-22 19:07:13
|
> On Sun, Feb 21, 2010 at 4:09 PM, Leo Soto M. <leo...@gm...> wrote: > [...] >> Under Jython it doesn't start a new process, but a new thread. The >> thread is started using thread.start_new_thread though, which makes it >> untraceable. > > For the sake of correctness I must say I shouldn't have used > "untraceable" here. There is nothing preventing the thread code to be > traced. It's just that the threading.settrace() hook only works for > threads started using the threading module, but not for the ones > started using the low-level thread module. > An idea might be asking the Django guys to make it more friendly to debuggers so that this can be easier -- maybe even passing a patch to them -- this is one of the things I have in my checklist after the django integration is in place. Best Regards, Fabio |
From: Leo S. M. <leo...@gm...> - 2010-02-21 19:12:13
|
On Sun, Feb 21, 2010 at 4:09 PM, Leo Soto M. <leo...@gm...> wrote: [...] > Under Jython it doesn't start a new process, but a new thread. The > thread is started using thread.start_new_thread though, which makes it > untraceable. For the sake of correctness I must say I shouldn't have used "untraceable" here. There is nothing preventing the thread code to be traced. It's just that the threading.settrace() hook only works for threads started using the threading module, but not for the ones started using the low-level thread module. -- Leo Soto M. http://blog.leosoto.com |
From: Leo S. M. <leo...@gm...> - 2010-02-21 19:10:01
|
On Sun, Feb 21, 2010 at 3:55 PM, Fabio Zadrozny <fa...@es...> wrote: > > Actually, Pydev should already trigger debugging in any thread (it > sets the threading.settrace to do that). Yeah, but some code uses thread.start_new_thread directly, which is something not handled by > I believe django creates a separate process to do that, which is the > reason the remote debugger must used for debugging django (a version > without the reload feature should already work for all threads). True, but that's the behavior of Django under CPython. Under Jython it doesn't start a new process, but a new thread. The thread is started using thread.start_new_thread though, which makes it untraceable. > What could be done is that the remote debugger is started and each new > process calls pydevd.settrace(suspend=False, traceAllThreads=True), > where traceAllThreads is a flag that is still not implemented, which > calls threading.settrace(debugger.trace_dispatch) for all new threads > -- not only the pydevd_tracing.SetTrace(debugger.trace_dispatch) -- > and maybe pass the sys._current_frames to set the tracing for existing > threads. > > If you think that'd be useful, I can create that option... Actually, I discovered that the whole thing won't be useful for my use case (debug the Django dev server under Jython with autoreloading enabled). Unfortunately the debugger connection will be lost when the reloading takes place (as it reloads the whole interpreter). However, here is a use case: 1. You have the following program in PyDev: import thread def hello(name): print "Hello", name thread.start_new_thread(hello, ("World",)) 2. You put a debugger marker on the print line. 3. You debug the program, but it never stops. Nor on CPython nor Jython. The fix/hack consisted on the following code (with self.monkeyPatchThread() being invoked after threading.settrace(), in PyDB.run()): def monkeyPatchThread(self): import types try: import thread except: import _thread as thread # Python 3 original_start_new_thread = thread.start_new_thread def patched_start_new_thread(func, *args, **kwargs): def patched_func(*args, **kwargs): import sys pydevd_tracing.SetTrace(self.trace_dispatch) func(*args, **kwargs) original_start_new_thread(patched_func, *args, **kwargs) if self.isJythonClassModule(thread): thread.start_new_thread = staticmethod(patched_start_new_thread) else: thread.start_new_thread = patched_start_new_thread def isJythonClassModule(self, module): try: from java.lang import Class except: return False else: return isinstance(module, Class) But it only works correctly with Jython. With CPython it hits the debugger but then somehow the connection is lost. I'm probably not pushing this forward (since it won't work for the Django server use case), but anyway, that's the code if anyone is interested. -- Leo Soto M. http://blog.leosoto.com |
From: Fabio Z. <fa...@es...> - 2010-02-21 18:55:14
|
On Sun, Feb 21, 2010 at 2:45 PM, Leo Soto M. <leo...@gm...> wrote: > Hi all, > > When running the Django server under the PyDev debugger there is a > problem: Under Jython the server spawns a worker thread which do all > the actual work while the main thread just keeps monitoring the > filesystem for changes. But, AFAICS, the pydev debugger only monitors > the main thread. > > I'm playing with monkey-patching thread.start_new_thread to set > sys.settrace to the internal settrace function used with PyDev when > executing the function in the new thread. > > Any obvious reason I'm missing why that may be a bad idea? Actually, Pydev should already trigger debugging in any thread (it sets the threading.settrace to do that). I believe django creates a separate process to do that, which is the reason the remote debugger must used for debugging django (a version without the reload feature should already work for all threads). What could be done is that the remote debugger is started and each new process calls pydevd.settrace(suspend=False, traceAllThreads=True), where traceAllThreads is a flag that is still not implemented, which calls threading.settrace(debugger.trace_dispatch) for all new threads -- not only the pydevd_tracing.SetTrace(debugger.trace_dispatch) -- and maybe pass the sys._current_frames to set the tracing for existing threads. If you think that'd be useful, I can create that option... Cheers, Fabio |
From: Leo S. M. <leo...@gm...> - 2010-02-21 17:45:28
|
Hi all, When running the Django server under the PyDev debugger there is a problem: Under Jython the server spawns a worker thread which do all the actual work while the main thread just keeps monitoring the filesystem for changes. But, AFAICS, the pydev debugger only monitors the main thread. I'm playing with monkey-patching thread.start_new_thread to set sys.settrace to the internal settrace function used with PyDev when executing the function in the new thread. Any obvious reason I'm missing why that may be a bad idea? -- Leo Soto M. http://blog.leosoto.com |
From: Thomas J. <th...@sk...> - 2010-02-18 18:14:26
|
One of the deployment alternatives of eclipse+pydev we deal with is running it remotely via Exceed/Citrix. This unfortunately causes some performance problems: When a project is created, there is a pop-up window displaying file names as they are read and analysed into the project, at a wild pace. Apparently Citrix/Exceed has a very hard time keeping up with the graphics updates, causing a disastrous communication degradation with the remote location. There is really no reason except for the enjoyment as far a I can see to actually see the rapid burst of names. Is there a way to turn this off, to make this process 'quieter' graphics-wise ? Thank you in advance -- Thomas Johnsson |
From: Fabio Z. <fa...@es...> - 2010-02-10 23:26:40
|
On Thu, Feb 4, 2010 at 4:38 PM, Gazi Alankus <al...@gm...> wrote: > Hi, > I would like to be able to send ctrl+c to the interactive console and want > it to throw a KeyboardInterrupt exception on the currently running Python > code, like it does in Python's default interpreter. Right now, the only > option is to terminate the console by pressing the red button. > I checked out the code and will soon start trying to work on it, but I have > zero experience with eclipse programming. I thought I would ask which one > would be easier: to catch a hotkey, to put an icon on the console's toolbar, > or to put a context menu entry. I'd appreciate any input to get me started > in the right direction. > One other thing: > in com.python.pydev.interactiveconsole.EvaluateActionSetter, > before onCreateActions, the comment reads: "This method associates Ctrl+new > line with the evaluation of commands in the console.". Does that mean > pressing ctrl+enter in the python editor is supposed to send the current > line to the console? If so, that would be awesome. However when I press > ctrl+enter that's not happening. Actually, it's no longer bound to Ctrl+Enter, but Ctrl+Alt+Enter (see: http://pydev.org/manual_adv_interactive_console.html ) As for sending a Ctrl+C, the problem isn't really on the Eclipse side of things, but in the design of the interactive console: in Python, only the main thread will catch signals, so, that's where you send the Ctrl+C, but in the interactive console it'll only evaluate what you send on a line by line basis, where the main thread is the actual interactive console, so, I'm not sure how useful that'd be (or are you just aiming at killing the process and providing a secondary option?) The code to look at the Python side is pydevconsole.py (at org.python.pydev/PySrc). Cheers, Fabio |
From: Fabio Z. <fa...@es...> - 2010-02-10 23:10:13
|
On Mon, Feb 8, 2010 at 7:37 AM, Kostas Georgiou <geo...@gm...> wrote: > Hello again, > Now I see, it is the java no capable of stopping a thread problem. This > would need an external monitor of threads (maybe some wrapping of jconsole > :-)) > For now maybe is better of having the editor's completion server on a > thread. What do you think? Could you point me to the class implementing it? > Also what I would like to do is to have control over the spawned jython > process, like the executable and the vm arguments. Do you think is it > possible to construct the java command from inside pydev? I want to run a > custom configured jython process. > Regards > Kostas > PS. The interpreters should have an internal mechanism of cancelling a > halted or deadlocked command when in interactive mode ( like on Flash > Actionscript or Matlab I think). Hi Kostas, The java-side class that handles it is AbstractShell.java and in the Python/Jython side it's pycompletionserver.py Cheers, Fabio p.s. please don't top-post |
From: Fabio Z. <fa...@es...> - 2010-02-10 22:54:02
|
On Wed, Feb 10, 2010 at 9:58 AM, Escalona, Diego <Die...@di...> wrote: > Hello all, > > > > I’m working with Pydev’s Remote Debugger and Eclipse and I have a problem > with multi-thread Python applications. The remote debugger only traces the > MainThread and the breakpoints it has, but if I try to add a breakpoint to a > different thread it doesn’t stop. > > > > I’ve written a simple piece of code to test it: > > > > -------------------------------------------------------------------------------- > > > > import threading > > import time > > import pydevd > > pydevd.settrace('10.101.1.193', suspend=False) > > > > class myThread(threading.Thread): > > def __init__(self): > > threading.Thread.__init__(self) > > > > def run(self): > > i = 10 > > while i > 0: > > print "hello ", i > > i = i - 1 > > time.sleep(2) > > > > my_thread = myThread("hello!") > > my_thread.start() > > > > for i in range(10): > > print "bye ", i > > time.sleep(5) > > > > -------------------------------------------------------------------------------- > > > > > > If I put a breakpoint on the “print hello” line and another one on the > “print bye” line, the debugger only stops on the “print bye” line, which > belongs to the main thread. > > > > How could I make the debugger to trace the new thread and stop on its > breakpoints? > > > Just answered you in the forum: https://sourceforge.net/projects/pydev/forums/forum/293649/topic/3549899 Cheers, Fabio |