15,181 Topics

Member Avatar for
Member Avatar for ffs82defxp

how do I: -change the height and width of the console (cmd.exe) -how do i set the console title -how do i change the console color(s) -how do i open another console program in the same console and go back and forth with this (for example a batch file) Thanks …

Member Avatar for fallopiano
0
102
Member Avatar for ffs82defxp

I know you start an internet browser with: [CODE]import webbrowser webbrowser.open("http://www.google.com/")[/CODE] But how do I specify if I wanted to for example, make it use firefox over the system default (internet explorer)?

Member Avatar for Gribouillis
0
84
Member Avatar for i are smart

Say I have something like: class name: .....def __init__(self,a): ..........self.a = a ..........self.b = [0 for i in range(a) Now lets say I wrote a python program that has a main function that prompts the user for a set of numbers in the range(a). How do I get that set …

Member Avatar for masterofpuppets
0
89
Member Avatar for Archenemie

Just like in the title, instead of renaming the files in the "target folder" it just renames all possible files in the python directory, and im not sure how to fix it, although this is my best attempt. [CODE] #!usr/local/bin/python import re, os from os.path import join as pjoin targetfolder …

Member Avatar for Archenemie
0
195
Member Avatar for Stefano Mtangoo

Hello, is there any other site that is dedicated on python exercises from standard Library to external? I plan to start doing exercise to measure my muscles in python and enrich my understanding! I have seen here some exercises which I'll do them (on stickies) Thanks all Steve

Member Avatar for elasolova
0
181
Member Avatar for ffs82defxp
Member Avatar for mn_kthompson

I have some processes that I need to keep running on a linux host. For some reason the processes are dying (possibly being killed by another admin). I can hunt that down later, right now I need to make sure the processes are running and relaunch them if necessary Launching …

Member Avatar for donaldw
0
131
Member Avatar for python.noob

Hi friends, I've recently changed to ubuntu 9.04.. I've not had any problem with the installation of pyqt as it is available from the ubuntu repositories with umpteen number of packages.. Thanks to ubuntu for making my job easier.. Anyhow i've to download tarball file for python 3.1 and installed …

Member Avatar for woooee
0
375
Member Avatar for jaison2

The function has to show the population for year 1, 2 and so on until the population reaches 1 million. The population increases by 8% every year? [code] def population(): current=input("please enter the current population of the city: ") increase=current/100*8+current year 1=increase while increase>1000000? [/code]

Member Avatar for leegeorg07
0
109
Member Avatar for Yeen

While learning Python I've come across this several times, but I've never been able to get it to work, so I always work around it. No more I say! I'm using 3.1, so I'm assuming that string.split doesn't work in 3.0 and later. Say I want to split [I]"Why does …

Member Avatar for vegaseat
0
3K
Member Avatar for lewashby

In the following program, at what point does my program call the _str__ method/constructor? I don't see it specifically being called at any point. I know it happens with this line print [CODE]"Printing crit1:" print crit1[/CODE] but I still don't see how or when this happens. Thanks for any and …

Member Avatar for mn_kthompson
0
198
Member Avatar for ffs82defxp

What is the command for starting files? Something like this im guessing [CODE] start.file(C:\test.txt)[/CODE]

Member Avatar for vegaseat
0
124
Member Avatar for ffs82defxp

All I need is a frame, and a panel. On the panel I have to display 3 pictures 1 at a time, separated by a pause of custom length. I need the panel to be 773x632 pixels for my png image. What I need is the function for displaying an …

Member Avatar for vegaseat
0
119
Member Avatar for sravan953

Hey All, I am working on a Java project for school. To make my project better, I wanted to integrate Python into it... like what I wanted to do is: [LIST] [*]You run the Python program [*]You get two options: [*] a) View source code [*] b) View output [*](Output …

-1
89
Member Avatar for pyboii

hey ill get straight to the point i need to create a python script to read each record from a .txt file and output each record in the same format to the cmd line, 4 lines including (name,address,ph no and email) 3 records. it needs to utilize the basic logical …

Member Avatar for lllllIllIlllI
0
163
Member Avatar for sravan953

What do you mean by: "but I don't know how to add something to the dictionary while the program is running"?

Member Avatar for mn_kthompson
0
109
Member Avatar for MineSweep

I'm pretty new to python, but I'm trying to create a simplistic version of Mineweeper. I have developed functions that randomly place mines in a 9x9 matrix (nested lists) and then I have functions that assign values to every cell that doesn't contain a mine corresponding to the number of …

Member Avatar for MineSweep
0
7K
Member Avatar for Mona1990

Hey, I was wondering if someone could help to figure out , how to add a value to a key that already exists in the dictionary. where the values of each key are lists. so for example: theIndex = {124:["b","s"], 356:["dg", "n"]} and i want to add the value "m" …

Member Avatar for Mona1990
0
67
Member Avatar for Mona1990

Hi! I was wondering if someone could help with writing the code for the following function. I am having trouble with dictionaries and would greatly appreciate some hints! thanks! Write a function build_car_maker, which consumes a car registry dictionary, and produces a car maker dictionary, leaving the original dictionary unchanged. …

Member Avatar for Mona1990
0
108
Member Avatar for moazmizo

hi, i have to make a simple sudoku solver, i am done 3/4 of it but i'm having a little trouble on somethings, here is what i've got so far [CODE] import copy def display(A): if A: for i in range(9): for j in range(9): if type(A[i][j]) == type([]): print …

Member Avatar for flufflekins
0
110
Member Avatar for nizbit

I need to be able to print at an offset where the second element of the second list matches up with the first element of the first list. For example have a's line up with the b's: [CODE] list = [[a, b, c, d],[a, X, X, b, c, d],[a, X, …

Member Avatar for nizbit
0
238
Member Avatar for gangster88

I need the function to display a square of numbers. This is the actual function. [code] def draw(n): for i in range(n+1): print i*(n) [/code] but if i call the function [code] def drawBlock(3): [/code] then the output should be 333 222 111 but i cant understand how to get …

Member Avatar for vegaseat
0
143
Member Avatar for masterofpuppets

hi everyone, I am trying to design an assembler program with Python using Tkinter and so far it is going pretty good. I just have one question: Is there anyway to change the text color of just a selected text using a text area? What I mean is, you know …

Member Avatar for masterofpuppets
0
5K
Member Avatar for nizbit

I'm trying to print horizontally not having any luck. I need to print I#x where x one through the length of a list i.e.-I#1 I#2 I#3 I#4 etc. This is what I have which is syntactically wrong: [CODE]for x in range(1, len(depend)): print "%05s" ('I#'+str(x))[/CODE] Could someone please point me …

Member Avatar for nizbit
0
151
Member Avatar for lewashby

How do I get my python code to compile one line at a time so I can see exactly how the code works. If anyone knows how to do this with Wing IDE that would also be helpful. Thanks.

Member Avatar for Mathhax0r
0
75
Member Avatar for HiHe

Does anyone use Python on a Windows7 machine? What is your experience? Does it work well? I am thinking about getting a new computer and also start some Python programming.

Member Avatar for mn_kthompson
0
109
Member Avatar for chunalt787

I am just starting with python and I am trying to write a program that interfaces with flickr. I am using the interface flickr.py found at the following link: [url]http://code.google.com/p/flickrpy/[/url] I am calling the following function: [CODE]myPhotos = myPhotoSets[0].getPhotos()[/CODE] The shell is telling me there is an error in this …

Member Avatar for Mathhax0r
0
146
Member Avatar for realmayo

SO I want to make a basic proxy where I want to modify some of the data coming through. I checked out asyncore but that doesnt allow HTTPS and it is pretty complicated, so I just looked at Twisted. My question is since HTTPS is not supported by Twisted, can …

0
58
Member Avatar for gangster88

how could i square the result of function?.. so when i call the functioon [code] def sum(first, last): for i in range(first, last+1): print i return i**2 [/code] it gives the answer as 50, as it should square 3,4 and 5=50

Member Avatar for masterofpuppets
0
126
Member Avatar for gangster88

When the function is called count(3,5) then it should display 3,4 and 5.. but my function only seems to show 3 and 4 and not 5? def count(first,last): for i in range(first, last): print i

Member Avatar for Mathhax0r
0
136

The End.