- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 35
- Posts with Upvotes
- 32
- Upvoting Members
- 21
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 2
I love Python!
I often play with D and C#.
- Interests
- School Biology Chemistry
- PC Specs
- Windows 7 OpenSUSE Ubuntu Netbook Edition
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 … |
|
This 'sticky' thread is for working examples of Python GUI code. Note that most wxPython examples have their own thread. Please use comments in your code to help the reader. The example code should be usable as a template, so folks get a feel for the toolkit and can use … |
|
Hi everyone, I am a beginner in python, and I would really appreciate if someone could help me with this. Basically I am trying to write a program where I will be importing a file that has a lot of numbers in many lines, there are also some blank spaces. … |
|
I wanted to start my own game. I have experience developing in C, C++ and Java. I also have tried out Python and currently I am learning OpenGL. I would like to know if there are preferrable programming languages that are suited best when it comes to game programming. Thanks … |
|
I could use some assistance My final project in a python class is to calculate the distance between 2 lat/long points. My code is really just managing the input & output portions, while using existing code (properly credited) in a function to do the actual calculations. I've got it working … |
|
[B][I][U]Introduction [/U][/I][/B] [COLOR="Red"]Hey everybody welcome to a tutorials on classes in PYTHON. The purpose I made this tutorial for is that when I was learning classes in python I dint found any good tutorials on Classes. Maybe I was wrong. But here's my tutorial.[/COLOR] [B][I][U]Layout[/U][/I][/B] In this tutorial i'll be … |
|
The code shows a fast prime number generator using a sieve algorithm. It looks at only odd numbers. Technically 1 and 2 are prime numbers too, since they are only divisible by unity and themselves, exceptions are made for 1 and 2. Zero and negative numbers return an empty list. … |
|
I'm currently working in another thread to find a better conversion method here's my script: [code] #!BPY """ Name: 'Brawl (.mdl0)...' Blender: 248 Group: 'Import' Tooltip: 'Import a Brawl model file (.mdl0)' """ __author__= ['Tcll'] __url__ = ("") __version__= '0.015' __bpydoc__= '''\ mdl0 Importer ''' # ***** BEGIN GPL LICENSE … |
|
This is a program to extract/compile car NAV .KWI extensions. Unfortunately, I do not know anything about Python though I will love to learn some time very soon. Could you help me compile this into an executable file for windows 7? Will be reatly appreciated. [CODE]#!/usr/bin/env python # # kiwi … |
|
does anyone have any note on rewriting C/C++ programs in Python?? google and bing give me the exact opposite, and I've got a headache from searching... please note that I can't read C++ if you need the program I'm rewriting, please let me know |
|
hi, right now i'm working on a program that prints parabolic shapes on the screen. And i want to be able to type a formule, and than i need python to understand that formule :? I have heard from many people that this is extremely hard But is there a … |
|
Crypting with xor allows one to write one function that can encrypt and decrypt a file. In this example a text file is used, but it could be an image file as well. Once you have created the encrypted file you simply send it through the same function again to … |
|
Not my code but I think free to share. This is intended as beginning point of learning classes or learning data structures. Read the document [url]http://mcsp.wartburg.edu/zelle/python/python-first.html[/url] As first exercise, this does not work instead of the while loop in test part: [CODE] for i in numbers: print i [/CODE] [QUOTE] … |
|
I know this sounds like a common topic, but hear me out :) I'd like to make my application a trial version. I don't have any problems with *how* to do it (disabling certain application features after set number of days, etc), but rather how to do it as foolproof … |
|
[I][CODE]execfile('comp1.py') def exefi(name, locals=None, globals=None): exec compile(open(name).read(), name, 'exec') in locals, globals exefi('comp1.py')[/CODE][/I] it can execute successfully. but [I][CODE]#execfile('comp1.py') def exefi(name, locals=None, globals=None): exec compile(open(name).read(), name, 'exec') in locals, globals exefi('comp1.py')[/CODE][/I] it come with "File "comp1.py", line 39, in <module> ex=c.end() File "comp1.py", line 17, in end return compile(string.join(self.code, "\n"),"<code>","exec") … |
|
Hello there everyone basicly im a new student who has just started studying computing i was wondering if i could make a program to block access to some webpages for example [url]www.bbc.co.uk[/url] so if the user types in [url]www.bbc.co.uk[/url] in the adress bar i want my program to display access … |
|
I have to make a server in python,which will extract POST data sent from the browser. Can anyone tell how can I go about this? |
|
Hi everyone, Im a python beginner so please bare with me, i have done the first few project euler but thats it, Im trying to write a script that will search all txt, htm, html files recursively through multiple directorys for a string and will then write the whole line … |
|
Is it possible for the user to input a Python snippet and run it? Like this: [code=syntax]x = raw_input("Python snippet: ") #And then run the script typed in here[/code] Also, we know how errors happen all the time. Is it possible to make it so that when errors happen because … |
|
Hello everyone, My high school offers courses both in Python and Lua. I have done some research on both of the languages and they both seem to be fairly nice. But, which one do you think would be more practical to learn, I know Python is more popular but is … |
|
Here is my code, what I'm having problems with is taking values from a 10 field file (scores.dat) and putting them into a list. How would i go about this? [CODE]def main(): fileIn = open( "scores.dat", "r") lineIn = fileIn.readline() while len(lineIn) != 0: print lineIn lineIn = fileIn.readline() parse(lineIn) … |
|
I'd like a code in which a raw_input function will end and move to a print function after 35 seconds. So something like: [code=syntax]var = raw_input() # put time limit of 35 secs here print "Time's up!" # prints this only if time runs out in the raw_input[/code] |
|
[B][I][U]Introduction[/U][/I][/B] Hey guys today I am writing a tutorial on Lists and tuples in Python.... So lets get started... [B][I][U] Layout:- [/U][/I][/B] 1.What are data sturctures? 2.What are tuples? 3.What are lists? 4.inbuilt functions on lists and tupples [B][I][I][U] What are Data structure?[/U][/I][/I][/B] Anybody familiar with programming or Actually Computers. … |
|
|
Hello all - I've been coding in Python for a couple of months now, and I recently ran across the following piece of code (where x is a set or list): [CODE]f = lambda x: [[y for j, y in enumerate(x) if (i >> j) & 1] for i in … |
I have a forked child process running which executes a system command killing the child using os.kill(child_pid, SIGKILL) stops the child process but the system process continues ! Can something be done to stop the system process also? A part of the code is something like this: #Child child_pid = … |
|
How do I convert the integer -2 to its hex 0xfe??? I tried hex() but it gives me -0x2 |
|
I need to write a loop that traverses the list and prints the length of [B]each element[/B]. So far I have this: [code] def countEachElement(): elements= ["spam!",'1',['Brie','Roquefort','Pol le Veq'],['1','2','3']] i=0 while i < len(elements): print len(elements[i]) i=i+1 [/code] But it's not counting each element of the lists inside the list. … |
|
hi there, i have some binary data (zip files, music, etc..)stored in a database, how can i start those files in memory without saving them to HDD..or even to temp files folder... thanks. |
|
This code worked fine under 2.6: [CODE]f = open("v20100515.csv",'rt') r = csv.reader(f) try: r.next() # skip the header record for row in r: n = 1 for col in row: print str(n) + ": " + col n += 1 ......[/CODE] But since I upgraded to 3.1, I modified it … |
|
Hi Everyone, Thanks in advance for any help. I am fairly new to programming python, and I and another person are developing a simple educational (graphical) tool that shows variable referencing for any python code that I run in my own defined local and global name spaces. The problem I … |