How to validate IP address using Robot Framework Example: 192.168.101.12 Conditions: Number of characters String should not exceed 15 characters Allow only numeric characters Answer Builtin library has a keyword for matching regexes. You can use Should Match Regexp to validate the ip. Here is an example I made with a regexp from this answer
Tag: user-interface
Creating A GUI for Editing A Config File Using Python
So, I have a .toml config file and its something like this: I know how to pars the toml file (using it’s module) I want to make a program using python, that let’s other users choose for example the apu mentioned above (between any,nop,sdl,…),meaning the program suggests the options (any,nop,sdl…) and the user can choose whatever option they want. the
How to change multiple buttons text using only one function, tkinter python
I would like to use only one function (self.toggle) for all of my buttons in my GUI instead of doing each for every button. I have tried to change name of self.button only without numbers and then I had text changing on just one button not the one required. Is there simple way to do just one function? I’m just
Python Tkinter widgets not showing when parent is self only root why?
I am making a GUI and this is the same exact code from another project were the widgets show up when self is their parent. But for some reason in this script they only will show if root is set as parent why? The Image Label does not show but the frame does and vice versa if I switch the
How to put a Graph into a Screen(Manager) with kivy
I have 3 Screens in my kivy application and in the second screen i want to put a graph which is a widget. I have my own class for this graph. The goal is do display 3 separate graphs in one screen. I’m pretty sure there is some problem with the id from the class Graph. I tried to use
Can’t not update the textbox when clicked the optionmenu
I’m trying to display my selection in the optionmenu to the textbox. Could anyone help me with this one? when I clicked one option in the optionmenu, the textbox didn’t update. Here is my code. Answer If you run the code in a terminal, then you should see there is exception when an item is selected in the option menu:
How to code a menu bar across your Pygame project
I have been struggling with merging my code. I am creating an arcade game on Python and have a main file where I have an image and clickable assets which link to a game I have imported. Now I am working on creating constant features in the game, including a menu bar which displays reminders, can change the volume and
KivyMD MDDialog is not allowing multiple text inputs to be in one Dialog
I am working with KivyMD and I am trying to create a dialog that has multiple check boxes and multiple text inputs, however I cannot get multiple text inputs to exist in the dialog box Here is a Minimal Reproducible Example of what I’m talking about: And here is the resulting dialog box: Each check should have a text box
How to change colour when I click a button in guizero Python 3?
So I have written this piece of code in python3 guizero to change colour to red when I click the button I created. But whatever I do it’s not working! I am not sure what I did wrong but it just won’t work (I used Visual Studio Code but it didn’t give me any errors or say the code was
Python MWC pattern GUI – Menubar command from controller class
I’m trying to build a tool for data analysis. I expect that this kind of application gets big, so I’m following the MVC pattern to organize it as best as possible. My results are saved in .csv files, so the goal should be to “import” them into the GUI. I want to open these files using “CTRL + O” as