15,185 Topics

Member Avatar for
Member Avatar for Choi_96

The selected row keeps on deselect when the new value is updated in that position. Can we just keep the selection fixed even when the row value changes. Please have a look at the sample code given below, where a treeview row are getting updated every second but as the …

Member Avatar for rproffitt
0
62
Member Avatar for littleme2202
Member Avatar for twitch1411

leaderboard = open("scores.txt", "r") scores = leaderboard.readlines() rawscores = [] for lines in scores: details = lines.rstrip("\n") #removes empty space details = details.split(",") #splits apart data with a comma at each space details[0] = int(details[0]) rawscores.append(details) rawscores.sort(key=lambda x: x[0], reverse=True) #sorts data from highest to lowest print("1. "+str(rawscores[0][0]),"done by",str(rawscores[0][1])) print("2. …

Member Avatar for rproffitt
0
22
Member Avatar for baraka.arman

Hi everyone! i have Fedora 28 (with xfce) installed on my laptop. As Fedora 28 is now an old version, I'd like to know if there is a way to upgrade directly to Fedora 32, with no risk (I mean no data loss, in particular my /home dir).. Can you …

Member Avatar for rproffitt
0
20
Member Avatar for rafyemokna
Member Avatar for Tcll

Truthfully it isn't really that special, but it is a bit cancerous as I only have `atan()` and not `atan2()`... What's special about it is every other function I see seems to be intrinsic with 1 axis needing a `sqrt()` to manage singularities, where what I'm looking to achieve is …

Member Avatar for rproffitt
0
300
Member Avatar for pwolf

i was on the site pyschools working through the exercises, but i dont understand why it wont accept the code i input. [url]http://www.pyschools.com/quiz/view_question/s4-q2[/url] Create a function generateNumbers(start, end, step) that takes in three numbers as arguments and returns a list of numbers ranging from start to the end number (inclusive)and …

Member Avatar for Reverend Jim
1
1K
Member Avatar for srednausab

