473,811 Members | 3,467 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.
3
19,627
thread by: rodrigo | last post Oct 15 '07 by: Ryan Ginstrom
I am trying to retrieve a password protected page using: get = urllib.urlopen('http://password.protected.url"').read() While doing this interactively, I'm asked for the username, then the password at the terminal. Is there any way to do this non-interactively? To hardcode the user/ pass into the script so I can get the page...
6
2,381
thread by: Juha S. | last post Oct 15 '07 by: Juha S.
Hi, I'm writing a small text editor type application with Python 2.5 and Tkinter. I'm using the Tk text widget for input and output, and the problem is that when I try to save its contents to a .txt file, any Scandinavian letters such as "äöå ÄÖÅ" are saved incorrectly and show up as a mess when I open the .txt file in Windows Notepad. ...
3
2,374
thread by: James Abley | last post Oct 15 '07 by: =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Hi, I'm trying to understand how CPython implements unicodedata, with a view to providing an implementation for Jython. This is a background, low priority thing for me, since I last posted to this list about it in February! Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) on linux2 Type "help", "copyright", "credits" or "license" for...
0
2,291
thread by: Carlos Leite | last post Oct 15 '07 by: Carlos Leite
Is there any other option to analyze audio frequencies? Or Any here try to use pymedia to a simple audio FingerPrint. A cant understand what the information the asBands() really giveme. The Docs, say that asBands() return a List of tupples grouped by frquenciy, and the first two values are frquency limits. But I dont thonk so ! Its...
3
1,375
thread by: Wildemar Wildenburger | last post Oct 15 '07 by: rasmus
Hello there, I'm exploring possibilities of using python as an alternative to Matlab. The obvious way to go seems to be matplotlib for plotting, but I do like GLE <URL:http://glx.sourceforge.net/a lot. One reason is that with GLE you can also do diagrams, that is, descriptive pictures (like...
3
25,741
thread by: nemooo | last post Oct 15 '07 by: bartonc
Hi...This is my first post....I am a newbie to python programming and I have started a program that uses file handling....My problem is that despite the fact that other programming languages (pascal lets say) has an EOF command python doesnt... My code is something like that: for i in range (99): # this is just an example...
5
2,683
thread by: Rafael Marin Perez | last post Oct 14 '07 by:
Hello I'm Rafael Marin, and work as reseacher in University of Murcia (Spain). I want to install and compile modules of python2.4 in a ARMv5b architecture. Any idea? Thank for your time.
0
1,121
thread by: Tagrislam | last post Oct 14 '07 by: Tagrislam
Hi Hi Hi my name is tagreed , I am from Syria I've seen many places of the world on TV screen and few that I've visited either for fun or/ and business as you know when we travel we meet a lot different cultures and people. I found in many places I've been to ; that people stereotyped Islam (that's my religion ) they prejudge Muslims from...
1
5,186
thread by: jerome quaglia | last post Oct 14 '07 by: bartonc
i work with python25,mysqldb25,pygtk25 ,with vista os when i compile my setup.py with py2exe appears modules gdk,ltihooks,gobject.timeout_add] missing and my executable did not work please help me give me the gobject and gdk module if you work with debian you can have them address:
1
1,820
thread by: annguyen | last post Oct 14 '07 by: oler1s
Hi! I'm looking for the python coded to login to the Yahoo page by Post query. So are there any example code? Thanks,
7
1,526
thread by: tudtu25 | last post Oct 14 '07 by: bartonc
Why python go down but Ruby move up 27 => 10 http://tudtu25.exteen.com/images/stat.jpg fromhttp://www.tiobe.com/tpci.htm
2
1,213
thread by: Steven D'Aprano | last post Oct 14 '07 by: Paul Hankin
I have found myself writing functions rather like these: def openfile(filename): if filename == '-': # convention for shell scripts in Unix-land is to use # '-' for stdin/stdout for reading/writing. outfile = sys.stdout if filename == '2-': outfile = sys.stderr else:
2
1,286
thread by: diwakar09 | last post Oct 14 '07 by: diwakar09
hi, could you please help me in passing object to memcache set() function actuallly i want to pass my class object as a key to memcache set(key,value) function, i have tried str() function but i doesn't work if you can provide a sample code that will be good for me i am using python 2.5 on my ubuntu machine.
3
2,947
thread by: jergosh | last post Oct 14 '07 by: jergosh
Is it possible to display notifications (like those displayed by IM clients when someone's status changes/a message arrives) using wxPython? I tried googling/browsing documentation to find if there's a way but no avail. TIA, Greg.
5
1,281
thread by: Traclo | last post Oct 14 '07 by: Traclo
I wrote this function for my introductory programming class in university. It is used to verify that an ISBN is valid. It does this by checking the calculated checksum of the number to the last digit of the number. It is supposed to do this for an entire txt file. def verify_isbn_file(): file_name = pick_a_file() input_file =...
1
1,141
thread by: shanazzle | last post Oct 14 '07 by: bartonc
how do you make a program with ranges? for example if i wanted to make a program classifying dogs, where the user enters variables, maybe height and weight for example, and i had where, between 42 - 65 cm is bulldog 30 - 40 cm is terrier 50 - 67 cm is labrador and between 24.3 - 46.7 kg is bulldog ...
3
2,337
thread by: mandrews58 | last post Oct 14 '07 by: mandrews58
Hi there, I have a script which walks a directory and calculates the md5 digest on a bunch of large files (~1G). The first file found works fine, but the second generates a MemoryError: Traceback (most recent call last): File "t2.py", line 70, in <module> walk_dirs(sys.argv) File "t2.py", line 53, in walk_dirs actual =...
1
2,007
thread by: Traclo | last post Oct 14 '07 by: ilikepython
I am doing a computer science project and I have to take a string that contains numbers, double each number individually and then return the doubled integers as one large string. I tried this code: def double_my_digits(str): new_digits = for c in str: b = int(c) a = b*2 x = str(a)
1
2,097
thread by: PythonNotSoGuru | last post Oct 14 '07 by: ilikepython
Hi everyone i was just wondering if there is anyway to have python check for a specific word or phrase in a raw input value. If you could please provide a small example code chunk to help me along that would be great. I have no idea how this would be attempted so any suggestions would be terrific. code (Python) platform windows os windows XP...
14
1,440
thread by: Stodge | last post Oct 14 '07 by: Stodge
I'm trying to do the following. I have a Python application that is run: python app1.py --location=c:\test1 What I want to do is save the location parameter, so I can then do (in the same window): python app2.py
20
2,345
thread by: Artur Siekielski | last post Oct 13 '07 by: Bruno Desthuilliers
Hi. I would like to have declarative properties in Python, ie. something like slots definitions in defclass in Common Lisp. It seems that even Java will have it, using a library ( https://bean-properties.dev.java.net/ ). I know about 'property' function in Python, but it's normal usage isn't declarative, because I have to code...
0
1,085
thread by: noroi | last post Oct 13 '07 by: noroi
Hi all, I got some problems while running the FM receiver's example codes from the GNURadio tutorial page; the RF front end is set to call the signal input from daughter board, and when the compiler tried to call mothods to set some parameter values(such as gain, set_AGC() and If frequency, get_output_freq() ), it seems not able to find...
3
1,658
thread by: Anurag | last post Oct 13 '07 by: Scott David Daniels
Hi, I am trying to use tarfile module to list contents of a 'gz' file but it seems to hang for large files and CPU usage goes 100%. though 'tar -tvf' on same file list contents in couple of secs. Here is a test script which can show the problem; I am using python Python 2.4.3 ------------
1
3,019
thread by: hainguyen2x | last post Oct 13 '07 by: Roger Upole
I'm trying to get a notification from the NT event for any new event using the DispatchWithEvents() function. Everything seems to be working the way I wanted, but I don't know how to get the properties of the event (ie. event type, message, etc.) from the OnObjectReady() callback. class SinkClass(object): def OnObjectReady(self, *args):...
6
4,207
thread by: 7stud | last post Oct 13 '07 by: MRAB
s = 'A\xcc\x88' #capital A with umlaut print s #displays capital A with umlaut s = raw_input('Enter: ') #A\xcc\x88 print s #displays A\xcc\x88 print len(input) #9 It looks like every character of the string I enter in utf-8 is being

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.