Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: dmoore on December 31, 2013, 07:51:35 pm

Title: Update re Python Plugins
Post by: dmoore on December 31, 2013, 07:51:35 pm
For better or worse, I have started consolidating all of my open source stuff on github. So the old cbilplugin (http://developer.berlios.de/projects/cbilplugin/) project on berlios is now codeblocks-python (https://github.com/spillz/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.
Title: Re: Update re Python Plugins
Post by: 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.
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..
Title: Re: Update re Python Plugins
Post by: dmoore on January 20, 2014, 04:01:51 pm
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.
Title: Re: Update re Python Plugins
Post by: 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.

Quote
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.
I understand. I use the nithglies build of Code::Blocks, do you know if these builds are using this cc_interface?

Quote
Thanks 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 :)

Title: Re: Update re Python Plugins
Post by: oBFusCATed on January 20, 2014, 09:05:35 pm
I 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.
Title: Re: Update re Python Plugins
Post by: dmoore on January 21, 2014, 05:09:01 am
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.
Title: Re: Update re Python Plugins
Post by: tankypon on January 23, 2014, 09:39:55 am
Quote
No, 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.

Quote
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+)
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.

Quote
Sounds 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?
Title: Re: Update re Python Plugins
Post by: dmoore on January 23, 2014, 04:21:24 pm
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.
Title: Re: Update re Python Plugins
Post by: 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.

Title: Re: Update re Python Plugins
Post by: tankypon on July 08, 2014, 07:34:40 pm
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)
Title: Re: Update re Python Plugins
Post by: sasho on September 07, 2014, 12:50:04 pm
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 -  :)

Title: Re: Update re Python Plugins
Post by: sasho on September 07, 2014, 02:21:37 pm
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
 :)
Title: Re: Update re Python Plugins
Post by: edison on October 03, 2014, 06:42:17 am
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?
Title: Re: Update re Python Plugins
Post by: dmoore on October 04, 2014, 12:41:57 am
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?
Title: Re: Update re Python Plugins
Post by: mikoff on January 24, 2016, 09:08:16 am
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
Code
<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...
Title: Re: Update re Python Plugins
Post by: yvesdm3000 on March 22, 2017, 07:56:41 pm
I sent a pull-request for an annoying bug that I fixed.

Please see https://github.com/spillz/codeblocks-python/issues/5

Yves