15,185 Topics

Member Avatar for
Member Avatar for nadiam

Hello. I have a project to develop a tool that reads Windows 7 raw memory dump. My lecturer says that he'd rather we use python or c coz that's his specialy but we can choose whatever. We chose python (bcoz i feel like its an opportunity to further learn about …

Member Avatar for rproffitt
0
465
Member Avatar for Loulou_1

I want to draw a checkerboard on Python, but I only get one black square. Can you help me fix this program? import turtle def filled_square(size, color, x, y): turtle.setpos(x, y) turtle.color(color) turtle.begin_fill() for i in range(4): angle = 90 turtle.fd(size) turtle.lt(angle) turtle.end_fill() turtle.up() import sys n = int(sys.argv[1]) s …

Member Avatar for happygeek
0
3K
Member Avatar for Niloofar24

Hello! Can you give me an example of Button widget in Kivy language? I can creat the button but don't know how to use it's callback. I mean how can i set a command for the Button in Kivy?

Member Avatar for M_12
0
5K
Member Avatar for Ade Ihsan

long waitingTime(vector<int> tickets, int p) { // bool flag indicates whether it's Jesse or not queue<pair<int, bool> > aQueue; for(int i = 0; i < tickets.size(); i++) { aQueue.push(make_pair(tickets[i], i == p)); } long long nTime = 1; while(!aQueue.empty()) { pair<int, bool> aItem = aQueue.front(); aQueue.pop(); nTime++; if(aItem.first == 1 …

Member Avatar for rproffitt
0
1K
Member Avatar for Dhelandel

Is it possible to integrate Perfect Circles of the Golden ratio geometry in designing logo based on these link ( https://goo.gl/images/7eYZoG ) to recognize flower.. What do you think guys? Im planning to have a research on this.

Member Avatar for rproffitt
0
288
Member Avatar for shubhangi_1

I want to print the count N letters of string but it result in error can anybody help me? import subprocess variable = "making" s = subprocess.Popen(("grep","-o -w","%s"%variable, "output.txt|wc -w"), stdout = subprocess.PIPE) output = s.communicate()[0] print(output)

0
143
Member Avatar for Tcll

so I'm working on a class for a vector which I want to hash like a tuple, and to do so, a vector instance needs acess to it's properties. here's the constructor for the performative properties I'm using, and the vector class: def newProp(): newdict = {} getter = newdict.get …

Member Avatar for Tcll
0
451
Member Avatar for Aman_14

I have a text file containing the following data. ascon1 201707011 John 77.5 11.5 11.5 11.5 ascon1 201707012 Grld 70.0 11.5 11.5 11.5 ascon1 201707013 Josh 79.5 11.5 11.5 11.5 ascon1 201707014 Jess 67.5 11.5 11.5 11.5 ascon1 201707015 Jack 97.5 11.5 11.5 11.5 I need the data to look …

Member Avatar for pty
0
12K
Member Avatar for DAN_22

# Am looking for best practises of displaying document info in tkinter messagebox from tkinter import * from tkinter import messagebox def profile(): messagebox.showinfo("info","college\tNew student\tGraduating students\noak institue\t202\t210\nPine college\t143\t121") root =Tk() root.geometry("200x200") C = Button(text="copyright",command=profile).pack() root.mainloop() #I think if am going to type all the info in the document the arrangement …

Member Avatar for rproffitt
0
2K
Member Avatar for Nemius

Hello. I am making a program that interacts with MySQL database/table. I ran into 2 problems. The first one is about saving data which user entered into cell/or edited existing data in cell. The second problem is about inserting new row. Row is inserted, but it still shows error in …

Member Avatar for Nemius
0
1K
Member Avatar for DAN_22

I want to display the content of selected treeview only in tkinter but when i select the treeview other treeview content also display but i want only the selected treeview to display. I have working around to get this by the use of style widget but it display other content …

0
132
Member Avatar for mattyd

I am searching for the logical Python logical operator "or"; While C++ is: 1 || 4 (using pipes) I assume Python would simply be "or", as in: 1 or 4 Or something like this: if var1 == "image0.GIF" or "image1.GIF" or "image2.GIF": varValue = 10 Is this syntax for Python …

Member Avatar for rahul_64
0
53K
Member Avatar for Ala'a99

I can make a plot in python its no problem. My question is : Dose there any option to make more than one plot over each other but not in the same time?!(plot the first one wait a bit then plot the second one over the first one and so …

Member Avatar for Gribouillis
0
452
Member Avatar for Tcll

I have an automated API with a secure frontend/backend structure where backend object attributes are hidden with frontend proxy classes. basically, when accessing an object from the frontend, you get a proxy object disguised as the backend object with all it's explicitly "public" functionality. what I'm dealing with right now …

Member Avatar for Tcll
0
456
Member Avatar for sudipta.mml

The quadruplex sequence of a genome looks like this Gx Ny1 Gx Ny2 Gx Ny3 Gx, where G is the Guanine base and the Ns are representing other bases. The x, y1, y2 and y3 are integer. A particular segment will be quadruplex sequence if x>=2. My question is I …

Member Avatar for Matej_1
0
345
Member Avatar for Nemius

Hi all, I am working on program that will connect to MySQL database, colect data from table and show them in grid. Where user can edit cell, and then on enter key changes will bi save directly into database table. Curent problem is that I am stuck at importing data …

Member Avatar for Nemius
0
2K
Member Avatar for farzane_1

hello friends... i want to print a persian file by thermal printer.. i can print an english file esily..but i face the proble while printing persian text.. i think i don't do some principles...i have studied about unicode encodeand decode in python..but it seems it isn't enough please guide me …

Member Avatar for rproffitt
0
2K
Member Avatar for vegaseat

This class gives a specified Tkinter widget a tooltip that appears as the mouse is above the widget. You can improve the code by putting in a time delay.

Member Avatar for Marc_10
7
13K
Member Avatar for Stefce

Hello, so i tried to make my own insta crawler but having some dificulties, here is the code for now: import requests from bs4 import BeautifulSoup def insta_spider(max_pages): page = 1 while page <= max_pages: url = 'https://instagram.com/xenia/' source_code = requests.get(url) plain_text = source_code.text soup = BeautifulSoup(plain_text, "html.parser") …

Member Avatar for rproffitt
0
2K
Member Avatar for reeta_1

A positive integer n is said to be perfect if the sum of the factors of n, other than n itself, add up to n. For instance 6 is perfect since the factors of 6 are {1,2,3,6} and 1+2+3=6. Likewise, 28 is perfect because the factors of 28 are {1,2,4,7,14,28} …

Member Avatar for rubberman
0
327
Member Avatar for breaksand30

I'm working on a project in Python that I'm having trouble with. I've asked so many people but they seem to not be able to help me :/ I'm coding a little program that executes system commands. The idea is that one machine opens the server and the other one …

Member Avatar for reeta_1
0
4K
Member Avatar for willygstyle

Hey guys, I got a little bored and thought I would to make some of the basic Client/Server applications I have a little bit flashier with a gui interface. So far I have just been working with the server and the main problem that I run into is when the …

Member Avatar for Gribouillis
0
5K
Member Avatar for abders

Hello, I was testing a class in a GUI, and that error message showed up. Please help. Code: [CODE]from Tkinter import * class Application(Frame): def __init__(self, master): super(Application, self).__init__(master) self.grid self.create_widgets() def create_widgest(self): self.bttn1 = Button(self, text = "I do nothing!") self.bttn1.grid() self.bttn2 = Button(self, text = "Me too.") self.bttn2.grid() …

Member Avatar for Gribouillis
0
2K
Member Avatar for Abdullah_17

I need to read a list of names from different files using python and produce the list of names that appear the first time from each file. Help!!

Member Avatar for Sue_2
-1
355
Member Avatar for lewashby

I've downloaded the file "qt-unified-windows-x86-3.0.0-online.exe" and installed Qt and I've also downloaded and unpacked the file "PyQt5_gpl-5.9.zip". I'm using Python 3.6 but I can't figure out where to drop the extracted PyQt5 files. I can't find a Python directory anywhere on my C: drive except for under my home directory. …

Member Avatar for lewashby
0
675
Member Avatar for Faro_1

so i tried adding a defintion for the reset command but it doesn't seemed like it works other method was moving the defintion around the localfunction which didn't work and also affects other elements # Guessing Game from tkinter import * from tkinter import ttk import random number = random.randrange …

Member Avatar for Faro_1
0
353
Member Avatar for Hillzy

At the moment i ahve a task where i have to make a guessing game in GUI python. So it will generate a random number and also when a certain number of tries have been reached it will stop. The problems i am having as of now is that: 1) …

Member Avatar for Faro_1
0
3K
Member Avatar for V3N0M

Hi I am learning python and there is these two code snippets but I keep getting an error when I try to run the program. # survey.py class AnonymousSurvey(): # Collect anonymous answers to a survey question. def __init__(self, question): # Store a question, and prepare to responses. self.question = …

Member Avatar for V3N0M
0
278
Member Avatar for Sean___

I've recently been learning on how to write Python. I'm still a beginner. I've read multiple times that creating a text based adventure game in Python is a good exercise to learn the in's and out's. I've finished the basic structure of the script. I've already run the script and …

Member Avatar for Gribouillis
0
625
Member Avatar for Nazneen_1

Hi All, i need to convert this Python code to C# .Tried Some online converters nothing Worked out so far.Please Help. import openpyxl from PIL import Image, ImageTk import Tkinter as tk import subprocess import time import os import RPi.GPIO as IO import sys import glob def Image_dis(img, delay): root …

Member Avatar for alc6379
0
556

The End.