#π I need help with python on phone
54 messages Β· Page 1 of 1 (latest)
@neon crow
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
If you need more context, just ask
@neon crow pulseaudio isn't it
let me test it rq
https://realpython.com/playing-and-recording-sound-python/
it lists a few simple and advanced libraries for playing sound. note that for newer python versions some modules (like playsound) might not install properly
I want to make a thing that will be like.... if xx happens beep
if that makes scents
- I just need a library for the beep (on a phone)
What is the right pip for this, "python-pulseaudio-profiles" ?
What cli are u using
U got a Linux cli on ur phone now
There is lots of libraries but it depends on what u use to call them up @neon crow
To create the beep noise I just used these
import time
def play_beep(frequency=1000, duration=0.1):
subprocess.run(['termux-bell'], capture_output=True)
time.sleep(duration)
def main():
while True:
user_input = input()
if user_input == "":
play_beep()
if __name__ == "__main__":
main()```
i just have the basic android, i dont have a pc version of linux on my phone if thats what your asking
I would use other for audio though
Why don't u get it
Android allows u to access what shell
Or ur using the playstore and like Shellix
im just using pydroid 3 from the playstore
Yeah I would not use that why don't you go to httos://fdroid.org
Then install and download termux
Then u can ur in a better position
And dow load termux api since u want to access the internal system u need to use termux-api
I have rootkits for you I u need but u don't have to root
U can use Docker to bypass root
i dont want to use complax code, i jsut want to use a beep....
Yeah idk how this is the shortest way I know how from command line
I am the one who rewrote and fixed the broken pip so I push it when I can
im not trying to use command line, i want the beep to play form pythpn
How are u accessing python thru the terminal pyshell
How thru adb shell are u accessing it ur not root
Therefore u need to either reverse ur own device or use api
im not accessing python thru the terminal pyshell (i dont understand this btw)
i can run a normal print and that type of stuff btw
Yeah ur gonna work for that lady
It's not compatible with the api
U need to configure and now ur coding
Should of used termux instead ofpydroid3
Do i have to set the file every time, like can i load from a file or nah?
U can but u need to use termux boot
can i just use the termux from the playstore?
No
U need fdroid termux is discontinued after python3 launched all the libs got mashed
I spent a long time fixing it
Some wheels are still effed
Pynacl is one there are few i have work around for them all
So why cant i just use pydroid, and find a good library
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.