Simulating XBox controller inputs in python - python

I'm currently working on a project that requires a simulated XBox controller, I have done a lot of research but have not been able to find anything other than this, but it only appears to run on Windows 7 (I am currently running 10) (Even the PowerShell script that someone from the community has created for windows 10 does not appear to function). I was just wondering if anyone knew of a newer similar idea? This post is a similar question but again from 5 years ago and none of the methods in the accepted answer appear to work at the moment.
Current issues and requirements:
Attempting to run the PS script gives this error:
The main requirement / only is that it is able to dynamically change he stick values (ie not just left, right, up and down but varying amounts of each) and the same for both triggers.

Related

How do I make Python 3.11 run in terminal on my Windows 10 system?

I downloaded Python for my Intro CS class last semester. It worked for the first month and a half of class. I was able to run programs in VSCode. Suddenly, when I clicked the button to run my code in the test terminal, nothing printed at all.
I went to Google and found out a lot of people had similar problems so I started following other people's troubleshooting methods. I tried turning on and off the app execution aliases. I doublechecked the path in Environment Variables to see that my computer was looking in the right place for Python. It was.
I went to my professor about this, and he tried to help me out. We tried to see if Python was working in PowerShell/other IDEs. It wasn't. This is the error:
PowerShell - App Execution alias off
The same error recurs now with App Execution alias on, although it used to be something different before my professor messed around a lot more with paths. My professor spent a lot of time trying things I don't really understand, mostly involving paths.
We spent a total of about 3 hours combined working on this with no results. I ended up working on my last 2 projects in an online IDE, which was annoying as hell.
Can someone please help me out? I really want to learn more Python on my own, on my own system.
Thank you so much for listening!

Desktop Overlay for Windows (Python, Tkinter)

I recently stumbled upon an SO question that pointed at using WinRT (discontinued in Python 3.10), that helps handle Windows Runtime APIs. I wanted to use it to develop a basic desktop overlay that shows a list of currently running audio sources (primarily, Spotify). I did accomplish everything else, concering the UI and such, using tkinter.
The main problem is that the support for Python WinRT discontinued for the 3.10 version, (and onwards), and I can not find libraries that might substitute it. The main solutions I find include downgrading to Python 3.9 (or, using a venv, which sounds better), or just using a community fork (PyWinrt), but I'm not really putting these hacks or workarounds at a priority, I might be willing to opt for these if there is no other possible solution.
Is it still possible to develop such an overlay using only Python? Since I'm using Tkinter, all i would need is an image of the current playing track, the application that is running it, progress in the audio (in ms or s), and the name of the track. Keeping it simple, I'm trying to avoid audio control, such as skipping the track, or changing the relative timestamp.
I did try using the Spotify WebAPI to specifically grab info related to the track currently playing, but the work involved with refresh oauth tokens, and creating logins for just looking at the track seems a bit much work, since I believe it would be easier done natively; plus, what I'm trying to aim for, is a general purpose audio source info, rather than just Spotify.
Here, is a picture of Windows' Gamebar, that shows what I'm trying to achieve:
GamebarOverlay.

What is the best way to share a python application with someone who isn't a dev [duplicate]

This question already has answers here:
How can I run a Python project on another computer without installing anything on it?
(6 answers)
Closed 9 months ago.
Problem:
I need to send someone (who has little to no computer knowledge) a python program, but I don't even know if he has python installed let alone all the dependencies.
Question:
Assuming he doesn't have python, how should I go about sending the application so that It is as straightforward as possible for him?
What I've tried:
Initially, I thought of using venv and sending him the whole thing, but there has got to be a better solution, as my code only uses two of the built-in libraries.
In my research, I came across Docker, but I think he would need to have that installed. I also saw pipenv but it wouldn't work without python on his PC.
You have multiple ways to do so:
Create an executable file, which is quite a long process but can be useful is you project contains a lot of files and multiple dependencies
Send them the python code (I recommend it if your project fits in one .py file). The person will need to install python and possibly a few pip libraires, but it's not extremely complicated in my opinion, with clear instructions.
Finally, you can go on repl.it and create a repl, which is simply a way to execute code on your browser. I think this is the best option for both large and small projects, except if it contains a lot of odd dependencies, and I'm not sure if repl.it supports graphical interfaces either. Anyway, you should take a look, it might be perfectly fit your needs

Does Pycharm limit the number of projects it can hold? [duplicate]

This question already has an answer here:
How to prevent a new project from being linked to the primary project automatically?
(1 answer)
Closed 1 year ago.
I was looking through my pycharm projects, and noticed that 2 are not there, looked through all my IDE versions, not there. now I am 100%sure that I did the projects, so my question is does pycharm have a set limit of projects it can hold? I have noticed that when I tried to create a new project with the amount of projects I already have, that pycharm appeared slow to load the new project window, or sometimes did not load at all, I had to create the project several times for it to register.
Hope yall can answer this
The slow performance may be due to numerous tasks hogging CPU/memory resources or perhaps PyCharm memory heap size. You can read more from about adjusting memory heap size here:
https://www.jetbrains.com/help/pycharm/increasing-memory-heap.html
As for missing projects, perhaps you saved them in a different directory by mistake?
It's relatively easy to make that mistake when first setting up a project.
https://www.jetbrains.com/help/pycharm/creating-empty-project.html

Using multiple development environments on the same OSX machine? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have recently got a new Mac (2015 MBP with 8gb ram) and I am trying to set up a development environment using 5 different stacks at the same time.
I've previously used a LAMP set up very similar to this - many of my old (client) projects are still based on a PHP MVC framework which uses Foundation and Libsass. While I don't want to make new projects in this way as I want to learn more, I still need to be able to maintain these other projects quickly and easily.
I then had some data projects in Python / Django. On my old mac I used a linux VM through Virtual Box for this (I don't yet own parallels etc).
I've also trying to learn to use the MEAN stack using gulp, browserify and playing around with React JS, as well as Meteor (which has it's own server too) and Ruby on Rails - and I want to do more development with these, but without losing the ability to work on my other projects.
My problem is that whenever I previously switched to using MEAN or Rails, I messed up my file watching / auto compiling for LAMP and Python and it took me ages to switch back. I really like how browserify works - e.g. to auto compile sass files / minify, and auto refresh the page, but I've hit problems with keeping my python server and lamp set up doing the same. I'm clearly doing something wrong and I'm keen to set this up properly with a clean install. All the tutorials I can find online refer to setting up individual stack environments, but I can't find much which refers to setting them up together.
I've decided that running a separate VM for each different stack would knock performance too much, and there are some things which I'd want to use on more than one stack like homebrew.
As such, my question is what are the specific advantages of using something like docker to keep things separate vs finding a way using something like homebrew to set up everything together on a single OS?
I'm aware file watching isn't so easy on docker with virtualbox - but I'm not sure whether to push through and find a work around or to use another way.
Thanks so much - I've been stuck on this for ages. I'm sorry if my question isn't very clear - I'm new to using node / meteor and ruby so I'm not sure the best place to start!
In my humble opinion the best solution by far is to use Vagrant. It's also free.
Not only that you can have a different environment for each project, but you can also script all the custom installations and configurations. You, or a colleague of yours, will be able to replicate the environment with a simple command, vagrant up.
A popular guide for setting up Vagrant for RoR development can be found here. However, contrary to that guide, I gave up using Chef in favor of a simple provision script. A guide can be found here.
Make sure to enable NFS though, else VirtualBox (Vagrant sits on top of it) will be quite slow.
While solutions like Cloud9 or Koding are surely useful for when you do not have access to your development machine, I wouldn't use them for day to day work.

Categories

Resources