15,406 Topics

Member Avatar for
Member Avatar for EriCartman13

Ok I am confused. I just started python and when I save my program that I edited in the IDE editor as for example helloworld.py I cannot run it when I click it. All it does it come up with a black box, like cmd, and dissappears. Also do you …

Member Avatar for EriCartman13
0
208
Member Avatar for Confucius

Im sort of new to python, and I have been looking at some tutorials, manuals, etc. and I saw how to find prime numbers, so I thought it would be a good place to start, so I added some stuff to hopefully allow for user input, and it doesnt work. …

Member Avatar for Ene Uran
0
310
Member Avatar for Jessehk

Hello all. I was just browing some websites and thought I'd join. I program as a hobby (Some C, intermediate C++, and I'm improving my Python and Ruby), and I'm sure I'll be asking more questions then I will be answering. :D This website looks great (very "Web 2.0"-ish), and …

0
107
Member Avatar for swapnamishra

How can we execute the commands on one file in a such a way that the results will get saved in another file? Do we have any such built in method which we can use?

Member Avatar for pythonguy
0
122
Member Avatar for pythonguy

I am using automnation desk to run my python scripts. It supports interpreter ver 2.2 I have some script common for almost all other script files of my application. this common script is saved as CommonCalls.py and is on python search path. I am using some ref. to a file …

Member Avatar for pythonguy
0
139
Member Avatar for Dark_Omen

Okay I am new to PHP, well getting it to run. The programming part is fine, it is very similar to python, ruby, etc... so no trouble there. So here is my problem. I made a class, and all it has is a function that writes test to the browser …

Member Avatar for tgreer
0
317
Member Avatar for Avner .H.

hello everybody, I've started to learn pyGTK and glade for a program i'm doing, and i've run into some problems: 1. Is there no way to change the size of a specific text when using glade? for example, a window title, a label text etc. 2. In the Gnome widgets, …

Member Avatar for JoeM
0
180
Member Avatar for G.Host

Hello to all of you. My name is Greg. I am currently running Mac OS X ( my homeschooling computer). Anyways, I'm having trouble downloading Python to my Mac. Every python file I've downloaded and decompressed with StuffIt Expander, just seems to be nothing but files that I don't know …

Member Avatar for G.Host
0
158
Member Avatar for JoeM

Hello!! I'm really new to python and pygtk and Glade, I'm sorry I'm still on the dark side using Windows 2000 :-( What I'm trying to do is a simple Testing Program Simulator, that means that I will press a button and then I'm supposed to show a cross or …

Member Avatar for vegaseat
0
305
Member Avatar for G.Host

Hi all! My name is Greg H. I live in Ohio, U.S.A. I'm sorta new to programming. I had python before on my Windows PC but now that I'm on Mac I haven't been programming lately. I love my computer, football, young women, and my computer. I'm looking foward to …

0
29
Member Avatar for swapnamishra

Hi, I need to test soem DCOM APIs using python script. I just wanted to know how to go about it? What all s/w would I need to do this testing? And do I need to install visual studio on my machine to check the dcom APIs?

0
104
Member Avatar for bucodi

Hi, I would like to configure my wxcombox in a way that when it gets the focus, it automaticly opens his listpart. Any ideas ? tia Rony

Member Avatar for bucodi
0
120
Member Avatar for swapnamishra

Hi, I have a file named demo.py.The contents of the file are: [code] class a: name="swapna" def show(self): print a.name s=a() s.show() [/code] When I execute the file it gives me the following error: "<bound method a.show of <__main__.a instance at 0x009D58C8>>" Kindly advice on how to proceed with it.

Member Avatar for bumsfeld
0
151
Member Avatar for butterflyTee

THIS WINDCHILL TABLE PROGRAM IS RUNNING, BUT THE NUMBERS IS STILL NOT LINING UP STRAIGHT..WHY, CAN YOU PLEASE HELP ME..THANKS HERE IS THE PROGRAM BEFORE I RUN IT.. [CODE]def windchill( vel, temp): wc = 35.74 + .6215*temp - 35.75*(vel**.16) + .4275*temp*(vel**.16) return wc def main(): print (" __ __ __ …

Member Avatar for bucodi
0
2K
Member Avatar for swapnamishra

Hi, I am a software professional .I am learning python to use it for the purpose of testing in my work.

Member Avatar for BeastOverlordH6
0
46
Member Avatar for bhupendra

Hi all, How to create a model less dialog box using python 2.3 tkinter? Thanks in advance, Bhupendra

Member Avatar for bhupendra
0
178
Member Avatar for Blujacker

How can i do full screen? How can i get size of monitor? Is that possible? Thanks

Member Avatar for bumsfeld
0
114
Member Avatar for butterflyTee

# sum.py # tpm # A program that accepts an indeterminate (any number) of integers entered by # the user, calculates and their sum, using loop [CODE]from math import * def calc_sum(): n = input("Enter any number: ") sum = 0.0 for i in range(n): x = input("Enter a number …

Member Avatar for bumsfeld
0
130
Member Avatar for butterflyTee

# class.py # tpm # A program to calculate the volume and surface area of a sphere from its # radius given as input. [CODE]from math import * class Sphere: def _init_(self, radius): self.radius = radius def getRadius(self): return self.radius def surfaceArea(self): self.area = 4.0 * pi * self.radius ** …

Member Avatar for butterflyTee
0
132
Member Avatar for sharma_vivek82

[code]import posix import string uid = `posix.getuid()` passwd = open('/etc/passwd') for line in passwd.readlines(): rec = string.splitfields(line, ':') if rec[2] == uid: print 'hello', rec[0], print 'mind if we call you bruce?' break else: print "I can't find you in /etc/passwd" :) [/code]

