I started to learn Flask, I have a simple task: make a button, get the name and display on the monitor, seemingly simple, I did and it does not work. The second day I sit on the smoke, could someone help me? Thank you :D
Sorry,
I paste the pictures because StackOF won't let me paste the code - I don't know why... :/
You are routing / to two different functions, move the code from inside answer and put it inside index.
Related
i am trying to make a program that checks every time a specific button is pressed, this would be done with python, i am thinking of using flask however i am not sure how to do it as the website is in EJS. please help and give suggestions on how to do it and if possible code snippets.
I can't find any docs on this, so please help.
Thanks
Im on Python 3.9 on Windows 10, and im building a text editor app. Id like to have a typewriter mode where the current text stays centred on the screen and finished/written text scrolls up the screen.
I have tried googling every variation of what that could be called or how to implement it. Ive also looked through 3 or 4 different tutorials and all the docs on every parameter of every method in Tkinters widgets. Im not asking for a complete code snippet necessarily, but im stumped as to how im going to do this.
Thanks for any help received, itd be much appreciated, even a nudge in the right direction.
Chris
I'd like this Python script to run through my webhost/domain. That way maybe I can put a hyperlink on my index that leads to this for a little display?
I would like this to be played in the tab
import turtle
bob = turtle.Pen()
for i in range(700):
bob.forward(i)
bob.left(80)
bob.forward(50)
bob.right(i)
bob.back(50)
bob.left(i)
This is a very old question but since someone else just found it and posted a response, maybe others are searching for this functionality as well.
If you are just looking to share your turtle code with others and show its output, Repl.it can do this for you.
Live demo of your code here
I am just starting out to use tkinter in Python 3.5 and I don't understand it the best yet but hopefully will over time.
Anyway, what I was asking was how do I create a text box that a user can type into, I know it is possible but don't yet know how to execute this as, as I said at the beginning, I'm just starting out.
If there is any scaffolding code of a box that I could use to that would allow a user to enter text, it would be a great help if you could show it to me.
Also, to interact with this input, would it be the same as python?
I know this is a lot to be asking but any responses are welcome,
Thanks in advance :)
Both of the following links contain code relating to text entry.
http://effbot.org/tkinterbook/entry.htm
http://effbot.org/tkinterbook/text.htm
Entry is a single line box.
Text is a multiple line box and supports text formatting
I'm new to coding using python and it's libraries, and also new to stackoverflow so I apologize if I'm not acquainted to some things.
Anyway to the question. I'm trying to write code that automates playing a video from the website that. Here's an example link:
http://www.shush.se/index.php?id=164&show=southpark
I've tried these methods:
driver.find_element_by_id("playerload").click()
driver.find_elements_by_xpath("./html/body/table/tbody/tr/td/div[#id='load']/div[#class='player']/div[#id='playerload']/div[1]")
But nothing happens. The program exits without error but the video does not
start playing.
I tried clicking a the id "jw6playerid5040619_wrapper" but the number associated with that changes every time a page loads.
Any advice? Thanks in advance!
Even though you don't know the exact id, you know that it will start with "jw6playerid". The following works for me:
elements = driver.find_elements_by_xpath("//*[contains(#id, 'jw6playerid')]")
elements[0].click()