I recently started using Dart and Flutter for Mobile App dev on VSCode, and I love how the mouse-over tooltip for methods shows return type, expected parameters, and the source of the method:
I understand that Python is not a strongly typed language so showing type information is not possible for variables. But what about methods in python?
The information in mouse-over tooltip seems extremely hard to read, and not really helpful. I don't know where the method came from and what it outputs. The description is also not very readable. Am I doing something wrong, or is this really not a feature? Or do I just need to learn to read that tooltip?
It seems this is the behaviour when using Jedi.
You can refer to this page for more details.
I suggest you using Pylance as language server. Adding the following codes to your settings.json:
"python.languageServer": "Pylance"
Related
I used to use spyder-IDE for python programming, for example, I used the sum function in pytorch library, torch.sum(), using keyboard shortcut "ctrl+I" to quickly see how to use the function, input and output parameters, examples code and so on. However, with the latest pylance_v2021.9.1+vscode 1.6+pytorch 1.9 you cannot see the detailed help information, it seems that you can only see it by typing torch.sum()? in the terminal, Is there some extensions that provides this feature? Thank you!
Official vscode says (IntelliSense through the Pylance language server) that use pylance+pytorch 1.8.1 or later release support mouse hover to see pytroch detailed preview information, but I use the latest version of vscode 1.6+pytorch 1.9 but it doesn't work, it only shows function signature hints, not detailed help information.
2021.9.17 update, Description example update:
This image is the detailed help information of "torch.sum" obtained by spyder-IDE
However, it is not easy to get such detailed help information in vscode, but only the function signature shown below(left), unless you type torch.sum? in the python interactive window to see the full help information every time(right). Moreover, the full "Docstring" is not rendered, so it is not easy to read visually like spyder-IDE.
The above two use the same python environment,the various versions used areļ¼ vscoder1.6+pytorch1.9+(microsoft)python_v2021.9.1230869389+pylance_v2021.9.2, spyderIDE4.0
Have you click this?
Then it should be like this:
the sum would be like this:
But if you want to get more information, it depends on the docs, such as AdaptiveAvgPool2d:
But the sum does not contains that:
I'm new to python scripting in Abaqus. I'm trying to make sense of the documentation but I don't get it. So far I found the following documentation:
This abaqus scripting user guide: http://abaqus.software.polimi.it/v6.13/books/cmd/default.htm?startat=pt02ch06s01.html
This abaqus scripting reference document: http://abaqus.software.polimi.it/v6.13/books/ker/default.htm
Now let's say that I want to know more about the OdbMeshElementArray class. How do I do this?
If I use the search function on the site than it just gives 0 hits.
If I download the pdf of the reference guide and I use ctrl+F then I do get hits, but there's no direct way to go to the page explaining specifically more about this class. E.g. I get a lot of hits of this search term in which I'm not interested. I just want to know the attributes and methods of this class.
Any advice?
Abaqus Scripting User Guide is more of a beginner guide, which shows how things can be done. Similar to Getting Started With Abaqus, whereas Abaqus Scripting Reference Guide is the complete list of commands, classes and objects available. Similar to the Abaqus Analysis User Guide
The search function works for me as well, try using Simulia Doc hosted by DSS itself.
I found the documentation for the OdbMeshElement object?
You can use the side bar (on the left) to get the documentation for the other objects then too
So far I have only been taught how to program/script at my school for console programs but wanted to start making some applications with an actual interface other then the command-line, unfortunately I have no idea where to begin. I tried to look it up but all I found were guides on how to "design" them not program them. As such I would like to ask you how exactly should I get started on this, I know this is a rather broad question but just a few links to some study material that can help me get started is enough. The languages I have been taught are Visual Basic and Python but I also know HTML and CSS, I am only slightly familiar with JavaScript.
(Bonus Question: so when looking at the website for Atom.io I saw that the editor was made in JavaScript, node.js, HTML and CSS. I was wondering how did they use HTML and CSS for a desktop app? Also, is it possible to do that without node.js and JavaScript, say for example with Python?)
Recommend begin with:
Visual Basic: Windows Forms(have a nice GUI editor, easier than TkInter)
Python: TkInter(Everything simple with pack()).
About HTML/CSS/JS desktop app use Electron http://electron.atom.io/
Given you already know python , you can use python library "Tkinter" to get started.
https://www.tutorialspoint.com/python/python_gui_programming.htm
https://wiki.python.org/moin/TkInter
Have a look at Graphics Py document created by John Zelle
http://mcsp.wartburg.edu/zelle/python/graphics/graphics.pdf
I'm using PyCharm 3.4.1 and learning MongoDB from Mongo University. In the code, they have us using Python to create html pages using the MVC pattern with bottle.
When I add a file of type .tpl to the editor in PyCharm, there is no "intellisense" or support for the model in the code. Changing it to be in the list of html file types helps some, but no python support in the editor.
Is there a plugin or some other change i can make to support editing better? Seems someone else asked something similar earlier in the year at How to get tpl files highlighted in pycharm?
Bottle comes with a built-in template engine called SimpleTemplate which is not currently supported by PyCharm.
There is a relevant feature request: Bottle microframework support, but it doesn't explicitly state about .tpl syntax support.
I'd go and create a feature request in PyCharm's issue tracker asking about SimpleTemplate syntax support or, at least, vote up and comment in the existing issue.
For example, there is the similar feature-request for tornado template engine:
Add Tornado Template Support
It has currently 56 votes up which is probably increasing the possibility of seeing it happen.
As a workaround, you can configure .tpl file type under Settings -> File Types. It is possible to set highlighting rules there.
I am currently using AsciiDoc for documenting my software projects because it supports PDF and HTML help generation. I am currently running it through Cygwin so that the a2x toolchain functions properly. This works well for me but is a pain to setup on other Windows computers. I have been looking for alternative methods and recently revisited Sphinx. Noticing that it now produces HTML help files I gave it a try and it seems to work well in the small tests I performed.
My question is, is there a way to specify map id's for context sensitive help in the text so that my Windows programs can call the proper help API and the file is launched and opened to the desired location?
In AsciiDoc I am using pass::[<?dbhh topicname="_about" topicid="801"?>]. By using these constructs a context.h and alias.h are generated along with the other HTML help files (context sensitive help information).
I do not know about AcsiiDoc much, but in Sphinx you can reference arbitrary locations by placing anchors where you need them. See :ref: role.