15,194 Topics

Member Avatar for
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
117
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
204
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
107
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
157
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
130
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
146
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
94
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
562
Member Avatar for woah
Member Avatar for mn_kthompson
0
108
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
158
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
113
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
135
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
99
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
118
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
121
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
75
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
809
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
130
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
122
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
179
Member Avatar for madhatter84gn

Really new to python and maybe I am just missing something that is quite easy. I am trying out a simple recursive function that you would assign to a freshman CS class and I am trying to do in in Python in an attempt to learn the language. I can't …

Member Avatar for sneekula
0
123
Member Avatar for _Core

I am making a python script to extract files on mass which are stored in sub folders. The whole script works fine except when I pass the command to the system using os.system() [code=python] command = '"C:\\Program Files (x86)\\unrar\\unrar.exe" x ' + '"' + ch_dir + "\\" + File + …

Member Avatar for anurag_bagaria
0
1K
Member Avatar for dilbert_here00

Hi, I am learning python CGI programming but got stuck with some issues. I would really appreciate if you could help me out. Problem: I have made a web page using Python CGI scripts; from one of the menu items on the web page, I am trying to call another …

Member Avatar for anurag_bagaria
0
433
Member Avatar for Stefano Mtangoo

Hello Dev, I want to change font colour in wx.RichTextCrtl, but I find the way it is used in wxDemo is complicated with no code to explain. Is there simple way to do it? If there is no other way, can someone explain the way it is done in demo …

Member Avatar for Stefano Mtangoo
0
108
Member Avatar for gsingh2011

Ok, I just learned the basics of Python yesterday, and because of other programming knowledge, I picked it up pretty fast. So then I decided to try out pygame, and I installed it directly to my Python26 directory. But none of the example code I paste from any website doesn't …

Member Avatar for Stefano Mtangoo
0
557
Member Avatar for StarZ

This is an Assignment I have to do, I did everything but just don't know how to loop it. The part where it says "You need to pick a number from 1-3" I want it to loop even if the user entered a wrong key. Because right now, if the …

Member Avatar for StarZ
0
119
Member Avatar for rajasekhar1242

hi, i wrote the following program on python IDE. but i got "no module MySQLdb" as import error. can u give me any sugg import MySQLdb # Create a connection object and create a cursor Con = MySQLdb.Connect(host="127.0.0.1", port=3306, user="rajasekhar", passwd="venkata" db="tst") Cursor = Con.cursor() # Make SQL string and …

Member Avatar for nikhilvishnupv
0
457
Member Avatar for Rejinacm

