473,772 Members | 3,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
2
3,422
thread by: devnew | last post Nov 4 '07 by: devnew
hi i am looking for some info about mapping btw values in an array and corresponding columns of a matrix i have an numpy array= and a numpy matrix object= matrix((, , , ))
1
1,445
thread by: tech user | last post Nov 4 '07 by: Marc 'BlackJack' Rintsch
Hello, I have a file which is large about 3.5G. I need to modify some lines in it,but I don't like to create another file for the result. How can i do it? thanks.
18
2,495
thread by: Tommy Nordgren | last post Nov 4 '07 by: Bruno Desthuilliers
Given the following: def outer(arg) avar = '' def inner1(arg2) # How can I set 'avar' here ? ------------------------------------- This sig is dedicated to the advancement of Nuclear Power Tommy Nordgren tommy.nordgren@comhem.se
1
1,184
thread by: Timmy | last post Nov 4 '07 by: Diez B. Roggisch
Hi, I has a question about exception in python. I know that an exception can be re-raised. Is there any simple way provided by python itself that I can know the current exception is just firstly occurred or it is re-raised by previous exception? I need to know whether the exception is firstly occurred or not because I want to just display an...
2
3,159
thread by: lgwe | last post Nov 4 '07 by: Mark T
I want to receive 200 udp datagrams. Each into a new data string. But I dont know how to do that, this is wrong: import socket s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind(("",port)) i = 0 while i<200: data,addr = s.recvfrom(1024) i = +1
1
1,076
thread by: analfabete | last post Nov 3 '07 by: bartonc
Hi everybody ! Currently i have a problem about 10 code lines on my mass mailling script min_id = 0 max_id = 99 while max_iduser >= min_id: recup_mail(min_id ,max_id)
0
1,447
bartonc
thread by: bartonc | last post Nov 3 '07 by: bartonc
I'm working on a scheme which reduces the interface between classed to a single method and a list messages that the co-operative class knows. I invite all comments and/or critiques/improvements: We could even turn this into an article!class AnyClass(object): """Demonstrate massage passing: This is the subordinate class.""" def...
0
1,140
thread by: p.lavarre | last post Nov 3 '07 by: p.lavarre
http://wiki.python.org/moin/glob now mentions: The glob module lists names in folders that match Unix shell patterns. If the elemental function emulating Unix bash `echo *` really is missing from the 2.5 Python batteries included, then here's a brief clear way of adding that function to Python. Mind you, to date I've never written an...
0
901
thread by: Joseph King | last post Nov 3 '07 by: Joseph King
Hey i am trying to build a puzzle (jigsaw) game. I have most of the code for it written in python. But having an issue with one part. What i want is to give the player the ability to import there own picture and create a jigsaw from the picture with there own designation of the piece size and shape. I am having difficulty with one part of...
2
5,671
thread by: Jim Hendricks | last post Nov 3 '07 by: Tal Einat
New to Python, and just had something strange happen. I've been running my new code in IDLE running in windows. My IDLE version shows as 1.2.1, Python version displaying in IDLE is 2.5.1. I have been editing my code in UltraEdit then testing in IDLE by choosing open, then F5. I didn't see an easy way to refresh in IDLE, so each edit...
5
6,544
thread by: Michael | last post Nov 3 '07 by: Bjoern Schliessmann
I'm trying to build a exe on a vista system using py2exe. It will deploy to vista and XP systems. If it matters, the application uses pyserial, as well. I have VS Studio 2005 installed on this laptop as well. I've found this so far that seems to be identical to what I'm seeing (for non-python programs):...
1
1,106
thread by: jmborr | last post Nov 3 '07 by: Stargaming
I need something like this: 1: superfoo( non-keyword-args, keyword-args, methodname, *kargs, *kwargs): 2: """non-keyword-args and keyword-args are arguments that 3: apply to superfoo, while *kargs and **kwargs are arguments 4: that apply to methodname. See below""" 5: object=someClass() 6: ...
1
1,192
thread by: Scott Dial | last post Nov 3 '07 by: Steven D'Aprano
I have started working on a new project using ZSI and perhaps one can argue this is a bug in ZSI, but I found it odd. The ZSI dispatcher needs to catch all exceptions and pass that over to the client; in doing so, it passes along the name of the exception that occurred so that the client can know more than just "it failed." Anyways, I am...
20
1,937
thread by: gert | last post Nov 3 '07 by: Gabriel Genellina
class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test()
4
6,996
thread by: Giampaolo Rodola' | last post Nov 3 '07 by: Gabriel Genellina
I was reading os.readlink doc which says: readlink( path) Return a string representing the path to which the symbolic link points. The result may be either an absolute or relative pathname; if it is relative, it may be converted to an absolute pathname using os.path.join(os.path.dirname(path), result). Availability: Macintosh, Unix.
9
5,502
thread by: cgrebeld | last post Nov 3 '07 by: cgrebeld
Is it possible for a Qt C++ application, which embeds the python interpreter, to import and use PyQt? There can be only one QApplication, which is created in the C++ side, so how would I use that from the python side?
5
7,101
thread by: PythonNotSoGuru | last post Nov 3 '07 by: bartonc
Could you pls explain how to get this to run without subprocesses mouse click by mouse click because im still not able to find idle help. Thanx
2
1,120
thread by: Chris Mellon | last post Nov 3 '07 by: Steven D'Aprano
>>def test_func(): .... pass .... <function test_func2 at 0x01B8C2F0> <function test_func at 0x01B8C270> Why almost twice the calling overhead for a dynamic function?
5
8,846
thread by: fahadqureshi | last post Nov 2 '07 by: bvdet
i have a csv file that has a number in one column and a corresponding number in the second column. i am trying to store both of these numbers in an array. i have done this before with an excel file but how would i go about doing this with a csv file since the command xlsht wont work in csv. here is my code so far to print everything but how do i...
1
1,297
thread by: GNemi | last post Nov 2 '07 by: GNemi
im trying to post to a form that doesnt have a form name <input type="image" value="go"> i've been using urllib but have only seen methods of posting with a form name
7
3,210
thread by: terryscott | last post Nov 2 '07 by: terryscott
Every time I enter Python it resets the monitor resolution to 640 x 480. I am not setting the monitor resolution anywhere. I am currently running Python 2.5 on a Windows XP computer. Any info will help. Terry
22
1,958
thread by: Abandoned | last post Nov 2 '07 by: Roberto Bonvallet
Hi.. I want to do this: for examle: 12332321 ==12.332.321 How can i do?
1
1,437
thread by: david.katkowski | last post Nov 2 '07 by: Steven D'Aprano
I'm trying to use the __builtin__ filter function within a class; however, I receive the following error: NameError: global name 'MajEthnic' is not defined The line of code is: EthMaj = filter(self.MajEthnic,flist) So, I'm trying to use the MajEthnic function to filter the list flist. Any ideas?
1
4,354
thread by: Prof Rodney Coates | last post Nov 2 '07 by: bartonc
Although I have been using Macs for a quarter of a century and was doing scientific programming in the '60's I am VERY new to Python on the Mac. I have been writing some very simple applications and running them using IDLE. To start with the applications worked OK. However, as time has progressed, the error message "ImportError: No module named...
11
45,248
thread by: wxy212 | last post Nov 2 '07 by: Smygis
i know that in python, os.system(cmd) can be used to execute a script or command, and the return value is 0 if successful, rather than the standard output of the script that it executes. e.g. >>> a=os.system("echo hello") >>> a 0 (rather than "hello") my question is how to direct the standard output into a variable in my python script.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.