I am running Spyder 2.1.9, and I am liking it. I like how much information is provided by the Object inspector, but it only brings info on the various objects if I either type them into my program via the editor or directly into the Object inspector. Is there any way to highlight an object in your code and bring up the information in the Object inspector?
Also as a secondary question. The auto fill pop up when entering is nice (for instance if I am using the csv module and I type csv. into the editor it brings up all of the possible calls for that module), but doesn't work for Tkinter. Any idea as to why this may be?
The answer to your first question is negative, unfortunately. See official bug report on the Spyder group.
You can use CTRL+I on the console to invoke the Inspector from any object, and you can also use it on functions (but not arbitrary objects/variables) from the editor. It's a known inconsistency.
For example, type the following into your Editor window:
import math
x = 3.14159
y = math.sin(x)
Now click on the word math and press CTRL-I. Nothing happens. Click on the word sin and press CTRL-I. The Inspector will show up the documentation for sin().
Now try typing the same three lines into a Python console in Spyder, and repeat. You'll see that pressing CTRL-I after clicking math will work.
Related
I'm a new Python user and I'm just playing around with customizations in Spyder. This question is just out of curiosity.
I saw that when I go to Tools > IPython console > Display there's a drop down menu under "Completion Type" that allows the user to "Decide what type of completion to use", and gives 3 available choices (Graphical, Terminal and Plain).
I googled around and tried switching between the 3 of them but I can't get a hang of what are the differences between the 3 of them. Any insight?
They relate to how suggestions are displayed when you press tab. e.g. I type keras.layers. then press tab, it'll show the possible completions, the completion type refers to how these suggestions are displayed
Based on my observations,
Graphical = a box that you can scroll through
Terminal = text style (displayed below code) that cutoffs at some point
Plain = text style that does not cutoff
Note: You need to restart your IPython consoles to see the changes.
What do I need to do to have variables display their values in XCode?
I don't have it in Auto pane, and it also does not show when I hover over it. Why is that?
I can go Add Expression and sometimes it will display it correctly, and I can also do NSLog and log it, but this seems really ridiculous in the year of 2013.
I am using XCode 4.6. Am I doing something wrong, or this basic functionality just does not exist?
You can use the local variables section in the content pane to view variable values while debugging:
You can use shift + command + Y to toggle the above pane.
For more information regarding debugging in xCode, check out the following link.
In the console use the command 'po' (stands for print object)
e.g. po [self myVariable]
This will give you more information than this semi-useless variable tree in the content pane.
hints:
1) Make sure your build configuration is set to Debug, or you can't debug local variables.
2) Sometimes you need to debug structs and primitives, in this case use 'p' instead of 'po'
3) you can use dot notation (po self.myVariable), but for some data types this doesn't seem to work. I believe it depends on your xcode version
I'm working in a Delphi IDE expert and I wonder if it's possible add new items to the code completion combobox displayed by the Delphi IDE when the user press CtrlSpace
UPDATE:
What I need is add items to the code completion list based in a specified type.
example suppose which I have a type called TMytype, what I want to do is add addional items to the code completion list when the user type a variable of the type TMytype
check this image
I found your question somewhat confusing but if you are in search of credible source on "Custom Live Templates" and the like on Delphi, head to the blog of Cary Jensen here.
Edit:
Looking forward to further improvement of the scope of the question, I suggest here another direction to explore:
Source code manipulation using IOTAEditor, IOTASourceEditor, IOTAEditReader and the like
Some Parsing for sanity check prior to apply any modification.
Adoption of Client DataSet as a format to store data (It's serializable) to simplify the coding of IDE editors.
Perhaps I haven't fully grasped the extent of what you are asking here, but you can add templates simply by going to 'View|Templates' from the Delphi IDE. This then opens a template viewer. Press the '+' icon. It opens a template1.xml document which you can then edit so create your new item.
If you wish to do this programatically, just add an xml file (of the same format) to the ..\RAD Studio\code_templates folder.
I use Beyond Compare (version 3.1.10) to compare different versions of Delphi Form Files, but I don't want to see differences concerning ExplicitTop, ExplicitLeft, ExplicitHeight and ExplicitWidth.
Details:
These lines will always begin with a number of whitespace characters, then "ExplicitXXX = " and a number. Older versions of Delphi didn't have these lines, so I want to ignore differences where these lines are added to the newest version, and I also want to ignore differences where the number has changed.
Does anyone know how to do this?
Edit:
Duplicate (more or less) of:
How do I configure BeyondCompare to ignore SCM replaced text in comments?
Load a pair of DFM files showing the difference.
Click the Session Settings button (aka Rules w/ umpire icon) or use the Session->Session Settings menu item.
Switch to the Importance tab then click the Edit Grammar... button to open a second dialog.
Click the New... button below the top listbox to open a third dialog.
Change the Element Name option to something like Explicit*, change the Text Matching to Explicit(Left|Top|Width|Height) = \d+ and check the Match character case and Regular expression checkboxes, then click Ok, then click Ok again in the second dialog.
Explicit* should now appear in the original dialog's Grammar Elements list. Uncheck it, then change the combobox at the bottom of the dialog from Use for this view only to Update session defaults.
I don't use Beyond Compare, but if you want to have newer versions of Delphi stop adding the (IMO useless) Explicit* properties, you can use Andreas Hausladen's DDevExtensions
In my case (C#), I wanted to ignore the entire line which contained namespaces (and thus, using's) which I changed.
(Referenced Walkthrough - Ignore entire line if text exist in line
ie.
namespace INSERT.NAMESPACE.HERE
changed to
namespace INSERT.NAMESPACE.HERE.NEW
To do that
In step 5. of Craig's solution, change the Text Matching to
" .\*INSERT.NAMESPACE.HERE.\* "
(include the quotes)
That's it.
Craig Peterson's answer is correct.
N.B. However! The tab 'importance' is not always visible from Session/Session-settings. Always, from inside a Folder list view, it will not be there. It seems there are certain filetypes that do not have it either, though I'm less clear on that. BC has so many options and plugins I bet there is a workaround, but for me I have been ok so far.
http://www.scootersoftware.com/vbulletin/showthread.php?t=8457
I'm searching for a console code editor with CUA key bindings (ctrl+x, c, v etc.)
Right now i'm toying mcedit but i don't really like it. My desired features are:
* be fast
* CUA key bindings (ctrl+x, c, v etc.)
* toggle show line numbers
* find/replace/goto line
* bind custom keys to action( ctrl-shift-arrowdown to double the curent line etc.)
* nice simple vi-like interface (no pointless menus)
* be able to programatically extend it ...
etc.
There are a number, but most are strangely obscure & little-known. This surprises me -- I'd have thought a lot of people would have wanted this!
I have tried quite a few. These are the only 2 that I know of that are current.
Tilde is alive, maintained and has recent packages available.
http://os.ghalkes.nl/tilde/
There is also eFTE, enhanced FTE, which works well in my experience.
http://sourceforge.net/projects/efte/
You could use emacs with CUA-mode.
You probably have to configure it further to form it to your liking.
There are lots of extensions for key-bindings and it has a pretty powerful extension mechanism. If you get over the initial surprise that its all in lisp you might actually like it.
Try micro editor. See https://micro-editor.github.io/ .
Ctrl-C/V/X/Z/Y/F/S/Q are supported. Shift+Arrows for selection is supported. Syntax highlighting is present.
Another CUA editor, with menu and dialogs, is Turbo, which is written with TurboVision 2.0+Unicode: https://github.com/magiblot/turbo