Member Avatar for alc6379
0
165
Member Avatar for butterflyTee

THE WINDCHILL TABLE IS RUNNING, BUT THE NUMBER IS NOT LINNING UP STRAIGHT. CAN YOU PLEASE HELP ME, THANKS [CODE]def windchill( vel, temp): wc = 35.74 + .6215*temp - 35.75*(vel**.16) + .4275*temp*(vel**.16) return wc def main(): print (" __ __ __ Temperature \n") print ("Speed \n") print (" 1 -20 …

Member Avatar for greatbear
0
105
Member Avatar for greatbear

At the beginning I found Python was very good at its data structures , concise code, and some strong aspects ! but it's very difficult to solve a program with higher speed than C++ and java ! I'm very confused ! could you tell me why do you choose Python …

Member Avatar for greatbear
0
98
Member Avatar for pare80

Hello to all, I am trying to create a script that will go through certain directorys in Windows and pull out the files I stated by extentions. Which will then later copy to a location either on the local machine or an external HD. Any assistence will be greatly appricated. …

Member Avatar for sharma_vivek82
0
111
Member Avatar for sharma_vivek82

import urllib f = urllib.urlopen("http://www.mahiti.in") word = "Software" for line in f: if word in line: print line :cheesy:

Member Avatar for vegaseat
0
92
Member Avatar for gYbU

I alredy know hoe to send e-mail by python but is possible to receive e-mail?? thanks for all post

Member Avatar for vegaseat
0
598
Member Avatar for Blujacker

I am using script from coed snipet how to print a page, but i dont know way how to say to printer which font and which size of font set, which colour of background and foreground.Please help Thanks

Member Avatar for vegaseat
0
99
Member Avatar for butterflyTee

[code] # windchill.py # tpm # A program that prints a nicely formatted table of windchill values. from math import * def windchill(t, v): c = 35.74 + (0.6215 * t) - (35.75 * v ** .16) + (.4275 * t * v ** .16) return c def main(): print …

Member Avatar for alc6379
0
503
Member Avatar for butterflyTee

def windchill(temp, vel): wc = 35.74 + .6215*temp - (35.75*vel**.16 + .4275*temp*vel**.16) return wc def main(): print (" __ __ __Temp /n") print (" Speed /n") print ("-20 70 10 0 10 20 30 40 50 60 ") for x in range (5,55,5): print x for y in range (-20,70,10): …

Member Avatar for bumsfeld
0
92
Member Avatar for butterflyTee

I WRITTEN THIS PROGRAMM IN 2 WAYS(RE-WROTE IT OVER AND OVER), AND ITS STILL NOT RUNNING CORRECTLY. IS THERE OTHER WAYS THAT IS PROGRAM CAN BE WRITTEN. I AM SO FRUSTRATED, PLEASE HELP ME. THANK YOU. 1st way: # windchill.py # tpm # A program that prints a nicely formatted …

0
69
Member Avatar for Subterraneus

I've been working on an irc bot in python using the IRCLib module, but when it came to making it give users operatership I have no idea how... everything I've tried has failed. if any of you has experiance with the IRCLib module I'd greatly appreciate the help.

0
72
Member Avatar for Ene Uran

I am fairly familiar with C, but new to Python. Does Python have something like the handy C conditional expression? For example: [code]// C conditional expression x = a ? b : c; // if a is true then x = b else x = c // here used to …

Member Avatar for Ene Uran
0
118
Member Avatar for butterflyTee

[CODE]# tpm.py # Take two inputs, age and years of citizenship, and returns eligibility for # senator and representative. from graphics import * def main(): win = GraphWin('Eligibility' , 400,400) win.setCoords(0.0,0.0, 4.0, 4.0) Text(Point(1, 3.0), 'Age').draw(win) Text(Point(1, 2.0), 'Years Citizen').draw(win) agebox = Entry(Point(2, 3.0), 10) agebox.draw(win) citizenshipbox = Entry(Point(2, 2.0), …

Member Avatar for butterflyTee
0
115
Member Avatar for johnhl007

Ok i am having a little trouble trying to figure out how to pull the x-cordinate from p1 and p2 so that i can use it later in the code to build a door. # This is a program to build a house in five clicks from graphics import * …

Member Avatar for Scagli3tti
0
470
Member Avatar for butterflyTee

# tpm.py # A program that accepts the total amount of purchase, calculates the # appropriate discount, and displays the discount and the purchase after # discount. from math import * def main(): cost = get_cost() discount = get_discount() % = calc_percent(discount) final cost = get_final_cost cost_percent = cost_discount(cost, discount) …

Member Avatar for butterflyTee
0
111
Member Avatar for a1eio

Hi, I've got a small program, that would be really useful if it could stay on top of other windows programs, i don't think there is a method for that in Tkinter, if anyone has any experience or ideas on this topic, please let me know thanks

Member Avatar for a1eio
0
22K
Member Avatar for thare

I've heard the word "Literal" many times in Python But I don't understand it ! what does this mean ? Thanks ! :rolleyes:

Member Avatar for vegaseat
0
117
Member Avatar for bumsfeld

I need to know how many times my function has been accessed in my program. Any suggestions other than global variable?

Member Avatar for vegaseat
0
3K
Member Avatar for G-Do

Hi all, I'm writing a simple MIDI player (which I might eventually turn into a editor, if I feel ambitious). To that end, I've been futzing around with the pygame.mixer and pygame.mixer.music modules. I can get MIDI files to play, but I would also like to be able to grab …

Member Avatar for G-Do
0
288
Member Avatar for butterflyTee

Did I do this right and can you please help me. This program uses a GUI to input a user's first and last name, and construct and display a UserID. Although the program 'runs', there are several problems with it. Fix each of these problems in turn: 1) The text …

Member Avatar for mechdriver
0
173
Member Avatar for delizeka

Hi, While I was searching for a problem while implementing classes in Vbscript I found here. After a quick look in other forum topics, now I am here to introduce myself. I am a web programmer, coding at least for 4 years. I have some experience in ASP, ASP.NET, PHP, …

Member Avatar for Dani
0
34
Member Avatar for python_dev

Hi, i have a program where i use a while loop to create buttons dynamically. Each button is created with, for a label, the name of one the drives on the machine(using the result of the fsutils command). Up to this point everything works fine, if i have drive C: …

Member Avatar for python_dev
0
171
Member Avatar for butterflyTee

# tpm.py Computes the cost per square inch of pizza given cost of the pizza, # and diameter. from math import * def main(): cost_per_square_inch(area_of_pizza()) def area_of_pizza(): diameter = input("Enter the diameter of the pizza: ") radius = 1.0/2.0 * diameter a = pi * radius * radius return a …

Member Avatar for Ene Uran
0
140
Member Avatar for jaafit

Does anyone know how to remove a window's border and title bar in wxPython? I want the client area to fill the entire screen. I have a wxPanel defined as follows: class FlashPanel(wxPanel): *def __init__(self, parent, flashFile): **wxPanel.__init__(self, parent, -1) **sizer = wxBoxSizer(wxVERTICAL) **ActiveXWrapper = MakeActiveXClass(flashControl.ShockwaveFlash) **self.Flash = ActiveXWrapper( self, …

Member Avatar for jaafit
0
1K
Member Avatar for jread

I am trying to create what should be a very simple script, though I'm having a very difficult time getting it to work. All I want to do is create a new copy of a master file once per week and do my work on the copy. I plan to …

Member Avatar for jread
0
256
Member Avatar for njzillest

I started C++ a few weeks ago.. I want to go to MIT for computer science, and for that i want to learn a few computer languages. Im 15 in 9th grade. I know how to make loops and random numbers. I am about to go into arrays and pointers …

Member Avatar for Rashakil Fol
0
99
Member Avatar for Ene Uran

Python uses the directories listed in PYTHONPATH to find a module. How can I assure that the module I am importing is on this list of paths?

Member Avatar for vegaseat
0
176
Member Avatar for Ene Uran

I keep hearing that the eval() function is unsafe. It is a nice function, because you can use it like print eval("2.5*49.7/(23+3.14)") and it will solve the math. Is there any way to protect against some nasty minded person to enter a "os.system(command)" where the command will erase a file …

Member Avatar for Ene Uran
0
104
Member Avatar for Micko

Hello people of Python community, I'm back with (so far) strong will to learn Python, just like you. I remember once, Narue told me that good way to learn different prog. languages is to concetrate on algorithms and data structures and their implementation in language of choice. That way, she …

Member Avatar for Ene Uran
0
543
Member Avatar for JoshBebbington

I have been looking over Vegaseat's Word Count program. I have two thoughts about what I want to configure it to do, but I'm not sure how to go about it. Idea 1; This is most important. I want users to be able to put a text file in the …

Member Avatar for a1eio
0
128
Member Avatar for shafter111

Hi! Thanks for your help in advance..... Heres my case I have a dictionary "d" with keys as string and a dictionary as integer "1" as keys to a list [1,2,3] [code] d{"test.tif": {1: [1,2,3]}} [/code] Now when I try looping through it........it gives me an error [code] for i …

Member Avatar for shafter111
0
145

The End.