15,181 Topics

Member Avatar for
Member Avatar for kailashgkg

I am learning python and trying to connect my satellite decoder using telnet. When I tried to connect my device through telnet python script, I could successfully connected to the device. But i want to capture/save as well as read the output and logs of device (connected thru telnet) from …

0
66
Member Avatar for MustafaScript

I started to learn python today by myself using this course: https://www.youtube.com/watch?v=bX3jvD7XFPs&list=PLB2BE3D6CA77BB8F7 Is that a good start? which book for beginners do you recommend ? *the problem with that course is that i found a lots of things in that code i do not understand i need a book which …

Member Avatar for fonzali
0
413
Member Avatar for Niloofar24

Hello again. How can i limit my list indexes? I want my list to take only 3 indexes for example.

Member Avatar for Niloofar24
0
613
Member Avatar for Niloofar24

Hi, me again :) Look at this error please: File "./kivycal-1", line 103, in number_two self.check() TypeError: check() takes exactly 2 arguments (1 given) The error is pointing to here: def number_two(self, event): global numbers numbers.append(2) print numbers self.check() This is a part of a class in a .py file. …

Member Avatar for Niloofar24
0
306
Member Avatar for TObannion

Here is my encryption program. The decryption program is what is giving me some trouble. Here is the description of the first part: # encrypt.py - ENCODE MESSAGE AND WRITE TO FILE # # initialize a cipher list to store the numeric value of each character # input a string …

Member Avatar for TObannion
0
373
Member Avatar for Niloofar24

Hello. mylist = [6, '/', 3, '+', 9, '+', 8, '+', 1, '/', 2] How can i delete that list indexes? I tried: def clear(self, event): global numbers for i in numbers: print i del numbers[i] But it didn't work: File "./kivycal", line 83, in clear del numbers[i] TypeError: list …

Member Avatar for Niloofar24
0
275
Member Avatar for Cup of Squirrel

I've skimmed the manual and cant find the answer to this anywhere: In basic, to add an Input function you would do (for example): [CODE] Input "What is your name? " name$ [/CODE] How do I do this in Python?

Member Avatar for Jason_15
1
18K
Member Avatar for Niloofar24

Hello. I have a list like this: mylist = [7, "+", 2, "+", 1] I want to take them out of the list inorder to run the operation and get the real result; something like this: result = 7 + 2 + 1 So the result variable will be set …

Member Avatar for Niloofar24
0
333
Member Avatar for mryjyc