:( :S :sad: Help me people I need to convert strings in Python to other types such as unsigned and signed int 8 bits,unsigned and signed int 16 bits,unsigned and signed int 32 bits,unsigned and signed int 64 bits,double,float,string,unsigned and signed 8 bit,unsigned and signed 16 bit, unsigned and signed …

Member Avatar for sneekula
0
140
Member Avatar for rajasekhar1242

hi everybody, i wan to develop web application by using python on mac os. i am trying to get a link between html and python code. can i give a link between them or not. if it is possible please send me your valuable suggeitions thank u

Member Avatar for EAnder
0
201
Member Avatar for elvenstruggle

Hello, I'm new to Python and I'm using Pydev. I'm having a problem: I have several classes and several variables outside the classes. I want to change a variable outside the classes from within a class: e.g. [code]# Class [B]class name_change(object): [COLOR="Green"]"""Change a text variable outside this class"""[/COLOR] def name_change(self): …

Member Avatar for elvenstruggle
0
117
Member Avatar for tutti

this a quick question, does it make diffrernece, on which version of python you have, would it still run, most of the codes. for example, if you made code, in pythion version 3, and then you copied the code, in to an older versions, would it still run.

Member Avatar for sneekula
0
77
Member Avatar for shr2408

Is there a lib in python which allows automation of keyboard sequences (for want of a better expression 'keyboard emulation') I'm pretty new to python, so please be easy on me if it's a [B][I]really[/I][/B] daft question. :P Thanks.

Member Avatar for shr2408
0
365
Member Avatar for tutti

i have balckjack code, which does not run, i need some ones help, with tellings, wht the problem is. i have higlighted part of the code,were it stops. below is the code. [CODE]from random import choice as rc rc=randomcards def total(hand): # aces in the hand aces = hand.count(11) # …

Member Avatar for tutti
0
113
Member Avatar for Zetlin

Hi everyone I dont know if this question has already been answer but I really need help so bare with me. So here is my problem I just downloaded python 2.6 for windows however whenever i try to open the IDLE i get this message: IDLE can't bind TCP/IP port …

Member Avatar for mn_kthompson
0
366
Member Avatar for codedhands

Hi everyone,i wrote a python thread that opens a file and reads it.The problem is that i dont know how to return the data as the thread will not return it from the run() method.I tried writing another function that gets the file content but when i call this function,it …

Member Avatar for codedhands
0
2K
Member Avatar for aodpreacher

I have set up a code in a class but i am not sure if this is the class that i would use.I have to put the logic of the game in a Class and then use the methods from the class to run the game.Right now i have some …

Member Avatar for tutti
0
1K
Member Avatar for rockrushali

Hi, I m calling a url, which can be called using either GET or POST method. When I use @ symbol in url like /abc/@rushali it will not come in its get method. I printed something directly in class, it is showing there, but not in get method. I am …

Member Avatar for lllllIllIlllI
0
63
Member Avatar for cointosser

Hi i have a python program project its to make an arithmetic program with difficulty lievels -essentially a calculator - that throws out addition, subtraction, multiplication, division and combined math problems (depending on which function the user chooses) -also has three difficulty levels. more digits are added when difficulty is …

Member Avatar for mn_kthompson
0
95
Member Avatar for dseto200

How do I subtract or add in a lists? When I run the program below I get the message print int(pool-strength) TypeError: unsupported operand type(s) for -: 'list' and 'int' [code=python] # Character Development Dungeons and Dragons # pool are the total points that I can use. pool = [30] …

Member Avatar for mn_kthompson
0
332
Member Avatar for Stefano Mtangoo

I use ctypes to play AUDIO using bass.dll found here: [url]http://www.un4seen.com/[/url] I have gone so far and tried as they advised me at their forum entry here: [url]http://www.un4seen.com/forum/?topic=9257.0[/url] But I still get errors. Can anyone take code and analyze to point out source of error? Here is the code, pse …

Member Avatar for Stefano Mtangoo
0
125
Member Avatar for MaracKoMarac

I have a simple Tkinter program that has a button and an entry. Now, how do I run code from the entry? For example: Entry -> print 'Hello!' Button -> Run the entry command

Member Avatar for MaracKoMarac
0
81
Member Avatar for nitinloml

[B]delete a list in text file[/B] well i m having a text file which contain time,user name & id, now if i want to modify the time without affecting the id & user name is it possible? or how i delete that list & enter a new list in that …

Member Avatar for woooee
0
203
Member Avatar for cointosser

Hi i have a python program project its to make an arithmetic program with difficulty levels -essentially a calculator - that throws out addition, subtraction, multiplication, division and combined math problems at random (depending on which function the user chooses) -also has three difficulty levels, which can be chosen by …

Member Avatar for Murtan
0
120
Member Avatar for Hrothgar

and i try use module random... >>> print random.randint(0,10) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'random' is not defined that's my version... Python 2.5.2 (r252:60911, Aug 1 2008, 00:37:21) [GCC 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]] on linux2 Type "help", "copyright", "credits" or …

Member Avatar for Stefano Mtangoo
0
175
Member Avatar for dseto200

Created a program random words with a list. When I run the program it will output duplicated items. How do I prevent that. Is there a special command to prevent that? [code=python]import random # random choice from a list for i in range(6): print random.choice (["abacus", "biology", "chemistry", "dog", elf", …

Member Avatar for dseto200
0
88
Member Avatar for lllllIllIlllI

Hi, Im making a program that is sortove like a media player... well, it is a media player. Its quite basic at the moment but i have been working on a few features. One of the things it can do is that it can play a video full screen. I …

0
52

The End.