15,190 Topics

Member Avatar for
Member Avatar for revenge2

How does [URL="http://www.swaroopch.com/notes/Python_en:Basics#Indentation"]indentation[/URL] work exactly?. Could someone expand on the explantion given on that page please. -regards.

Member Avatar for mn_kthompson
0
118
Member Avatar for nrupparikh
Member Avatar for damo87

Hi guys, i'm doing a peice of coursework for uni where we are required to implement a Min-heap/priority queue for calculating the Minimum Spanning Tree. In a min heap, the parent's value needs to be smaller than that of its two children. I've tried to implement this,giving the following list …

Member Avatar for damo87
0
431
Member Avatar for revenge2

hello there, well i just started python, and well came to grinding halt. Why doesnt this work when i enter this... [CODE]print "hello world" [/CODE] it gives me [CODE] IDLE 3.0 >>> print "hello world" SyntaxError: invalid syntax (<pyshell#0>, line 1) >>> [/CODE] can anyone help me? -cheers

Member Avatar for sneekula
0
123
Member Avatar for Ghostenshell

First time I've asked for help so please bear with me... ***Brain Freeze*** OK Supposed to open a txt file. Assuming the txt file is formated properly. The file is a what I am assuming a list of names and ages. I created my own file... kick me 989 bodybody …

Member Avatar for Murtan
0
103
Member Avatar for Mr_Grieves

Wow. Just wow. I'm working on a script that evaluates probably millions of trig functions in a given run (it's a geometric ray trace of an arbitrary surface, so the math gets nasty fast...). I've been wrapping the numpy sin, cos, etc to work with the functions I get from …

Member Avatar for Stefano Mtangoo
1
91
Member Avatar for lllllIllIlllI

Hi everyone Well, python 3.0 came out just about a week and a bit ago and i though, now people have had a chance to download it and play around with it a bit, what do you think of it? Is it better? What's the best new feature? Stuff like …

Member Avatar for Stefano Mtangoo
0
113
Member Avatar for fuatm16

Hi Everyone, I m trying to built a Web Vulnrebilty Scanner which will test CGI/RFI/XSS/ on a remote Web Server.Here are my baby steps for do this project. 1-Discover pages in remote site. (ex: [url]www.google.com[/url] , [url]www.google.com/x.html[/url] google.com/y.html ...) 2-Post some scripts to the link and test the response. 3-Read …

Member Avatar for mn_kthompson
0
202
Member Avatar for mn_kthompson

I'd like to write up something that will generate random numbers that would plot into a triangle distribution. I know how to get a normal distribution, which is similar. [CODE=python] import random for i in range(200): print random.normalvariate(3,1) [/CODE] But there doesn't seem to be anything in the random module …

Member Avatar for mn_kthompson
0
2K
Member Avatar for codedhands

Hi all.Am trying to extract a group of words from a text file.but i dont get the expected result using regular expression.Here are my codes: mytext.txt contains: [code] Group=1 Name=mattew Sex=male Age=25 Group=2 Name=John Sex=Male Age=19 [/code] When i try to get the group=1 i end up get everything below …

Member Avatar for codedhands
0
105
Member Avatar for mmxbass

I am currently storing a hypermatrix of not very many objects over a 4d hyperspace. I am working with a 100x100x100x100 hypermatrix that is VERY sparsely populated. Only about 500 cells actually contain anything. The problem is that this matrix takes up huge amounts of memory even when it's mostly …

Member Avatar for mmxbass
0
155
Member Avatar for nrupparikh
Member Avatar for pinder

Hi, I'm trying to copy a file in python, I have imported the shutil module My problem is that I want to copy file in a directory beginning with a certain name. Example I have 5 file in the fodler but i want to copy all the one tat begin …

Member Avatar for nrupparikh
0
127
Member Avatar for MaxVK

Hi. I have tree control with a structure already in it. A function returns a string that matches one of the items in the tree control structure (They are all Unique), and I need to select that item in the tree. It doesn't matter if the code underlying a selection …

Member Avatar for MaxVK
0
143
Member Avatar for elvenstruggle

