News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Update re Python Plugins

Started by dmoore, December 31, 2013, 07:51:35 PM

Previous topic - Next topic

dmoore

For better or worse, I have started consolidating all of my open source stuff on github. So the old cbilplugin project on berlios is now codeblocks-python on github.

The github page lists the plugins and has screenshots. I am still thinking about the best way to share the plugins with end users.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

tankypon

Hi, I'm a new user of the forum.
I use Code::Blocks for some years now and I'm just registering because I like your job!
The idea to implement Python in Code::Blocks is pretty cool thanks.
For me, It's one of the thing it miss to Code::Blocks. So thank you to provide that to the community!
I will try to use your plugin the more I can ahah, because I didn't found yet my python IDE maybe Code::Blocks now.

Now I have a question: What is the difference between "PythonCodeCompletion-cc" and "PythonCodeCompletion"?

And I have a suggestion: the first time I used python plugins, Code::Bloks has crashed every time I typed code. It was due to Jedi was not installed in my system.. So it will be more robust if you can check if Jedi is installed on the system to prevent crashes, and if is not installed just tell to the user in warning message to install it.

PS: And sorry for my student english..

dmoore

Quote from: tankypon on January 19, 2014, 10:46:18 AM
Hi, I'm a new user of the forum.
I use Code::Blocks for some years now and I'm just registering because I like your job!
The idea to implement Python in Code::Blocks is pretty cool thanks.

Well, thank you for testing them.

Quote
For me, It's one of the thing it miss to Code::Blocks. So thank you to provide that to the community!
I will try to use your plugin the more I can ahah, because I didn't found yet my python IDE maybe Code::Blocks now.

I tend to use the file manager instead of projects when I am working with python. Then use Tools (or Tools plus plugin) to create launchers for python

Quote
Now I have a question: What is the difference between "PythonCodeCompletion-cc" and "PythonCodeCompletion"?

PythonCodeCompletion-cc works with the refactoring of the Code::Blocks SDK to better support multiple code completion plugins (see https://github.com/alpha0010/codeblocks_sf/tree/cc_interface, make sure you get the cc_interface branch). It adds support for showing docstrings and is generally more robust.

PS: That plugin may move to a separate branch to make merging changes from the main plugin easier.

Quote
And I have a suggestion: the first time I used python plugins, Code::Bloks has crashed every time I typed code. It was due to Jedi was not installed in my system.. So it will be more robust if you can check if Jedi is installed on the system to prevent crashes, and if is not installed just tell to the user in warning message to install it.

Thanks for the bug report. I will look into it.

Quote
PS: And sorry for my student english..

No apology needed, you write clearly.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

tankypon

Thank you for your advices. Yes I agree with you for the file manager, it's more easy.
I never used Tools before (because I didn't know is goal) but I'm stupid for never try it before today because it's a great tool. I can know launch my python script inside Code::Blocks, it's amazing! Before that, I used a terminal.

QuotePythonCodeCompletion-cc works with the refactoring of the Code::Blocks SDK to better support multiple code completion plugins (see https://github.com/alpha0010/codeblocks_sf/tree/cc_interface, make sure you get the cc_interface branch). It adds support for showing docstrings and is generally more robust.
I understand. I use the nithglies build of Code::Blocks, do you know if these builds are using this cc_interface?

QuoteThanks for the bug report. I will look into it.
I try the newer version of your plugins and I have no crash even when the jedi library is not installed just now a  dialog appear to prevent users to install jedi or python. Thank you for this fast patch.
If I see bugs, I will reported them in this topic :)


oBFusCATed

Quote from: tankypon on January 20, 2014, 08:58:01 PMI understand. I use the nithglies build of Code::Blocks, do you know if these builds are using this cc_interface?
No, not yet, but hopefully in the near future we'll merge the changes back.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

dmoore

Quote from: tankypon on January 20, 2014, 08:58:01 PM
Thank you for your advices. Yes I agree with you for the file manager, it's more easy.
I never used Tools before (because I didn't know is goal) but I'm stupid for never try it before today because it's a great tool. I can know launch my python script inside Code::Blocks, it's amazing! Before that, I used a terminal.

The Tools+ plugin does the same thing as Tools but lets you redirect output to a Code::Blocks dock window and links to file/line# in python error messages are clickable. (I am eventually going to merge that feature into Tools then kill off Tools+)

Quote
If I see bugs, I will reported them in this topic :)

Sounds good. But feel free to use the github issues for more complicated issues/requests.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

tankypon

#6
QuoteNo, not yet, but hopefully in the near future we'll merge the changes back.
Sounds great, I build every week a new nightly build of Code::Blocks. So when the changes will be merged, I'll have it.

QuoteThe Tools+ plugin does the same thing as Tools but lets you redirect output to a Code::Blocks dock window and links to file/line# in python error messages are clickable. (I am eventually going to merge that feature into Tools then kill off Tools+)
It's just weird in the fact of the existence of two tools ("tools" and "tools+"), I think it's a good idea to just have a tool with the features of the two tools.

QuoteSounds good. But feel free to use the github issues for more complicated issues/requests.
No problems

Which version of Python is used to interpret Python commands in the plugin "Python Interpreter"? 2.7, that's it?

dmoore

Quote from: tankypon on January 23, 2014, 09:39:55 AM
It's just weird in the fact of the existence of two tools ("tools" and "tools+"), I think it's a good idea to just have a tool with the features of the two tools.

Agree that it's a little weird, but it's how it is for now. Tools+ does almost everything Tools does, and there's an option (under Tools+ -> Configure Tools -> Plugin Settings) to have Tools+ replace the Tools menu. In addition to being able to display tool output as tabs in a notebook window, the tools will also display when you right click the file manager and project tree (right click on one or more files), and you can organize tools into submenus. I will try sometime in the next month to create a patch merging the features into the original Tools implementation (or making hooks for plugins).

Quote
Which version of Python is used to interpret Python commands in the plugin "Python Interpreter"? 2.7, that's it?

I am using 2.7. I didn't hardcode the executable paths so it should work with any version of python that is in the system path and interp.py will work with (same deal with PythonCodeCompletion's python server: python_completion_server.py). They *might* work with python 3.x but I haven't checked.

I still need to add a configuration panel so that users can choose a custom command line to launch python in the different plugins (it might also be useful to be able to have multiple interpreters with different python versions or envs). I think I will make a single configuration dialog for all three plugins in a separate plugin, since it is annoying to have to hunt all over for common settings.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

Just a note that the Python code completion plugin has been updated for the latest changes in trunk. Python CC should be more stable and provides doc strings.

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

tankypon

#9
It's been a while but again thank you for your plugin. Previously, I have said if I see a bug I will report and that's the case:
I put my cursor in the python interpreter, if I press 'Enter': the command is executed, good. But if I press 'Alt+Enter', a new line is created in the window of my python file instead of the window of the python interpreter.

PS: I post the bug here, because I'm sure you will see it instead of use the bug report of github. In the future, if you want I can use the bug report of this platform

PS bis: Which is the version of Python used by Python interpreter? (I mean 2.7 or 3.4)

sasho

I am trying to build the Python Code Completion plugin on Fedora 20 (kernel  3.15.10-201.fc20.x86_64)
Unfortunatelly after loading the workspace file  and trying to build target 'All"
i get 'wx/complier.h  not found '  - it is coming out of  wx platform.h
Now i do have wx-3.0  installed  ( devel) . Most likely 'wx' issue  but it the plugin code including wx.
Any suggestion highly appreciated.
Would be nice if one gets the binaries directly -  :)


