Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
11
Posts with Upvotes
8
Upvoting Members
7
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
~29.4K People Reached
About Me

I am a self-employed travel agent in Namibia who spends a great deal of time developing website, for myself and other, and I have a general interest in programming. I work mainly with Python, and use the Django Web Framework now for all my website work.

Interests
Nature, computers, kids, and I would love to fly
PC Specs
Linux Ubuntu (10.04, sometimes others just for kicks) Windows for website testing
Favorite Tags
Member Avatar for Namibnat

I am still trying to get a grasp on the php/mysql interaction. Why does something like this not work and without all the error catching, can one do something like this? [CODE] $result = mysql_query("SELECT * FROM stadium WHERE gametime = `$_z`;"); $row = mysql_fetch_row($result); $bababa[name] = $row[0]; $bababa[town] = …

Member Avatar for guruparthi
0
715
Member Avatar for laung

My coding here: [code] option_input = raw_input(">>>") option_input = option_input.upper() if option_input == "V": print "High Scores:" saveFile = open("scores.txt", 'r') scores = saveFile.read() saveFile.close() nameScore= [] for line in scores.split('\n'): # skip any empty line if not line: continue userScore, score = line.split(',') #convert score to a numeric value …

Member Avatar for TrustyTony
0
188
Member Avatar for khakilang

That is the question. Like you have found everything you need in Linux and do not depend on any OS at all. I have found most of the software equivalent to Microsoft and I can totally switch except for some game which I don't really need. But my all in …

Member Avatar for Unbidden Ghost
0
148
Member Avatar for Namibnat

I am new to working with Django, and have found it really fun and interesting to develop with. But I have been trying to upload it to a hosted server and just not getting it to work. I have followed the instructions they give, but just not getting it to …

Member Avatar for Namibnat
0
220
Member Avatar for playonlcd

Hi, I am a little newbie with python, more use of C++ The goal is to search a specifed filename e trought multiple directories. After finding the file, search trough it's content some description on some strings and write out the description on a xml file. So far i manage …

Member Avatar for playonlcd
0
171
Member Avatar for germ

Hi I am new at python, so say I have a text folder with many number records in a single column how would I go about extracting only numbers that begin with zero and is either 10 or 7 digits long creating a new txt file for the 7 digit …

Member Avatar for vegaseat
0
153
Member Avatar for PinkStone

Hi I have been having this issue for a while and cannot figure how should I start to do this with python. Actually Im not a programmer but would like to learn it. Not just because of this (what topic title) says but, for sure, for other advantages to. I …

Member Avatar for PinkStone
0
118
Member Avatar for Godflesh

How do i make this code to store data in a global variable, it create random number of elements. [code] n = random.randint(0, 99) for i in range(1): print "-"*60 print "Here is some new elements! " while n >= 0: data_list = random.randint(0,99) print data_list, time.sleep(.10) n= n-1[/code]

Member Avatar for Godflesh
0
308
Member Avatar for Namibnat

Hello, if I start to distribute some software I have written under a copyright, using a free software license, I would like to know what do the dates of the copyright stand for. If I say (c) 2009-2010 Vernon Swanepoel, what does it mean that I did on those dates. …

Member Avatar for Namibnat
0
228
Member Avatar for ivh90

hey all what is the best way to execute a certain function repeatedly after a certain period of time ? for example: the increment of a certain variable every second thx

Member Avatar for Namibnat
0
58
Member Avatar for gangster88

how could i print the length of a parameter?.. like def length(word) gives the output "word 4"?.. I have no clue of what to do? def length(): len=length()

Member Avatar for vegaseat
0
116
Member Avatar for punter999

[CODE]import wx class McaMenu(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(640, 432)) menubar = wx.MenuBar() file = wx.Menu() new = wx.MenuItem(file, 1, '&New\tCtrl+N', 'Creates a new document') file.AppendItem(new) file.AppendSeparator() open = wx.MenuItem(file, 2, '&Open\tCtrl+O', 'Open New document') file.AppendItem(open) save = wx.MenuItem(file, 3, '&Save\tCtrl+S', 'Save') file.AppendItem(save) save = …

Member Avatar for Namibnat
0
166
Member Avatar for Namibnat

One aspect of computers that I just don't find clear learning material on is networking. There seems to be loads of information on 'how to' but I still don't understand the underlying basics. What is meant by a Port? Why are ports numbered so strange (as in, not 1,2,3). I …

Member Avatar for Namibnat
0
121
Member Avatar for Godflesh

How can you check the length of a file / list and then use the value in an "if-loop" in python? I want to create a "if-sats" that must check the amount of elements(numbers) in a textfile, if the amount is less then 5 do this... else do that..

Member Avatar for Godflesh
0
97
Member Avatar for punter999

import wx class McaMenu(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(640, 432)) menubar = wx.MenuBar() file = wx.Menu() new = wx.MenuItem(file, 1, '&New\tCtrl+N', 'Creates a new document') file.AppendItem(new) file.AppendSeparator() open = wx.MenuItem(file, 2, '&Open\tCtrl+O', 'Open New document') file.AppendItem(open) save = wx.MenuItem(file, 3, '&Save\tCtrl+S', 'Save') file.AppendItem(save) save = …

