15,194 Topics

Member Avatar for
Member Avatar for bsod1

I'm writing some basic programs on python and I need an IDE with advanced code completion(like bpython). I've tried eric, eclipse, IDLE but those are not good at code completion, I need something like bpython(if you don't know, just try, it's great at code completion and hints)

Member Avatar for AutoPython
-1
91
Member Avatar for leegeorg07

Hi again, I'm now working on a twitter client and I'm wondering how people update their programs when it needs it, for example when I commit a change. Any help on the subject would be most appreciated thanks

Member Avatar for Stefano Mtangoo
0
199
Member Avatar for MRWIGGLES

if i had a data file with html/xhtml tags: Code: <html> <head> <title> data file </title> </head> <body> <center><h1> heading 1 </h1></center> <b>bolded</b> <P>paragraph</P> <P> <br /> how would get a python program to read ONLY the start and end tags and and enqueue them in a queue? for example, …

Member Avatar for vegaseat
0
214
Member Avatar for P00dle

I have to read through a text file and replace all occurences of [CODE]%%CNT1%%[/CODE] with the value of a counter. The part of my code that does the actuall replacements looks like this: [CODE]for i in range(1, (count1 + 1)): out.writelines(re.sub("%%CNT1%%", str(i), text))[/CODE] This works fine. Now what I need …

Member Avatar for P00dle
0
65
Member Avatar for El Duke

Hello all, I have been developing a code based on Google Translate Python Wrapper. I have done it all, perfectly, except for one thing, I will explain it by pointing to code: there is the defined global languages list, and there are two main functions (Translate(), and UserSubmitted() ) now …

Member Avatar for El Duke
0
129
Member Avatar for awn

Hi, I'm writing an application in python to read data from a joystick and display it onto a screen with a background image overlay. i used the canvas widget to display the data to my screen. The problem is, the text keeps updating the entries without clearing the previous entry …

Member Avatar for awn
0
798
Member Avatar for Archenemie

28 Minutes Ago | Add Reputation Comment | Flag Bad Post One last problem with my script, it returns this error message... [CODE]Traceback (most recent call last): File "C:/Python26/Renamer 3", line 23, in <module> os.rename(fname, b)WindowsError: [Error 2] The system cannot find the file specified.Traceback (most recent call last): File …

Member Avatar for Archenemie
0
217
Member Avatar for persianprez

I cannot find one example of somebody doing this, only sorting by the first item. Here is my code: [CODE] dict.sort() for key in dict.keys(): print key, "%8s"% dict[key] [/CODE] I'm only getting an alphabetical sorting of the left side of the dictionary.. like this: a:4 c:3 b:12 a 4 …

Member Avatar for persianprez
0
250
Member Avatar for lewashby

Does anyone know how to get Wing IDE to work with iron python? But I would also like to keep quick access with WING IDE to my standard python as well. Thanks.

Member Avatar for Stefano Mtangoo
0
35
Member Avatar for sneek

Hi, the Python/C-API says that we allways have to return owned references. Example: [CODE] // C-Code static PyObject * f (PyObject *self, PyObject *args) { PyObject * rtn = NULL; PyArg_ParseTuple(args, "s", &rtn); Py_INCREF(rtn); return rtn; } [/CODE] [CODE] #Python-Code a=myType() b=a.f("hello world") a.f("hello world") [/CODE] I understand the first …

Member Avatar for sneek
0
79
Member Avatar for vegaseat

This code snippet shows you how to sort more complicated objects like a list of lists (or tuples) by selecting an index of the item to sort by.

Member Avatar for Ene Uran
2
374
Member Avatar for gangster88

I need the function to display a set of eyes, so if i call the function Eyes(3,4) a graphics window opens with exact dimesions for 4 coloumns and 2 rows of eyes... [code] from graphics import * def drawCircle(win, centre, radius, colour): circle = Circle(centre, radius) circle.setFill(colour) circle.setWidth(2) circle.draw(win) def …

Member Avatar for battlecrab
0
113
Member Avatar for rjmiller

alright, so i'm trying to import text from a file into an array so that I have the ability to edit data, find certain functions, etc. This is currently what my program looks like....(I haven't gotten very far) from scipy import * from numpy import * def Radiograph_data: try: file('c:/users/ross/desktop/radiograph_data.txt') …

Member Avatar for pythopian
0
212
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
104
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
85
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
93
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
197
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
184
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
133
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
378
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
111
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
201
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
128
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
122
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
91
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
166
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
112
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

The End.