Hey guys, I just want to know if there is any ways to add music to a python program (non-GUI, pure text program), and if there is, how? Thanks a lot!

Member Avatar for Ene Uran
0
1K
Member Avatar for Clipper34

Hey guys, I'm in a bit of a loop here. What i'm trying to do is have a simple web page an that it will direct it's self to a FTP server on my network. Here is where the problem starts for me. I want to be able to upload …

Member Avatar for Stefano Mtangoo
0
92
Member Avatar for leegeorg07

hi again after watching the numb3rs season 3 finale i wanted to try and make a program to encode or decode a paragraph i have attached a .txt file with the codings how should i start? all help welcomed. thanks in advance leegeorg07

Member Avatar for Stefano Mtangoo
0
559
Member Avatar for woah
Member Avatar for mn_kthompson
0
105
Member Avatar for madrikh

I'm just tarting with wxPythjon. I wrote this simple program to get some experience with panels.. It wants to open a frame and add a number of euivalent panels, each with an inactive button. And it does seem to do tht (the sizing is fixed because it's only a toy). …

Member Avatar for madrikh
0
156
Member Avatar for Stefano Mtangoo

I was thinking of Separating functions from GUI. I want when have different classes of GUIs that share functions, then I will have one class full of function/methods on need. However I failed to separate them, for I could not make instance of Functions class in the gui class in …

Member Avatar for Stefano Mtangoo
0
113
Member Avatar for lllllIllIlllI

Hi I have been using classes for quite a while but there is still one concept yet that i havent ever quite understood and that is decorators. I have noticed Gribouillis uses them a lot so in some ways this question is directed at him. I would like to know …

Member Avatar for lllllIllIlllI
0
110
Member Avatar for AstralCorpse

Hey guys, I'm new to Python and programming in general, and I've come across a problem that I can't quite figure out in my experimentation with the random module. So, basically, I want the following code to ask the user to input a word, and then randomly print a single …

Member Avatar for mn_kthompson
0
132
Member Avatar for Michigan_Guy

I'm working on text-based role playing game that uses a GUI for some of the functionality. After a bit of a learning curve I've got the GUI done and am in the process of figuring out how to implement some of the other features. One thing I have run into …

Member Avatar for sneekula
0
96
Member Avatar for dseto200

Character creating program ie Dungeons and Dragons. Player has 30 points to spend on 4 attributes - strength, health, wisdom, and dexterity. Player should be able to spend points from the pool on any attribute and should be able to take points from an attribute and put them back into …

Member Avatar for dseto200
0
117
Member Avatar for tutti

here i have to Write small a program that asks the user to enter 20 numbers (stored in a list), between 1 and 10 and draws a simple of asterisks for the data in the list. For example: 10) * * * * * * * 09) * * * …

Member Avatar for bvdet
0
119
Member Avatar for Rejinacm

I want to convert strings to bit-fields.Also,convert them to binary and then use. Need help with this..help me ..

Member Avatar for Rejinacm
0
74
Member Avatar for SpeedMath

I am beginner... I already install numpy,scipy and also Matplotlib.... Can anyone helps me? I wanna to do a calculator program about how to calculate CGPA. I still don't know how to write Python script for the grade as below. Grade: A=4.00 A-=3.70 B+=3.30 B=3 B-=2.70 .... This is my …

Member Avatar for SpeedMath
1
805
Member Avatar for Kezoor

Hello everyone, I have been through the Starting Python thread, and I have archived lots of stuff for further learning ! But there is one little thing for which there is no specific explanation, and looking at Google doesn't help me much. Why do the classes of many scripts are …

Member Avatar for Kezoor
0
129
Member Avatar for bnarav

We have some python scripts which send an email with the error code when ever a failure happens in the python scripts. We are in the process of moving these from our current server (Windows 2003 ) to a new server (Windows 2003 R2). I was testing these scripts and …

Member Avatar for mn_kthompson
0
120
Member Avatar for tutti

i already have a "def show hand" section, which shows winning hands. but i need it to do wht i have written below here is a black jack code, i want it basicialyy show score for each game detailing the users total, the computers total and the winner and When …

Member Avatar for Murtan
0
177

The End.