want to sent an AuthnRequest from my python-based SP (I;m using python 2.7) that I'm developing to my simpleSAMLphp installation (it's an IDP). I'm using the "requests" module to do a get like this: response = requests.get(url, verify='/home/me/my.crt') where the URL is: https://bingo.bas.com/simplesaml/module.php/core/authenticate.php?as=example-sql/?SAMLRequest=' + saml_request_base64 and the saml_request is (but …

0
22
Member Avatar for Reverend Jim

Sometimes you want to ensure that only one copy of a script can be run at time. Windows provides a facility called a mutex and you can use it to prevent multiple instances. To create the mutex, all I have to do is varname = GetMutex() If the mutex already …

1
2K
Member Avatar for vishwas_1

Hii ,I was making a factorial program in python using recursion/ but I have one doubt : if I run the program I get the error as : " result=x*fact(x-1) TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'" But If I run it with the commented statements it works …

Member Avatar for Reverend Jim
0
706
Member Avatar for Reverend Jim

###Subclassing python objects Sometimes you want to add just a little more functionality to an existing python object. You can do that by subclassing it and adding on the missing parts. This example is based on a really mindless game of solitaire I used to play as a kid. In …

2
213
Member Avatar for Reverend Jim

##This project implements a multiple timer application. It was written in 1. Python 3.8.2 2. wxPython 4.1.0 Feel free to experiment. Here are some possible enhancements: 1. Add the ability to run a program when the timer expires. With a little scripting you could, for example, schedule the sending of …

2
2K
Member Avatar for Dani

Earlier today, I was in need of an easy way to delete files that mached a specific format within a series of folders. For the case of this example, let's say all CSS files. I discovered I could do it with: find . -name '*.css' -delete The . represents the …

Member Avatar for Sohaib_7
3
925
Member Avatar for luffy_D

I am trying build a webpage which takes a large tab delimited `.txt/.txt.gz `file as user input from a form and using `POST` method(`test.html`) to send the data to `cgi-bin` directory to `file.py` which ideally should open the file read and put the data into a dataframe and do some …

Member Avatar for tinstaafl
0
251
Member Avatar for robinlrandall

The following Python 2.7 Calendar program works nicely with a Frame and a Panel, but when I try to change to change the Frame to an MDIParentFrame and the Panel to an MDIChildFrame (or MDIClientWindow) I cannot get it to work. I went to this because I had trouble getting …

Member Avatar for Reverend Jim
0
59
Member Avatar for Reverend Jim

Python-wxPython Tutorial This tutorial will take you through the basics of wxPython. ##Introduction: Let's face it. I am a dinosaur. I got my computer science degree in the mid 70s. And it won't be long before **I** am in **my** mid 70s. So why am I trying to learn Python? …

Member Avatar for Reverend Jim
10
12K
Member Avatar for muhammadnasiri

two error come of (strcpy was not declare in this scope) would any one show me, hw to remove this error, ... plz Project Title: Student Record & Registration using Linked list Description: This project is a Linked List application. If you would like to refresh you knowledge about linked …

Member Avatar for J_7
0
22K
Member Avatar for Lonx

Good day y'all, Im an intermediate Python dev and I've just finished building my first major Python project with UI. I tinkered a lot with tKinter (pun almost unintended) and even tried PyQT5. Both of these are time consuming to work with and tKinter's GUI looks like it shouldve been …

0
49
Member Avatar for Alex_112

I'm in the process of developing a free open source online platform/course for complete beginners to teach themselves coding in Python. See https://github.com/alexmojaki/futurecoder for more information or try out the demo at https://futurecoder.herokuapp.com/. It's completely interactive and has several awesome features, including three dedicated debuggers, gradual hinting and solution revelation, …

Member Avatar for rproffitt
0
52
Member Avatar for Thanh Phong

My experience with C# is very very limited and a simple python program like the one I'm trying to convert is beyond my experience in C#. If anyone knows of any converters or is willing to help me out I would greatly appreciate it! class ByteReader(object): """ Reads bytes from …

Member Avatar for GooGooseGooey
0
36K
Member Avatar for Meh123

def shift_matrix(a): start_row=0 start_col=0 end_row=len(a[0])-1 end_col=len(a)-1 prev=a[0][0] while (start_row<end_row and start_col<end_col): for i in range(start_col,end_col+1): temp=a[start_row][i] a[start_row][i]=prev prev=temp start_row+=1 for i in range(start_row,end_row+1): temp=a[i][end_col] a[i][end_col]=prev prev=temp end_col-=1 for i in range(end_col,start_col-1,-1): temp=a[end_row][i] a[end_row][i]=prev prev=temp end_row-=1 for i in range(end_row,start_row,-1): temp=a[i][start_col] a[start_col]=prev prev=temp start_col+=1 a[0][0] = prev a = [[ 1, …

Member Avatar for hussainmujtaba
0
32
Member Avatar for sasindu

Here is what i get when compiling py to exe using cx_Freeze... I used Admin cmd too... but it keep give me this error.. how can I make it right...please help me with this. C:\Windows\system32>"C:\\Program Files (x86)\\Python38-32\\python.exe" "E:\\New folder\\Python Player\\Setup.py" build running build running build_exe pygame 1.9.6 Hello from the …

0
129
Member Avatar for carla_3

I am currently working on a python program that takes the numbers from a large file and averages them. Currently I can't seem to find a way to add the numbers without using the sum function. I am a beginner and am just trying to grasp the basics of Python …

Member Avatar for Dani
0
93
Member Avatar for Python Leaner

I am new to Python development with Selenium. I need some clarification regarding Exceptions. In Oracle PL/SQL I was able to create a package, where I used to place all the procedures and functions related to error handling in my app. So, once a error occurs he is propagated from …

0
19
Member Avatar for Dagw300805

I have made a html page and I need to use python to see the inputs. Any ideas??

0
20
Member Avatar for sasindu

After minimize the window disappear from taskbar and i can't set that again as it's looping...Is there any other way to minimize or fix that. watch inline code examples. from tkinter import * from PIL import Image, ImageTk import time from ctypes import windll GWL_EXSTYLE = -20 WS_EX_APPWINDOW = 0x00040000 …

0
549
Member Avatar for Sarala_1

how to convert this code to python #include<bits/stdc++.h> using namespace std; int maxi = INT_MAX; int maxx(int a, int b) { return (a > b)?a:b; } void cal_Time(int total, int sum, int i, vector<int> v1) { if(maxx(sum, total-sum) < maxi) { maxi = maxx(sum, total-sum); } if(v1[i]) return; cal_Time(total, sum …

Member Avatar for Reverend Jim
0
15
Member Avatar for Kaaviya_1

I have a dataframe with 5000 records. I want the null values to be filled with: Average(All the Preceding values before null, First succeeding value after null) data: Date gcs Comp Clay WTS 2020-01-01 1550 41 9.41 22.6 2020-01-02 1540 48 9.50 25.8 2020-01-03 NAN NAN NAN NAN 2020-01-04 1542 …

Member Avatar for Reverend Jim
0
26
Member Avatar for sasindu

> I have already created functions to handle that. But it's shacking when i try to move( After add more widgets). Can somebody help me with that. from tkinter import * from PIL import Image, ImageTk import time class modtk(Tk): toptitlebar = None maincanvaswindow = None resizeon = False dragging …

0
726
Member Avatar for Alexandramaria

I would like to build a software career and am looking for the best software training institution. Can you please help me to find one?

Member Avatar for rproffitt
0
28

The End.