Vpython using Spyder : how to prevent browser tab from opening? - python

I am using vpython library in spyder. After importing the library when I call simple function like print('x') or carry out any assignment operation and execute the program, immediately a browser tab named localhost and port address opens up and I get the output in console {if I used print function}.
I would like to know if there is any option to prevent the tab from opening and is it possible to make the tab open only when it is required.
PS : I am using windows 10, chrome as browser, python 3.5 and spyder 3.1.4.

There is work in progress to prevent the opening of a browser tab when there are no 3D objects or graph to display. I don't know when this will be released.

Related

How can I run selenium (with python) on an open firefox window? (if not, on a Chrome window)

I have this python program made with selenium that automates a search on a firefox page, with a login and everything.
The thing is, after the search is done, the program stops executing (the page is still open. I want it that way) but I want to somehow implement a function that when -given certain argument- it searchs for something different on that open firefox page.
I don't know if I explained myself, but this is very important to me.
If you know how to do this but with Chrome I don't mind. I only need it to work regardless of the browser.
I'm not that pro at this, so please be patient with me. I'm very grateful for all the help you could provide me.
Thanks!!
https://en.wikibooks.org/wiki/Python_Programming/Interactive_mode:
Python has two basic modes: script and interactive. The normal mode is
the mode where the scripted and finished . py files are run in the
Python interpreter. Interactive mode is a command line shell which
gives immediate feedback for each statement, while running previously
fed statements in active memory.
So basically you need to run your code in interactive mode. It depends on your IDE: If you use PyCharm Right-click on the page that you're writing your code and find Run File in Python Console and continue coding in the new window opened by PyCharm. You can also use Jupyter which is a great tool for interactive mode. For other IDEs, try to find any menu that is related to interactive mode or window.

Is it possible to split the output console in PyCharm?

Is it possible to have multiple python consoles side to side or as independent windows in PyCharm?
Note: I am already using Windowed Mode to have the console panel as a window, but I want to have separate consoles on separate windows.
I am using PyCharm Professional 2018.1
I open a Python console via View -> Tool Windows -> Python console. Clicking on the green "plus" symbol I can open multiple consoles, but they are showed as different tabs.
What I would like it being able to see the "content" of multiple console at the same time, hence having them side to side or as independent windows I can arrange as I want.
How can I achieve this?
Unfortunately, splitting console is still a feature in request right now for Pycharm 2018.2.3 as mentioned in this question.

Python Selenium Chrome issue in Windows: "KLIB_SelfTest return : KLR_OK"

I made a PyQt program which runs Chrome web driver via Selenium.
It works normally in Mac or Linux, but it prints a weird line in console when I run this program on Windows, as below.
KLIB_SelfTest return : KLR_OK
The log itself is not a big deal, but when it comes with Pyinstaller, it produces some error when compiled by --noconsole option. When I remove that option it works fine, but I want the console window not to be showed.
Moreover, I'm really curious about which part of the Chrome driver produces that log. I searched almost every information as far as I can, but I couldn't find anything related with the log.
Thanks in advance for your help.

Spyder retrieve hidden IPython console

Sometimes when I use Spyder and that I press the wrong button or when the computation is too intensive I have my current IPython console that litteraly vanish from my screen. So I open another one with console->open IPython console but the other one seems to be still active somehow.
Is there a way to force the display of the ones that have disappeared ?
Just press ctrl+shift+I for displaying ipython console
or
Its a kind of workaround, Go to view and click on Attached Console Window (debugging) and then open a new console it shows the hidden console.

Clicking on element in terminal

I've noticed that hyperlinks printed in my Debian/Linux terminal are clickable and open the browser when clicked.
I was wondering if this could be used for other things or if this was just hard-coded in the terminal for hyperlinks only.
Is it possible to print out a line in Python that when clicked will launch another process, for example?
URL support is hard coded in the individual terminal emulator.
The terminal may support arbitrary URIs as registered in whichever environment it calls home, so that you can e.g. write a Gnome extension for myapp://something and have it work in gnome-terminal, but this is entirely terminal specific.
It's also possible for a terminal program in any terminal to receive mouse events and it can then do whatever it wants with them (like how elinks lets you click non-URL links to browse). However, this requires the program to be running in the foreground and controlling everything that appears on that terminal.

Categories