Is it possible to control Webots from external Python IDE (like pyCharm) ? I would appreciate if there is an example showing how to do so and location of modules to be added. Thanks
Yes, there is some new documentation on how to run Webots robot controllers within PyCharm here.
Related
Is it possible to use Spyder in conjunction with Micropython? Currently I use an application called Thonny which provides access (and discovery) of my remote (USB) device using a remote interpreter dialog box. I'd like to use Spyder in a similar manner. Spyder has a remote interpreter facility but I an unable to discover my USB device within facility. I'm using Windows10.
I can't find any currently available way of interacting with your MicroPython device directly from within Spyder, but of course you can use Spyder to edit your code and transfer it to the micro using rshell, for example.
In principle it looks like it should be possible to write a Spyder plugin for MicroPython, if your desktop Python skills are good and you fancy a project.
Depending on what board you're running MicroPython on you might be able to use a plugin for Pycharm. There are Pycom plugins for VSCode and Atom but I don't know whether those work for any boards other than the Pycom ones.
Hi All
I have python and robotframework installed on my Windows 7, I wanted to configure this into Eclipse IDE.
I was trying with External Tools to configure it by giving Pybot.bat file and working directory but I am able to understand the Arguments ${resources_loc} section. Here what value we have to give??
can someone help me out with this or provide alternative to configure it?
When Eclipse is your main IDE and prefer to use it for developing Robot Framework scripts, then there is only one plugin you need to be aware of Nokia RED. It can be downloaded from the Eclipse market place and adds a new perspective for the dedicated robot functionality.
In the RED Robot Editor User Guide there is a specific section on running a RED Robot project providing you with all the details. However, I recommend you start with the "Hello World" section.
Why don't you try PyCharm Community edition for Robot Framework with Python. It has all the necessary configuration for you to make. Here is the link for PyCharm CE.
It has all the required plugging in its settings-> Interpreter options. You can download all the robot framework plugins and libraries that is required for you to write and execute the code.
I have the Python Extensions for Windows installed. Within the PythonWin IDE I can get autocomplete on Automation objects (specifically, objects created with win32com.client.Dispatch):
How can I get the same autocomplete in VS Code?
I am using the Microsoft Python extension.
The Python Windows Extensions has a tool called COM Makepy, which apparently generates Python representations of Automation objects, but I can't figure out how to use it.
Update
Apparently, the Microsoft Python extension uses Jedi for autocompletion.
I've filed an issue on the extension project on Github.
Note that in general I have Intellisense in Python; it's only the Intellisense on Automation objects that I am missing.
Review
I have confirmed your problem in VSCode, although it may be possible IntelliSense works fine. Note Ctrl+Space invokes suggestions for a pre-defined variable:
However, there does not appear to be public attributes available for win32com.client by default. This may be why IntelliSense does not appear to work.
Test
Having installed win32com for Python 3.6, I have confirmed the following code in Jupyter notebook, IPython console and the native Python REPL:
import win32com.client
app = win32com.client.Dispatch("Word.Application")
len(dir(app))
# 55
[x for x in dir(app) if not x.startswith("_")]
# []
This issue of hidden attributes is not a new. Please confirm this test in another environment/IDE. It may be your environment or particular version of PythonWin pre-loads certain variables in the global namespace.
Verify the following:
The Python extension is installed
A Python interpreter is selected
A Python file is selected; this starts up the Python server
References
Post by the extension's creator for troubleshooting autocompletion issues.
Thread on how autocompletion works via PyScriptor
I don't think that the example you show with PythonWin is easily reproducible in VS Code. The quick start guide of win32com itself (cited below) says, its only possible with a COM browser or the documentation of the product (Word in this case). The latter one is unlikely, so PythonWin is probably using a COM browser to find the properties. And because PythonWin and win32com come in the same package, its not that unlikely that PythonWin has a COM browser built in.
How do I know which methods and properties are available?
Good question. This is hard! You need to use the documentation with the
products, or possibly a COM browser. Note however that COM browsers
typically rely on these objects registering themselves in certain
ways, and many objects to not do this. You are just expected to know.
If you wanted the same functionality from the VS Code plugin a COM browser would have to be implemented into Jedi (IntelliSense of the VS Code plugin).
Edit: I found this suggestion, on how a auto-complete, that can find these hidden attributes, could be done:
These wrappers do various things that make static analysis difficult,
unless we were to special case them. The general solution for such
cases is to run to a breakpoint and work in the live runtime state.
The auto-completer should then include the complete list of symbols
because it inspects the runtime.
The conversation is from an mailing list of the python IDE wingwide. Here you can see, that they implemented the above mentioned approach:
I think your problem is related to defining Python interpreter.
Choose proper Python interpreter by executing python interpreter command in VS Code command palette by pressing f1 or ctrl+shift+p key.
I would like to access external qgis plugins through a python script. I have been able to access the built in qgis processing and vector toolboxs, but have been unsuccessful with external plugins such as the topology checker plugin. I have tried this both using the built in qgis python console, and an exteranl IDE, but attempts have failed.
I am sure that there is a way to do this, has someone done this before?
Thank you!
You could add the qgis plugin folder to your path. That way you should be able to import them as a module.
Have a look at my blog to find a way to load QGIS plugins in a standalone PyQGIS application (in Spanish):
http://geotux.tuxfamily.org/index.php/en/component/k2/item/229-cargando-plugins-de-quantum-gis-en-el-visor-de-pyqgis
There you'll find a QgisInterface class, which you must use to be able to run plugins out of QGIS. This class is now being employed by QGIS devs to run PyQGIS tests.
As you can se, the blog post is very old, so I don't warrant it'll work out of the box, but for sure it's a very good guide for you to accomplish what you want.
I was just wondering if there was a way to get Python (in Netbeans) to recognize the methods that I write in a class. For example when I do self.method() I just want Netbeans to recognize it's a method in the class I am currently in. Does Netbeans 8.0 Python IDE not support that right now, or is there something I can do to make Netbeans recognize them?
There are several plugins available in netbeans plugin portal from which you can download and install them to your netbeans. Here is a link: http://plugins.netbeans.org/plugin/61688/python
These will support minimal editing, building, debugging.
These are also available in Netbeans plugin menu. You can also download it from there!