Posts
 
Reputation
Joined
Last Seen
Ranked #52
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
92% Quality Score
Upvotes Received
337
Posts with Upvotes
256
Upvoting Members
105
Downvotes Received
19
Posts with Downvotes
19
Downvoting Members
13
118 Commented Posts
~1.37M People Reached
Interests
Guns, target/sharp shooting, martial arts, hunting, cooking
Favorite Tags
Member Avatar for Duki
Member Avatar for vegaseat

Some cause happiness wherever they go; others, whenever they go. -- Oscar Wilde

Member Avatar for Reverend Jim
15
13K
Member Avatar for linux

According to my engineering professor, the reason there is a variety of computer languages is that each language (at least the popular once) was written for a purpose. Python was not written to make Operating Systems, but C was (for Unix). So it would be a little silly to use …

Member Avatar for Thulan
2
2K
Member Avatar for jopeto

Probably the easiest way to do this is to use the local variable dictionary vars() to create new variables on the fly: [code=python]food = 'bread' vars()[food] = 123 print bread # --> 123 [/code]You can print out vars() to see what's going on.

Member Avatar for Rayalacheruvu
1
101K
Member Avatar for tony75

Looking at main.py this program is a nightmare of imports. https://github.com/PicciMario/iPhone-Backup-Analyzer-2/blob/master/main.py

Member Avatar for Andreas_7
0
22K
Member Avatar for anveshi
Member Avatar for rproffitt
0
14K
Member Avatar for Reverend Jim
Member Avatar for John_smith
10
21K
Member Avatar for The Dude
Member Avatar for joy_deep

Try this: ''' wxBoxSizer101.py button1 at upper right corner button2 at lower right corner ''' import wx class MyFrame(wx.Frame): def __init__(self, parent, mytitle, mysize): wx.Frame.__init__(self, parent, wx.ID_ANY, mytitle, size=mysize) self.create_widgets() def create_widgets(self): self.button1 = wx.Button(self, wx.ID_ANY, label='Button1') self.button2 = wx.Button(self, wx.ID_ANY, label='Button2') # use a box sizer to lay out …

Member Avatar for Jonny_4
0
992
Member Avatar for vegaseat

A simple timing example: import time def print_timing(func): """ a decorator function to time another function time.clock() works on Windows systems only you can use time.time() instead, but it gets updated less frequently and can give 0.0 results on faster functions """ def inner(*arg): """*arg are the arguments of function …

Member Avatar for amir_19
3
24K
Member Avatar for vegaseat

wxMediaCtrl uses native backends to render media, for example on Windows there is a ActiveMovie/DirectShow backend, and on Macintosh there is a QuickTime backend backend options:. wx.MEDIABACKEND_GSTREAMER for linux/unix wx.MEDIABACKEND_QUICKTIME for Mac

Member Avatar for bunkus
2
4K
Member Avatar for Ancient Dragon

How do you get a sweet little 80-year-old lady to say the F word? Get another sweet little 80-year-old lady to yell “BINGO!”

Member Avatar for jkon
4
4K
Member Avatar for vegaseat
Member Avatar for Hillzy

Put the code between code tags. Read the lightgray message in the background of the Quick Reply field below. Or read: [url]http://www.daniweb.com/forums/announcement114-3.html[/url]

Member Avatar for Faro_1
0
3K
Member Avatar for RMartins

The function sqrt(x) returns a float: [code=python]import math x = 9 y = math.sqrt(x) print y, type(y) # 3.0 <type 'float'> [/code]If you want the result to be an integer use int(y).

Member Avatar for pythonBasic
0
717
Member Avatar for sneekula

In the last couple of threads people have used the Python class, but really don't seem to know how to use them properly, or why to use them. Hence my question: "Why would you use a class in Python?" I though only Java forces you to use OOP.

Member Avatar for Vineetha_1
0
4K
Member Avatar for vegaseat
Member Avatar for vegaseat

Import the module shutil, it has functions for copying and moving files, copying whole directory trees, deleting directory trees and more.

Member Avatar for vegaseat
23
34K
Member Avatar for vegaseat

Predict the outcome of this Python code: [code=python]def sub_one(x): print "x before if -->", x if x > 1: x = x - 1 sub_one(x) print "x after if -->", x return x x = 5 final = sub_one(x) print "final result -->", final [/code]Can you explain the odd behaviour?

Member Avatar for vegaseat
20
18K
Member Avatar for vegaseat

Each king in a deck of playing cards represents a great king from history: Spades --> King David Clubs --> Alexander the Great Hearts --> Charlemagne Diamonds --> Julius Caesar

Member Avatar for vegaseat
11
9K
Member Avatar for sneekula

I got infected right after a Java and Adobe update on my Windows7 machine. folder \jnihmpibahpjjmcodbopcpdaelkbpjnc is most likely a random generated folder. Note on malware **PriceLess** (pops up as Chrome extension, highlights strings for ads): PriceLess is in folders: C:\Users\HomeGroupUser$\AppData\Local\Chromatic Browser\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Comodo\Dragon\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome SxS\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 …

Member Avatar for henri2398
1
638
Member Avatar for Ancient Dragon

In my book the only thing that lives on is meaningful communication you made with people that survive you.

Member Avatar for 45ish
0
1K
Member Avatar for vegaseat

Here is a comparison of some common Python GUI toolkits. These were created on my Ubuntu/Linux machine, because I could never get PyGTK to go on my Windows Vista machine. I followed the installation routine carefully, but there was always a dll missing, or an entry point wasn't found, or …

Member Avatar for vegaseat
9
45K
Member Avatar for RobertHDD
Member Avatar for DragonMastur

There is also an error in line 12. Since you are not running Python3 but Python2 tkinter should be Tkinter

Member Avatar for DragonMastur
0
409
Member Avatar for RobertHDD

According to Einstein the Sun uses up more and more matter, its gravitational pull should lessen and the Earth should move further away.

Member Avatar for RobertHDD
0
870
Member Avatar for Niloofar24
Member Avatar for fonzali
Member Avatar for Niloofar24

Normally you build a house from the bottom up. Try to understand the basics of Python first and put the windows in later.

Member Avatar for Niloofar24
0
10K
Member Avatar for ivel

@ivel I looked at the code you have written and at NathanOliver's helpful suggestions. I came to the conclusion that you need beginner's help. I took your code and corrected it, please study it: /* modulus_exercise101.cpp Write a program that counts the numbers from 3 to 117. For multiples of …

Member Avatar for NathanOliver
0
292