15,181 Topics
| |
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 | |
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 … | |
Hi i am a php programmer. Kindly let me know a good book for begin python from its basic ??? Thanks | |
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 … | |
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, … | |
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() … | |
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 | |
What part of the HTTP header is always provided as part of the response of a CGI program? thanks guyss | |
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 … | |
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... | |
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 | |
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 … | |
| 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 |
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() … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
so, what is python and what is good about it? | |
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 … | |
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 … | |
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 … |
The End.