15,181 Topics

Member Avatar for
Member Avatar for jvignacio

Im trying to figure out a python script where, If there is no user input, it generates a form which asks for the user's name and email address by using the action form. any ideas ? any help much appreciated..thanks guys

Member Avatar for Freaky_Chris
0
66
Member Avatar for Stefano Mtangoo

Hi all, I have been trying to write and retrieve data from SQLite Database. So far I can make connection, cursor; but cannot get table populated(fails to execute SQL statement). Since I read somewhere that it is recommended to use ? instead of % then I tries it but I …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for rajeesh_rsn

Hi i am a php programmer. Kindly let me know a good book for begin python from its basic ??? Thanks

Member Avatar for Stefano Mtangoo
0
79
Member Avatar for Ghostenshell

Can anyone simplify this for me? I don't know if it is going to work I tried to adjust the code to fit on the page. Might have to delete the extra [ICODE]+\[/ICODE] [CODE=python]def main(): try: infile = open('text.txt','r') files = infile.readlines() lower,count,blank,dig = 0,0,0,0 #Counting uppercase for line in …

Member Avatar for Stefano Mtangoo
0
965
Member Avatar for Radly

I'm sure this is either easy or impossible. :) I have a Windows command console window open with a Python 2.5 interpreter running. I also have a text editor open on a module I'm debugging. What I'd like to do is make some changes in the editor, save the file, …

Member Avatar for Radly
0
86
Member Avatar for wotthe2000

Hi, i'm having some trouble using the built-in apply function. I want to take a string in an external definition then apply definitions on it which are in a class. The code I have is: [ICODE] global msgstr def create_message(message, msgstr): if msgstr[0:3].upper() == 'CMD': return apply(message, (msgstr)) elif msgstr[0:3].upper() …

Member Avatar for wotthe2000
0
93
Member Avatar for maheshmaks

Hi I am using to design flow to launch 3 Vmware images using queue. Can you please help me. I have just started. If you have links or help related to Vmware launching i.e. 3 images at a time. thanks in advance Regards, Mahesh

0
41
Member Avatar for jvignacio

What part of the HTTP header is always provided as part of the response of a CGI program? thanks guyss

Member Avatar for jvignacio
0
111
Member Avatar for wheatontrue

Dear all, I am having a lot of trouble using programs I programmed in python 2.5 - having upgraded to 2.6 I find that every function/class that makes use of SSL receives this error: Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> import ssl File "C:\Python26\lib\ssl.py", line …

Member Avatar for wheatontrue
0
99
Member Avatar for Luckymeera

I have a simple Rectangle drawn on Canvas. How can I retrieve the color on the Canvas AFTER the Oval is drawn without using Image, say, at the coordinate (100,100) ??? could anyone help plz...

Member Avatar for vegaseat
0
120
Member Avatar for romilana

I would be pleased if some could help me with a scripts using telnetlib to enable save web pages. Hope to hear from you soon

Member Avatar for jlm699
0
105
Member Avatar for san245

The following function returns a list of all prime numbers up to the figure supplied to it (n). Example: [code=python] import math def prime(n): answer = [] if n < 2: return answer for loop in range(2, n+1): isPrime = True upper = int(math.sqrt(loop))+1 for i in range(2, upper): if …

Member Avatar for jlm699
0
142
Member Avatar for leegeorg07

hey again i started to look at the time module a lot and i made this program: [ICODE]import time time.clock a = 0 print('hello') while a < 10000: print(a) a+=1 a = time.clock() print(a) [/ICODE] but i dont understand what a means so can you help me please

Member Avatar for mn_kthompson
0
119
Member Avatar for revenge2

I need help understanding classes better. [CODE=Python] class person: def sayHi(self): print('hello world!') p=person() p.sayHi() [/CODE] here what is the use of 'self'?, I've read two tuts on this but don't quite understand fully.... [CODE=Python] class person: def _init_(self, name): self.name=name def sayHi(self): print('hello, my name is', self.name) p=person('rs') p.sayHi() …

Member Avatar for sneekula
0
218
Member Avatar for gsingh2011

I'm trying to run a program using a python program. The program is supposed to run the program, get the output, and write it to a text file. The program being run (which is an exe), takes one argument, so I used: subprocess.call(["path", "arg"]) This works fine, but the problem …

Member Avatar for BearofNH
0
467
Member Avatar for int3grate