where sending data to the client but we cant receive the data why? code for client from Tkinter import * import random import tkSimpleDialog import socket import threading class Client(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.root = Tk() self.root.geometry('700x350') self.txtName = Entry(self.root) self.txtName.pack() self.txtPass = Entry(self.root) self.txtPass.pack() self.btnReg = Button(self.root, command = …

Member Avatar for iamthwee
0
184
Member Avatar for Pablo_2

Hello peoples, I'm thinking of starting do dvelop a new game. Specifically a 16bit RPG I'm thinking of programming it using Python because I'm more familiar with it but if any of you think that using a different language like c++ or Javascript would be better then please reply and …

Member Avatar for Teiman
0
183
Member Avatar for Odyssey2001

Hello!First of all,I'm so sorry for this huge post!!I wrote the whole code from the book,that's why the post is so big!!I'm reading this book : Rapid Gui Programming with Python and Qt.And I have problem understanding some parts of the code.I would be really thankful if someone could help …

Member Avatar for Odyssey2001
0
598
Member Avatar for Niloofar24

Hello. I have a Class in my python file. That Class contains some functions. How can i set the command of a Tkinter butten so that call a function of that class? I tried this but it didn't work: class calculating(object): def __inint__(self): self.current = 0 def addition(self, amount): self.current …

Member Avatar for HiHe
0
10K
Member Avatar for php_student

Hi, I am very new to Pyhton and wants to run a simple script.. but it gives me error.. def main(): print("This is simple python") if__name__ == "__main__": main() Its on the 3rd line.. Any help??

Member Avatar for Gribouillis
0
41
Member Avatar for ShilohAmi

Hi, I have data like these: data_past = [[62.0, 144.0, 3, 0]] where data_past=[[red_circle_x , red_circle_y , id_of_rectangle , status]] data_current = [[60, 148, 0], [148, 127, 0]] where data_current=[[red_circle_x , red_circle_y , status]] And I want to compare each row of data_current to all data_past to get minimum distance, …

Member Avatar for TrustyTony
0
227
Member Avatar for YouGotSnails

I am trying to use a loop to write randomly generated numbers to a text document. Then, using a different program, I need to use a loop to read the numbers. The first program needs to output the numbers in the SAME LINE, the second program needs to output them …

Member Avatar for snippsat
0
316
Member Avatar for Santanu.Das

Hello members, Presently I do my projects with vb.net. I am not familier with Python. I want to learn python. Would you help me to learn python? I know nothing about python and I donot understand where from I will start.

Member Avatar for vegaseat
0
272
Member Avatar for MustafaScript

I started learning python a few days ago, i want to learn both python and C++ What is your advice ?

Member Avatar for rubberman
0
200
Member Avatar for Niloofar24

I'm going to learn kivy programming language. Could you introduce some good tutorials to me please? Except the kivy.org. And also i'm looking for a good Kivy forum.

Member Avatar for Ene Uran
0
300
Member Avatar for 00Gambit

I Started to learn my first programming language - Python about 2 months ago and I'm 3/4 the way through my book Introduction to Programming using Python - Daniel Liang and I've started to lose interest. I don't actually find programming fun par se, just when I figure something out …

Member Avatar for ~s.o.s~
0
405
Member Avatar for Niloofar24
Member Avatar for Decode098

im currently making a program that takes in the names and scores of the student but i dont know how to get the top 3 scores when the scores starts to get the same ex student 1 is 100 student 2 is 99 student 3 and 4 is 98 i …

Member Avatar for Decode098
0
109
Member Avatar for 00Gambit

from tkinter import * from random import randint #Return random color #RRGGBB def getRandomColor(): color = '#' for j in range(6): color+= toHexChar(randint(0, 15)) return color #Convert an integer to a single hex digit in a character def toHexChar(hexValue): if 0 <= hexValue <= 9: return chr(hexValue+ord('0')) else: return chr(hexValue …

Member Avatar for vegaseat
0
171
Member Avatar for ebaum2112

i am trying to make a checkerboard that centerss automaticly no matter what the sideLength is. also i am tryiing to put the checker in the squares...im only a beginner!!!! have mercy heres what i have [code] def drawCheckerBoard(myTurtle,sideLength): myTurtle.speed(0) for i in range (8): myTurtle.forward(sideLength) myTurtle.right(90) myTurtle.forward(sideLength) myTurtle.right(90) myTurtle.forward(sideLength) …

Member Avatar for ilona.lizard
0
219
Member Avatar for Tcll

as the title states, I know runpy can run a module's code w/o importing it, but what I'm trying to do is send the module object to a... function supplied by my interface which is directly called by the module. what I'm talking about is: my interface provides these functions …

Member Avatar for Tcll
0
538
Member Avatar for Amulya_1

Hi, I'm trying to compare two CSV files (and many more like these below). I tried many ways, using lists, dictreader and more but nothing gave me the output I require. I want to compare all those rows that have same !Sample_title and !Sample_geo_accession values (whose positions vary). I've been …

0
181
Member Avatar for johnny blaz97

import tkinter top=tkinter.Tk() t=tkinter.Text(top,height=1,width=1,bd=2,font=10) t.grid(row=0,column=0) b1=tkinter.Button(top,height=2,width=8,bd=2,text="MC",fg="Red") b1.grid(row=1,column=1) b2=tkinter.Button(top,height=2,width=8,bd=2,text="Backspace",fg="Red") b2.grid(row=1,column=2) b3=tkinter.Button(top,height=2,width=8,bd=2,text="CE",fg="Red") b3.grid(row=1,column=3) b4=tkinter.Button(top,height=2,width=8,bd=2,text="C",fg="Red") b4.grid(row=1,column=4) b5=tkinter.Button(top,height=2,width=8,bd=2,text="MR",fg="Red") b5.grid(row=2,column=1) b6=tkinter.Button(top,height=2,width=8,bd=2,text="7",fg="Blue") b6.grid(row=2,column=2) b7=tkinter.Button(top,height=2,width=8,bd=2,text="8",fg="Blue") b7.grid(row=2,column=3) b8=tkinter.Button(top,height=2,width=8,bd=2,text="9",fg="Blue") b8.grid(row=2,column=4) b9=tkinter.Button(top,height=2,width=8,bd=2,text="/",fg="Red") b9.grid(row=2,column=5) b10=tkinter.Button(top,height=2,width=8,bd=2,text="sqrt",fg="Blue") b10.grid(row=2,column=6) b11=tkinter.Button(top,height=2,width=8,bd=2,text="MS",fg="Red") b11.grid(row=3,column=1) b12=tkinter.Button(top,height=2,width=8,bd=2,text="4",fg="Blue") b12.grid(row=3,column=2) b13=tkinter.Button(top,height=2,width=8,bd=2,text="5",fg="Blue") b13.grid(row=3,column=3) b14=tkinter.Button(top,height=2,width=8,bd=2,text="6",fg="Blue") b14.grid(row=3,column=4) b15=tkinter.Button(top,height=2,width=8,bd=2,text="*",fg="Red") b15.grid(row=3,column=5) b16=tkinter.Button(top,height=2,width=8,bd=2,text="%",fg="Blue") b16.grid(row=3,column=6) b17=tkinter.Button(top,height=2,width=8,bd=2,text="M+",fg="Red") b17.grid(row=4,column=1) b18=tkinter.Button(top,height=2,width=8,bd=2,text="1",fg="Blue") b18.grid(row=4,column=2) b19=tkinter.Button(top,height=2,width=8,bd=2,text="2",fg="Blue") b19.grid(row=4,column=3) b20=tkinter.Button(top,height=2,width=8,bd=2,text="3",fg="Blue") b20.grid(row=4,column=4) b21=tkinter.Button(top,height=2,width=8,bd=2,text="-",fg="Red") b21.grid(row=4,column=5) b22=tkinter.Button(top,height=2,width=8,bd=2,text="1/x",fg="Blue") b22.grid(row=4,column=6) b23=tkinter.Button(top,height=2,width=8,bd=2,text="M-",fg="Red") …

Member Avatar for vegaseat
0
1K
Member Avatar for iamthwee

Has anyone ever used tkdocs... http://www.tkdocs.com/ And if so what have been your opinions thanks.

Member Avatar for vegaseat
0
144
Member Avatar for MustafaScript

x = 25 epsilon = 0.01 numGuesses = 0 ans = 0.0 while abs(ans**2 - x) >= epsilon and ans <= x: ans += 0.00001 numGuesses += 1 print 'numGuesses =', numGuesses if abs(ans**2 - x) >= epsilon: print 'Failed on square root of', x else: print ans, 'is close …

Member Avatar for vegaseat
0
2K
Member Avatar for Niloofar24

Hello. I'm using Linux OS, Python 2 and the last version of Kivy framework. Here i have 2 files that i have typed them exactly as what i watched on a kivy tutorial video. Fist file is "main.py": from kivy.app import App from kivy.uix.scatter import Scatter from kivy.uix.label import Label …

Member Avatar for vegaseat
0
4K
Member Avatar for steven.rose.94

Good Day:) I'm trying to figure out how to remove the % sign that is returned from scraping Yahoo Finance **without** removing the decimal point (or a possible negative sign in front of number returned as netProfit). My goal is to convert the string without the % sign a float …

Member Avatar for Slavi
0
2K

The End.