Skip to content
Advertisement

Tag: python-3.x

Python websocket closes after few seconds

I am try subscribe API http://developers.xstore.pro/documentation/ Process how I am doing it. Login (Ok) Subscribe some command (Ok) The data starts coming in (Ok) After few second (cca 20s) (Fail) on: Python or API closes connection :( inicialize socket: Every 5s I am sending following ping There is a way to open new connection but this approach it’s not optimal.

convert to upper case in python

I’m getting syntax errors, can anyone tell me what I am doing wrong Answer hey hi you have used “=” sign after print statement that’s why its showing there’s an error. Don’t use the “=” sign.. just use “print(result)”

I am having trouble with enemies in pygame

I have been trying to create an enemy class for my snake game that I can execute in my pygame loop, but my fill_screen() function keeps it so that either one enemy is on the screen at a time, or no enemies are on the screen. I hope someone can help me with this issue, because I have been working

How can I prevent other threads from running when a certain condition is met?

I created a situation in which two threads run continuously. My intention is to prevent all other threads from running when the “Printing Alphabet” portion of the “printAlphabet” function is entered, and when this prioritized thread is done running, all threads resume execution until the condition is met again. The “anotherThread” function continues to run even when this section is

Access data in python3 associative arrays

I’d like how to create and print associative arrays in python3… like in bash I do: In bash I can do echo “${array[“beta”,1]}” to access data to print “text2”. How can I define a similar array in python3 and how to access to data in a similar way? I tried some approaches, but none worked. Stuff like this: But I

Advertisement