- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 16
- Posts with Upvotes
- 16
- Upvoting Members
- 11
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Experienced Software Engineer with a passion for creating technology improving human life.
- Interests
- JavaScript, TypeScript, C++, Python, Nodejs, Angular, React, Embedded Systems
Re:
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() … |
|
Re:
This is one small snippet of after event usage. You could express if you find this kind of simple code to be usefull as snippet. Notice also vegaseat's sticky message threads in begining of Python forum in addition to code snippets. |
|
Re:
Hello, I am trying to post my city location automatically when someone update their status. How? I try this but it does not show anything as it suppose to be: I follow this tutorial: https://www.sitepoint.com/geolocation-jquery-api-geoplugin/ <script> jQuery(document).ready(function($) { alert("Your location is: " + geoplugin_countryName() + ", " + geoplugin_region() + … |
|
Re:
The idea of this thread is to help the beginning Python programmer with hints and helpful code. Please feel free to contribute! If you have any questions start your own thread! The creators of Python are very active, improving the language all the time. Here is a little of the … |
|
Re:
No double posting. Add only one to the number of the previous poster. Go! 0. |
|
Re:
Okey, so since I was a little kid I allways would like to make my own game ! and I allways liked to fix gameservers, Teams in games like Clans and Guilds and so on. Now to the point, me and my friend are going to educate us to make … |
|
Re:
Hi, i would like to know is it possible to create an application that allows a computer to send and receive SMS to/from a mobile phone without using a GSM modem (maybe just throught wifi)? i was thinking of making a server that would handle the sms'ing process in between. … |
|
Re:
Hi I'm trying to use PySerial and I'm getting "Access Denied". I don't know if this is a bug from PySerial library or I'm doing something totally stupid :-) Specification: Windows XP pro SP3 PySerial-2.5.win32 (Installed from binary) Python 2.7.1 (I know it's a bit old :-)) [CODE] from serial … |
|
Re:
Suppose i have a list l=[1,2,3] i want to make this list as [2,3,4] i.e. add 1 to all the values in list l. I want to do it by the method of for loop.. Can someone help? |
|
Re:
I'm writing a program that checks a txt file with a list of words (one word per line). I'm just this side of done, I think. [CODE]def StripPunctuation(s): answer="" for c in s: if c.islower() or c.isupper(): answer=answer+c.lower() return answer def Reverse(s): answer="" for c in s: answer=c+answer return answer … |
|
Re:
I want to know what to do if i have some content in a text file, i wish to preprocess it by removing certain things. from the file the text file has content as shown below sub_401000 proc near [B]; [/B]CODE XREF: sub_4021FD+7Fp [B]; [/B]sub_403366+40Dp ... loc_401019: ; CODE XREF: … |
|
Re:
Please help me! I have to make dictionary in py tkinter and i don't know how to do definition this is my code: from Tkinter import * j=("slo", "ang", "nem") def pretvori(): if(b.get()==j[0] and c.get()==j[1]): slo_v_ang() if(b.get()==j[0] and c.get()==j[2]): slo_v_nem() if(b.get()==j[1] and c.get()==j[0]): ang_v_slo() if(b.get()==j[1] and c.get()==j[2]): ang_v_nem() if(b.get()==j[2] and … |
|
Re:
Good day everyone, I need to print data using if-elif statement. I when I run this code like this, everything went well [CODE] if row['username'] == 'mutago': print " okay" sys.exit(0) else: print "wrong" [/CODE] OKAY now i want to include elseif statement to print another data but it returns … |
|
Re:
Hey, So I am completely new to python, I was wondering if someone could assist me with this program I am trying to make, The idea is simple, a program that counts for the user. Asking the user to enter a starting number, ending number, and the amount to count … |
|
Re:
I'm trying to write a program that takes a string and prints one letter per line. I need to use a while loop based on string length. I googled, so sorry for the newbie question. Thanks! |
|
Re:
Not sure how to do this I tried googling it but to no avail. I want to print out a specific line in my while loop [CODE]450 42.5 16625.0 460 42.0 16820.0 470 41.5 17005.0 480 41.0 17180.0 490 40.5 17345.0 500 40.0 17500.0 [/CODE] example of part of my … |
|
Re:
I am making a program that analyzes text from a user After inputting several line and using the keyword "DONE", the program will ask for one of 8 possible options which is the menu() function where the user will enter the number. How would i be able to run my … |
|
Re:
ok for one... I must say I'm a noob at classes, but have made some pretty good apps using nothing but functions. I'd like to get into classes though, and every time I try, I end up misunderstanding 1 or 2 things and messing the whole thing up... <:\ can … |
|
Re:
Well Facebook is also generate good traffic for your website. Simply, create a Facebook page and update it daily with your approved backlinks in articles, classified ads and also add your website links. Enjoy.! |
|
Re:
I'm having trouble creating a function with one parameter that reads from a file and then creates and returns a dictionary based on what's in the file. And example of whats in the file: [ICODE]115 139-28-4313 1056.30 135 706-02-6945 -99.06 143 595-74-5767 4289.07 155 972-87-1379 3300.26[/ICODE] What i have: [CODE]open('balance.txt', … |
|
Re:
1)Write Python code that asks the user for two angles of a triangle. Then, first determine if the triangle can exist (make sure that the third angle can be found such that the sum of the three angles is 180°, with all angles both given and computed conforming to the … |
|
Re:
1 the computer displays some secret word(in underscore):--- 2 I guess letter"c"in the word 3 yes,the screen pops up like this :c-- 4 I guess the second letter is u 5 yes , it is :cu- 6 last ,I guess the final one is p 7 yes , it is … |
|
Re:
Hi, this is my first post. I apologize if I make any mistakes. I have a problem where I need to take a list and print it out as a table of average for each person. The list is : [('tom',4),('ben',5),('tom',8),('ben',12)] So far my code is: [CODE]def getAverage(list): list = … |
|
Re:
Hi everyone! This is my first post even though Ive been reading you for a while. I'm a Python beginner and I'd need your help. I'm processing a very big file (more than 2 millions of lines) but I'll show you a much smaller example (24 lines rather than 74513). … |
|
Re:
How to suppress end user ability to edit/add/delete text in a Text widget? (Python v3.2.. and tkinter) The point is to [B]suppress only the ability to change/add/delete text[/B] but not to castrate other features. Perhaps a NoEdit Text widged would be a better name. I've tried [B].text['state'] = 'disabled'[/B] and … |
|
Re:
[CODE] for elem in sentence: .setdefault(elem, 0) repeat[elem] += 1 print sorted([ (freq,elem) for elem, freq in repeat.items()],reverse=True)[:3] print repeat [/CODE] i have this loop which analyses the elements in the loop and then prints by frequency, i wanted to print by frequency and alphabetically. example [(5,apple),(5,orange)] |
|
I'm trying to use cx_Freeze and everything everything seems like it should work fine, however I'm getting an import error for import tkinter [CODE]Traceback #... from tkinter import __fix #... import_tkinter ImportError: DLL load failed: The specified module could not be found.[/CODE] This only happens when I take the the … |
|
Re:
hii I am trying to develop a simple image browser.this is wat i have done so far [CODE]from Tkinter import * top=Tk() def search(): global pic global photo pic=PhotoImage(file='images\\pic.gif') photo=w.create_image(250,200,image=pic) w=Canvas(top,height=500,width=500,bg="white") entry=Entry(top,bg="white") nxt=Button(top,text="next",activebackground="blue",command=next) prev=Button(top,text="prev",activebackground="blue") b=Button(top,text="search",activebackground="blue",command=search) b.pack() entry.pack() nxt.pack(side=RIGHT) prev.pack(side=LEFT) w.pack() top.mainloop() [/CODE] as u can see it will display a … |
|
Re:
When I open python I am unable write my code in it. This just started to happen no idea what is happening? Its unclickable inside but I can click the bar on top. Anybody know? |
|
Re:
Hello, I am very new to python. I have two files containing multiple lines of files name, and I need to filter out if file name present on file1 than remove it from file2 and save the file2 difference into a third file. i.e. file1: /users/ux454500/radpres.tar /paci/ucb/ux453039/source/amr.12.20.2002.tar~ /paci/ucb/ux453039/source/amr.1.25.2003.htar.idx /paci/ucb/ux453039/source/amr.1.18.2003.htar.idx file2: … |