How can I share a Matplotlib window with Live Share participants in VS Code? - matplotlib

I have to use Live Share with VS Code and a python script that shows some plots. If I execute the program I see the plots, while the person I am sharing with can't.
So my question is if it is possible that the person connected remotely is able to see this matplotlib windows.
I would like to see the matplotlib windows if I am connected remotely through Live Share on VS Code.

If it opens in a separate window, that's not possible. That's outside the "jurisdiction" of that Live Share session in VS Code. You'll need to use some other screen calling software or have your partner run the shared code on their own machine.
For some in-VS-Code debuggers, I'm pretty sure the Live Share participants can also see the debugger info, and if the program has output to the standard output file stream, they can also see that, but again, anything that appears outside the VS Code window, they cannot see.

Related

Attatching a Python Console to a PyQt app

Apologies if the answer to this question is already all over the internet, I just couldn't find an answer which was sufficiently dumbed-down for me to make use of it.
I'm making an app in PyQt for scientific computation purposes and I thought it would be nice to give the user that extra level of control and transparency into the workings of the app by attaching a python interpreter to the app.
The idea is that the interpreter should be able to access all variables that the app is also running on. In other words, I want to be able to start my PyQt app, and immediately write in the console 'print(someVariableKnownToTheApp)' and view the output as if written in the debugger in pycharm.
Doing a bit of searching online, I came across the classes 'InteractiveInterpreter' and 'InteractiveConsole' in the 'code' package, but I'm not sure how I would use these for my purpose.
Any help or suggestions would be highly appreciated.

How to control any windows program with no available API

What is the best way to control a program's user interface (clicking, entering text, drop down selection, etc) when the program has no available API?
I've heard of AutoHotKey and FlaUI and watched a few videos but haven't seen a great example yet. Before I go too far, is this the best direction/method?
Thanks!
FlaUI is a fully fledged UI Testing library that allows you to automate all aspects of a Windows application. As author of it, I of course recommend it. If you do have a bit of programming know how, it should be fairly easy to use. In case you just want some scripts to run locally, you don't even need Visual Studio or Visual Studio code, you can just use RoslynPad for example and directly create and run your code there.
I use this all the time for small automations, heck even sometimes to input very long passwords in a remote machine where I cannot use copy/paste.

Does Karate.robot supports CI /CD with Bamboo and need visible desktop like Sikuli to run the script?

I used image locators to locate some desktop elements the following question came to my mind that regarding Karate. Robot.
Can desktop script run on VM using CI/CD pipeline? does it need a physical desktop?
Previously I worked on Sikuli that needed a physical desktop if I minimize then the script does not work, is it the same case with Karate. Robot?
As long as you can install Karate on the VM it should be fine. Yes, having to do an RDP session can get complicated. You will need to spend some time to figure this out, but we know teams that have done this. It is also an opportunity for you to contribute some reference material and hopefully code to the community. For example getting different resolutions to work can be a challenge.
If you use the Element.invoke() method (not documented) on elements that support that automation method (e.g. buttons) you don't need the UI to be visible.
All available information can be found in this answer: https://stackoverflow.com/a/65187737/143475
If you have more questions, the best option is to figure this out on your own - and report your findings back here for the benefit of others.

Hooking/Scraping .NET application

I would like to create a trading bot for Magic Online. If it's a concern, doing that would not violate the terms of use, and several vendors for such a bot exist. I initially started out with the DLL injection/API hooking path, but that doesn't work as it doesn't seem to call any of the standard GDI functions. My code works fine on Notepad, but does nothing on MTGO_NET. Same result with third party hooking libraries.
I then "gave up", and decided to try to use OCR. However, this weird thing happens when I try to do a screenshot of the client window: I only get the game's splash screen, no matter what the client is actually displaying. The main window device context is always the splash screen. I am guessing the client uses a separate device context to actually render the game, and I have to somehow figure out what that DC is. Does anyone have experience encountering this issue? I would gladly take any advice regarding either hooking .NET applications or how to take a screenshot.
I am testing all this on Windows Vista Ultimate 64 bit. I haven't tested this on a 32 bit installation, but I hope that isn't an issue.
I suggest you look here: http://www.mtgnews.com/showthread.php?t=191879
Which provides a link to source code for a 'working' bot.
The result of a google search............

Access the stage in the Flash CS4 IDE

The stage in the Flash CS4 Authoring Enviroment is a running SWF. That what makes thing like the 3D and Bone Tools to work in the IDE.
Is it possible to access that swf ? I suspect the immediate answer would be no because that would raise some security issues maybe and cause lots of developers to crash the IDE every 5 minutes :).
That said I don't expect this to be a straight forward process, but I guess there should be a way to access that.
Any thoughts ?
I can only tell you how components work on the stage, where we've attempted the type of access you talk about.
I suspect that at their core, the 3d and bone tools are implemented using component-like tech to display the "live" stage instance. In general this would involve a compiled instance of a live preview swf that is placed on the stage. It is misleading to think of the stage as a single player. Each component preview runs in its own sandbox that, as far as I can tell, has no means of communication with other component previews on the IDE stage. There is no common storage location.
Of course, if you were in charge of the preview swf (as with the case of a component), you could try LocalConnection to chat, but the previews you want to penetrate are closed. I suspect if you dig hard enough, you'd find the bone/3d preview hidden in the installation folders (perhaps in a swc.. ik.swc looks interesting) and might be able to hack about at it with a decompiler, but straight out the box, I'm not sure there's a solution to what you ask.