Member Avatar for Namibnat
0
107
Member Avatar for deonis

Hello ! Recently I was doing some text formatting using python and this forum was extremely handy. My problem now is to put any letter in subscript or superscript. Apparently in Unicode there are just a few symbols in superscript but I want to put let say letter "b" in …

Member Avatar for deonis
0
13K
Member Avatar for Namibnat

Is there a way to incorporate a spell checker within a wxPython gui? I would like to be able to check the spelling of wx.TextCtrl values before they get posted to a sqlite3 database. I would imagine that the spell checker would be very os specific, but for me it …

Member Avatar for Namibnat
0
358
Member Avatar for Namibnat

Hi there, I would like to be able to change a button during the runtime of a gui. I can change the value no problem (set Label) but I need to change the size of the button as well. I have managed to change it with SetSize((120, 30)) but then …

Member Avatar for Namibnat
0
274
Member Avatar for mahimahi42

I've been coding a simple dice roll game to practice Python. I've got the basic mechanics worked out, but I want to have it so that the player receives 5 points every time the game is won. I've tried just simply adding 5 to the variable (PLAYER_TOTAL in the case), …

Member Avatar for jcao219
0
144
Member Avatar for redyugi

I randomly felt the urge to make a password generator, and it runs semi smoothly. However, whenever I choose to make a custom length password, it freezes and my program exits. This is supposed to be simple but...can you help? [CODE]###################### # Password Generator # # Version 1.0 # # …

Member Avatar for redyugi
0
80
Member Avatar for rehber344

hi everyone ı am a new begıner . why and when do we have to use "None" for example if x. is None: or at the definatıons def lookfor(a, b=None): return a, b why and where are we usıng None.whats the aım to use that and my other questıon ıs …

Member Avatar for hondros
0
121
Member Avatar for GihanFernando

Hello all, I would really appreciate help with this seemingly basic problem. Here is my code; [code]import wx import FloatSpin as FS class DesignConditions(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,id,'Design Conditions',size=(1000,700)) panel = wx.Panel(self) wx.StaticText(panel,-1,'Atmospheric Temperature (K): ', (25,150)) wx.StaticText(panel,-1,'Atmospheric Pressure (kPa): ', (25,200)) wx.StaticText(panel,-1,'Mach Number: ', (25,250)) wx.StaticText(panel,-1,'Ratio of Specific Heat Capacities …

Member Avatar for vegaseat
0
101
Member Avatar for fatalblade

hi , I have my python code but I couldn't solve it. here my sample loop: [CODE= python]import os import sys whileloop = True while(whileloop): initial_drive = "C:\\" inputline = input(initial_drive) <<< PROBLEM... if inputline == "exit": whileloop = False elif inputline == "about": print("no input") elif inputline == "": …

Member Avatar for fatalblade
0
166
Member Avatar for wildplace

[CODE]class calculator: def __init__(self, num, operator): self.__num = num self.__operator = operator def changeNum(self, newNum): a = newNum return a def getNum(self): return self.__num [/CODE] [CODE]def click(num): if num == "one": v = "1" elif num == "two": v = "2" elif num == "three": v = "3" elif num …

Member Avatar for Namibnat
0
102
Member Avatar for Adam2k

Hi guys! I need your help with a simple program I'm trying to make. It's supposed to read values from a file, covert them (and add/multiply), sort, and then view the values to the user. The values looks like this: [code]Stockholm 650000 55.5 2100 08 123 456 Whateverstreet 123 ... …

Member Avatar for Adam2k
0
107
Member Avatar for pluring

Hi! I need to split a list if item A is followed by item B. I'm really stuck at this and the only thing i could think of is that i should use regex, but i dont know how. Example of list: list = ['email@email.com', 'email@email.com', 'email@email.com', 'REF123', 'REF123', 'email@email.com', …

Member Avatar for Namibnat
0
100
Member Avatar for El Duke

I can't believe I am getting this error again and again .... Here is my class: [CODE]class LANGUAGE: def __init__(self, val): self.val = val def Set(self): return self.val [/CODE] Here is the function call: [CODE]if text in translate._languages: msg = "You have chosen the " + translate._languages[text] global NewLang newlang …

Member Avatar for El Duke
0
667
Member Avatar for Namibnat

[COLOR="Red"]Note two things: First off, I don't guarantee that it works well. Writing to files, if done wrong can always break things. Be careful. I mostly participate in this forum (the Python part) for fun, and my code is written like that. Second: this script is about copying things. I …

Member Avatar for Namibnat
1
769
Member Avatar for rmatelot

Extract Blocks of Info from Log File New learner..this would be my first try at writing in Python that I can actually put to use: Have log file content that looks like [URL="http://i.imgur.com/RcU3J.jpg"]this[/URL] Basically - I only want to keep "slots" with the indicator "[COLOR="Red"]/* mysql */[/COLOR]" - the blocks …

Member Avatar for Namibnat
0
2K
Member Avatar for jwxie

Hi, my professor is asking a project. Overview: Get x number of students for a simple survey. Make a data analysis, including [1] name [2] gender [3] ID [4] Question 1 and data analysis - probability - % - distribution In this project, each student is an "object" I am …

Member Avatar for jwxie
0
105