Author Topic: Update re Python Plugins  (Read 13767 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1575
Update re Python Plugins
« 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 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.

Offline tankypon

  • Single posting newcomer
  • *
  • Posts: 4
Re: Update re Python Plugins
« Reply #1 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..

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1575
Re: Update re Python Plugins
« Reply #2 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.

Offline tankypon

  • Single posting newcomer
  • *
  • Posts: 4
Re: Update re Python Plugins
« Reply #3 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 :)


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: Update re Python Plugins
« Reply #4 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.
<debugger plugin maintainer>
(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!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1575
Re: Update re Python Plugins
« Reply #5 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.

Offline tankypon

  • Single posting newcomer
  • *
  • Posts: 4
Re: Update re Python Plugins
« Reply #6 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?
« Last Edit: January 23, 2014, 11:05:46 am by tankypon »

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1575
Re: Update re Python Plugins
« Reply #7 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.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1575
Re: Update re Python Plugins
« Reply #8 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.


Offline tankypon

  • Single posting newcomer
  • *
  • Posts: 4
Re: Update re Python Plugins
« Reply #9 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)
« Last Edit: July 08, 2014, 07:37:16 pm by tankypon »

Offline sasho

  • Single posting newcomer
  • *
  • Posts: 2
Re: Update re Python Plugins
« Reply #10 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 -  :)


Offline sasho

  • Single posting newcomer
  • *
  • Posts: 2
Re: Update re Python Plugins
« Reply #11 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
 :)

Offline edison

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Update re Python Plugins
« Reply #12 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?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1575
Re: Update re Python Plugins
« Reply #13 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?

Offline mikoff

  • Single posting newcomer
  • *
  • Posts: 5
Re: Update re Python Plugins
« Reply #14 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: [Select]
<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...
« Last Edit: January 24, 2016, 12:34:13 pm by mikoff »