15,179 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
###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 … | |
##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 … | |
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 … | |
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 … | |
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 … | |
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? … | |
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 … | |
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 … | |
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, … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
I have made a html page and I need to use python to see the inputs. Any ideas?? | |
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 … | |
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 … | |
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 … | |
> 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 … | |
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? | |
Visual Tkinter is Python 2.6 GUI builder. Visual Python programming language for advanced Visual Python IDE that offers the possibility. As of December 2008 starting and writing fasting Editor. This software is using Scintilla editing component. <URL SNIPPED> | |
images = [createProductForm.productImageModel.data, createProductForm.productImageModel.data] for image in images: if image.filename == '': print('Image must have a filename') return redirect(url_for('createProduct')) if not allowed_image(image.filename): print('Image extension is not allowed') return redirect(url_for('createProduct')) else: filename = secure_filename(image.filename) file_path = image.save(os.path.join(app.config['IMAGE_UPLOADS'], filename)) print(mysql.format(file_path)) mysql.connection.commit() print("Hello yes!") print("images saved") If i were to convert the image … | |
I am a developer who recently started working on my own, and I've come across some projects that I can't handle by myself (mostly in React). What resources would you guys recommend for finding / putting together a team of remote developers to join me on these projects? | |
Hi, How do i store files into blob datatype into mysql via user input with python? def read_file(filename): #Convert digital data to binary format with open(filename, 'wb') as f: photo = f.read() return photo @app.route('/createProduct', methods=['GET', 'POST']) def createProduct(): createProductForm = CreateProductForm() msg = '' if request.method == 'POST' and … | |
Hi all, Have my below program: from tkinter import * from tkinter import ttk from tkinter import messagebox class Application(object): def __init__(self, master): self.master = master qPlacement = IntVar() self.cc = ttk.Combobox(self.master, textvariable=qPlacement, width = 5).place(x = 5, y = 30) Button(self.master, text = 'Click Me', command = self.popCombo).place(x = … | |
I'm writing a utility that will likely be called by a script that uses `argparse`, but should be useable by any script. The engine object constructor needs a dozen or so parameters to tune its behavior. The question is: What is the best way to allow the caller to send … |
The End.