Hi all, I'm relatively new to python (I've been writing python code for about half a year now) and I'm trying to figure out how to use "seek" on larger files. I'm doing some work with large hard disk image files, and the raw devices themselves. I need the ability …

Member Avatar for woooee
0
284
Member Avatar for noamjob

I'm trying to get the content of a web page that is written in pdf format. The following code worked very well for me when I tried to read a regular web page, but it prints all kinds of weird letters when I try it on a pdf page like …

Member Avatar for Stefano Mtangoo
0
6K
Member Avatar for Stefano Mtangoo

Hello colleagues, I wan't to upgrade to python 2.5.4 from 2.5.2 but I don't want to lose my modules. Is it possible to upgrade without removing those modules? Thanks

Member Avatar for Stefano Mtangoo
0
88
Member Avatar for Gribouillis

In python, a "function object", that is to say an object which can be called as a function, is simply an instance of a class which has a [icode]__call__[/icode] method. An example is [code=python] class FuncObj(object): def __call__(self, *args): print("args were %s." % str(args)) func = FuncObj() func(1,2,3) # output …

Member Avatar for Gribouillis
0
178
Member Avatar for revenge2

This is my first official python program/scrip which I've done my self;) yay!:D. Im sure most of you guys know the 21 card trick where you guess what card a person is thinking of accurately. anyway, I have trouble passing information between modules within modules and functions within functions. this …

Member Avatar for Murtan
0
324
Member Avatar for bhanu1225

Hello friends. This is Bhanu from [COLOR="Red"][B]INDIA[/B][/COLOR]. I am working in a software company. Here, we are working on [COLOR="Red"]Macintosh Operating Systems[/COLOR]. It is very new to us. And we would like to work on [COLOR="Red"]Python Language for our Project with back end as MySql.[/COLOR] We referred so many tutorials …

Member Avatar for Stefano Mtangoo
0
81
Member Avatar for surealis

I am completely new user of Python and I am supposed to develop a GUI for an old Fotran program. In this I would like to use what I think is called "tabs" although I would prefer to call them "folders" to avoid mixing with the TAB character. What I …

Member Avatar for Stefano Mtangoo
0
262
Member Avatar for tutti

hi i have made a blackjack code and need a some help on it. it seems to work overall but there are a few bits here and there that need sorting out, and im kinda stuck on it so was wondering if i could get some help? (Would be HUGELY …

Member Avatar for Murtan
0
73
Member Avatar for marcux

Hi all! I have started using pydoc and can not figure it all out... I have made packages in a structure like: pkg1 -__init__.py -pkg2 --__init__.py --module1 --module2 (supposed to look like a dir structure, hope you see what I mean) If my working dir is dir that contains pkg1 …

Member Avatar for Gribouillis
0
2K
Member Avatar for Luckymeera

hi everyone i would be thankful if anyone could post a simple example where you continuously create a new oval after a random period of time( e.g A new moving oval is created after every 10 -15 seconds), and is destroyed when it reaches a particular X or Y coordinate. …

Member Avatar for Stefano Mtangoo
0
46
Member Avatar for Stefano Mtangoo

I found on net this: "Mixins are classes that further enhance the functionality of a wx.ListCtrl. Mixin classes are so called helper classes. They are located in wx.lib.mixins.listctrl module. In order to use them, the programmer has to inherit from these classes. " Please someone explain me the way this …

Member Avatar for Stefano Mtangoo
0
93
Member Avatar for winrawr
Member Avatar for Luckymeera

Hello everyone, I've been learning python since the past few days. I have tried several ways but nothing seems to work!! All I want to do is, randomly generate some moving ovals after some regular or irregular interval of time. I have tried canvas.after but it didn’t worked. The ovals …

Member Avatar for Luckymeera
0
110
Member Avatar for acoxia

Hello i just started learning about python and am beginning a hangman program. I'm trying to read the word from the document then output _ for each letter in it. so far it runs but outputs nothing I'm not sure if I'm formatting it incorrectly or am forgetting something any …

Member Avatar for ashutosa
0
169
Member Avatar for revenge2

hello there, well im back;) with a few more questions that i would like clarification with. I have completed up to data structures in python and my next topic is 'object oriented programming':| . Just wanted to clear up some things first:) [CODE]guess=int (input ('enter a number:')) [/CODE] Q1. in …

Member Avatar for mn_kthompson
0
357

The End.