- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
18 Posted Topics
Re: import sys sys.path.append('/path/to/directory') | |
Hi guys, So I'm busy writing an application that needs to update a list from the web after a certain amount of time. main.py file class Gui: def ...... def ...... def ...... def on_update_click(): update() app=Gui() Gtk.main() So when the program loads up, user will click the update button … | |
Hi guys. I'm trying to access some User interface files (.glade) which are in a subdirectory. from gi.repository import Gtk import os path=os.getcwd+'/ui/main.glade' def hurr(): builder=Gtk.Builder() builder.add_from_file(path) # get UI file window=builder.get_object('winlet') window.show() hurr() Gtk.main() This works if i use only 1 glade file, but i have multiple .glade files … | |
Hi guys. So, I'm trying to read data from a database and displaying in a GtkTreeview. I used glade to design the GUI when i click on the button (view movies) the list of movies should display as a list. def on_btnmovies_clicked(self,widget,data=None): store=self.builder.get_object('listmovies') connect=sqlite.connect('movies.db') db=connect.cursor() db.execute("SELECT * FROM movie") for … | |
So i was busy playing around with the python module MySQLdb and looking at sql injection. [CODE] import MySQLdb def hack(name): db=MySQLdb.connect('xxx','xxx','xxx','xxx') cursor=db.cursor() sql="SELECT * FROM PLAYERS WHERE NAME = %s" %(name) print sql cursor.execute(sql) print cursor.fetchall() [/CODE] i entered Hack("'pete' OR '1'='1'") results were: SELECT * FROM PLAYERS WHERE … | |
Hi guys I'm trying to place a user input into a database(mysql) [CODE]newplayer=raw_input('Please enter a new player name: ")[/CODE] the sql commands to insert data is [CODE]sql="""INSERT INTO PLAYERS(NAME) VALUES('newplayer')"""[/CODE] When i check the database it shows newplayer instead of what the user has entered. any ideas of how i … | |
Re: Mainly for the challenge, to see whether i can solve an exsiting problem in a better way or more efficient way. Another reason is that ever since I moved to open source software, i've been interested in looking at the code, fixing or improving it or just to see how … | |
Re: Before i do some coding i always go to [url]www.imgur.com[/url] to get some laughs, to get me in a good mood. Then i start to tackle what ever code i have to do. I agree with cwarn23, that fustration does lead me to be more determined to solve the problem. … | |
Hi guys, I'm having trouble with this particular code [code=c] #include <stdio.h> int main() { char aChar; printf("Please enter a character: "); scanf("%c",&aChar); while (aChar!='x') { printf("The Letter is %c\n", aChar); printf("Please Enter another character: "); scanf("%c", &aChar); } return 0; } [/code] The output is: Please enter a character: … | |
Re: hmmmm I'm my experience open source is good for a couple of reasons 1. You are able to tweak the source code of whatever application to suite your needs. 2. programs what are open source are usually more stable since a whole host of people (Global) are working on it. … | |
Re: LawL, i guess the reporters only focused on the last part of this quote "The double sun image is an effect of optical refraction, Kaler said, but it's a "pretty darn rare" one, and one not fully explained by science". | |
Re: If I had one of those old Land/Range Rovers, I'd put on it [B]When I was a baby I used to be a Hummer[/B] | |
Re: You have to extaract that file then compile from source. [CODE] tar -jxvf filename.tar.bz2 [/CODE] It will than create a folder in the same place you extracted it, once you in there you have to compile it [CODE] ./configure make make install [/CODE] | |
Hi guys Everytime i use sudo in the terminal i get "sudo: unable to resolve host legacy" I had a look at /etc/hosts file, all i have is this 127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 … | |
Re: faizlo You need to loop the code to increment from the lowerest number to the highest one. Ummm, Imhiya in your for loop i think you made a mistake. it should be [CODE] for(i=i;i<=j;i++) [/CODE] :-) | |
Re: Ummm, Please provide the full details of the problem you are trying to work with and show the code that you have done so far, so that we can better assist you. | |
Re: I would suggesy changing the .txt file to a csv file, must easier to work with that. [url]http://www.daniweb.com/forums/thread144178.html[/url] [url]http://www.daniweb.com/forums/thread299424.html[/url] |
The End.