sasho

Referring to my question about wx - i did realize that one has to build wxWidgets from source and than install this build  which will contain , compiler and setup header files .
So do the following :

1. Download the latest stable source for the platform to required  :
http://www.wxwidgets.org/downloads

2. Build the source as per the graphical interface - in my case GTK  for F20
yum install gtk+-devel.x86_64

this will install  GTK3  dev

3. In the extracted folder of  wx source  the doc folder contains various docs but to find
the installation instruction goto folder with the desired graphical interface  - in my case  gtk
/wxWidgets-3.0.1/docs/gtk

4. Follow  the instructions to build the wx  in the file install.txt

Last but not the least would have been very usefull if in the steps to build the plugin is added the requirement for wx build
:)

edison

Quote from: dmoore on March 22, 2014, 03:02:02 PM
Just a note that the Python code completion plugin has been updated for the latest changes in trunk. Python CC should be more stable and provides doc strings.

I built codeblocks-python with CB SVN 9133 in Windows using gcc 4.9.1 and wxWidgets 2.8.12, but when I ran the CB, there is a pop-up window said "process launch failed" .

How can I fix this problem?

dmoore

Quote from: edison on October 03, 2014, 06:42:17 AM
Quote from: dmoore on March 22, 2014, 03:02:02 PM
Just a note that the Python code completion plugin has been updated for the latest changes in trunk. Python CC should be more stable and provides doc strings.

I built codeblocks-python with CB SVN 9133 in Windows using gcc 4.9.1 and wxWidgets 2.8.12, but when I ran the CB, there is a pop-up window said "process launch failed" .

How can I fix this problem?

Do you have python in the path? Which version?
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

mikoff

#14
Hello.
I have downloaded and built plugins set using CodeBlocks (target cbplugin).
But how can i install them? When i use Plugins->Install plugin menu item i am asked for .cbplugin file that doesn`t exist... The output file for this target is libXmlRpcEmbedder.a
If i select target "all" i also unable to find .cbplugin file.
Could you clarify the installation steps?
Thanks.

Update:
i was able to build all plugins except PythonInterpreter - i am stuck with the message "PythonInterpreter.cpp|44|undefined reference to `wxEVT_SHELL_ADD_CLICKED'|"

Code completion doesn`t work, i am getting the message "ERROR PROCESSING PYCC REQUEST: Check the log for details"
In the log i see the following:
Error requesting calltip
<value><array><data><value>XmlRpc server is not connected.</value></data></array></value>

Are there exist any ppa's where i can get codeblocks ide with these plugins enabled by default? Because as i can see from SVN, it is bundled with contrib plugins set now...