15,190 Topics

Member Avatar for
Member Avatar for techie1991

I was looking around the time module. The time.sleep(no_of_seconds) sleeps the program for no_of_seconds seconds. I don't think this is busy wait. It must be scheduling the process at a later time. Just curious of how this is working.! :)

Member Avatar for techie1991
0
2K
Member Avatar for HuXiaoxiang

Hi all, Forgive my pool English first... I'm learning Python recently. But I met with a problem yesterday and I have liitle experience in solving this kind of problems. Here are the code in Python Shell: [CODE]>>> "HuXiaoxiang\\0Nanjing University\03 Years.".replace("\0"," ") 'HuXiaoxiang\\0Nanjing University\x03 Years.' >>> "HuXiaoxiang \0Nanjing University\03 years.".replace("\0"," ") …

Member Avatar for HuXiaoxiang
0
250
Member Avatar for Michael_Levin

Hello! Is there any method to find out whose machine is handling the file in the network? Using python :) Especially if you haven't administrator's rights (but this is not very important). I don't want to unlock the file, as many programms like Unlocker suggest, only the machine's name :)

0
43
Member Avatar for jordan0420

I am Currently teaching myself PyObjC through tutorials and then modifying them. Now the time has come to open a second nib (addtv) and i cant for the life of me figure it out. [CODE] @objc.IBAction def open_(self, sender): addtv = AddTvControlleralloc().initWithWindowNibName_('addtv') addtv.showWindow_(self) #addtv.retain() [/CODE] What i am attempting to …

0
75
Member Avatar for TrustyTony

As 3.2 has the input bug maybe it makes sense for going with 3.1.4 (I got my computer full of zombie processes with 3.2.1rc and removed it from my WindowsXP machine) [CODE] Python 3.1.4 released Python 3.1.4 has been released. Published: Sun, 12 June 2011 13:00 -0600 [/CODE] Python 2.7 …

Member Avatar for vegaseat
0
221
Member Avatar for Huakalero

In the line 72 of the code i do a findAll to retrieve all 'a' tags that have a 'horariosCarteleraUnderline' class and that have an href url that contains `?ic=[code]&` where code is a common code used to identifie the movie start time. It should retrieve all movie times, but …

Member Avatar for Huakalero
0
221
Member Avatar for jarograv

I have this code: [CODE] def closest(): citiescomp=[] distances=[] for i in range(0,len(city_names)-1): citiescomp.append([city_names[i], citiesx[i], citiesy[i]]) while True: try: targetx=int(raw_input('Please enter the x coordinate of the city you wish to target: ')) if targetx in range(0,1000): break else: print "Oops, it seems like you made a mistake. Try again by …

Member Avatar for Gribouillis
0
106
Member Avatar for katrien202

Hi, I want to put plots using pyplot in a Tkinter window, a frame. I want to have the options I usually have in pyplot figures: the user has to be able to zoom, save,... so a photo of the image will not satisfy. Does anyone now how to do …

Member Avatar for Ene Uran
0
78
Member Avatar for jeffande1966

I am new to Python and encountered an issue while trying to write a script. I am receiving a list index out of range error while trying to read the criminal activity layer file. Any help would be appreciated. Jeff [CODE]import arcpy # Data Layers in Secondary Map Document mxd2 …

Member Avatar for TrustyTony
0
421
Member Avatar for Huakalero

Hi, I am using beautiful soup to get data from a webpage. With help I was able to get a list of cities with correct accents. Now am trying to get a list of movie theaters in a selected city but these come with no accents, but with weird characters. …

Member Avatar for Huakalero
0
877
Member Avatar for krazykat1010

program I feed in interactively as below [url]http://pastebin.com/qGHMiHjp[/url] child.before contains the expected data (output of expect command) I run the code as python progname.py: (code shown below example run on pastebin) [url]http://pastebin.com/AWY0vM88[/url] import pexpect import sys child = pexpect.spawn('gdb',logfile=sys.stdout) try: child.expect(pexpect.EOF,timeout=0) except Exception, e: print child.before import code;code.interact(local=locals()) and child.before …

Member Avatar for krazykat1010
0
249
Member Avatar for Shansal

Hi, I created an app. I have some files which I can open with this app. So I made the association with the commands below: [CODE]assoc .bengi=BengiFile ftype BengiFile="C:\Program Files (x86)\Bengi\CreateAS.exe" "%1" %*[/CODE] After these, I can see that my file's icon has changed according to my app's icon. But …

Member Avatar for mittelgeek
0
156
Member Avatar for Huakalero

Hi, I'm working on a unofficial app to get the movie listings from a webpage [url]http://cinepolis.com.mx[/url]. In order to get the correct movie listings, the user must select his city. Now, using HTMLParser I was able to get the list of cities, but because some of these have non english …

Member Avatar for Huakalero
0
350
Member Avatar for Salman. S

My code: [CODE] from MySQLdb import * sql_q = '("6 bandicoot crescent doolandella brisbane qld","inala","3","7"),("inala brisbane","forest lake brisbane","3","9")' connection = connect(host = 'localhost', user = 'python', passwd = '******', port = 3306, db = 'logbook') cursor = connection.cursor() cursor.execute('INSERT INTO log VALUES' + sql_q) cursor.commit() [/CODE] I seem to get …

Member Avatar for sergb
0
209
Member Avatar for markfw

Hi Just a general question about PySide (menubar) and UI programming. I was thinking to add menubar to my program that has a "Setting" option which let people to change the setting of the program :-). Now the question is, what is a right/correct way of saving those settings? Should …

Member Avatar for Gribouillis
0
119
Member Avatar for ultimatebuster

Are there designer + IDE that's kind of like the Visual Studio suite for PyGTK or PyQT? [B]Again, don't clutter up the sticky with questions. Ask question in the regular forum.[/B]

Member Avatar for vegaseat
0
134
Member Avatar for dustbunny000

I was wondering if there was a difference between Python and ActivePython. Is there an advantage to using one over another?

Member Avatar for Ene Uran
0
97
Member Avatar for drak0

Hello, this is my first post on DaniWeb so I hope you'll go easy on me ,and my english.I'm working on a implementation of the AES algorithm in python;my app is supposed to encrypt the contents of files, and it does, yet it is kind of slow.I've optimized the code …

Member Avatar for drak0
0
633
Member Avatar for dustbunny000

I keep getting this error: error: unable to find vcvarsall.bat What is vcvarsall.batand why do I need it? I'm new to programming. Please explain as simply as possible!! Thanks!

Member Avatar for Gribouillis
0
249
Member Avatar for Salman. S

Hi, I was wondering if there would be a way to use Python to retrieve information from Google Maps - e.g. I want to get the distance and time from place 1 to place 2. I don't necessarily want any code or anything I just want some information for a …

Member Avatar for slate
0
60
Member Avatar for mukthyar1255

Hi, Thank you,I have some doubt in python programming like 1)Difference in between module,library,package. 2)what is difference in between built in and keyword. Eg: None,True is Builtins not keywords. 3)what is the use of writing the code(to call main method) if __name__=__main__:main rather than simple mian call main() 4) can …

Member Avatar for Lardmeister
0
303
Member Avatar for mukthyar1255

hi, i am working on windows 7 platform,please tell me how to install and configure third party packages,to use that package in some other python program Thanks mukthyar

Member Avatar for snippsat
0
205
Member Avatar for novice20

hi, using ftplib.storbinary(), i am able to successfully upload files of size 60KB, but not of size 7,218 KB and also 26 KB... I am wondering why is this happening??? should file sizes be a multiple of 10...or what is the actual problem??????????? any reply would be greatly helpful....... I …

Member Avatar for Schol-R-LEA
0
133
Member Avatar for novice20

Hi all... I am trying to upload 4 files on a local disk, onto a remote ftp server. All of them are in the same folder(in local machine). I am using the storbinary function of ftplib. Following are the file sizes: 1-- 70 KB 2-- 60 KB 3-- 73 KB …

Member Avatar for novice20
0
118
Member Avatar for mukthyar1255

Hi, i am new to python programming,please tell me the program to send sms from pc to Mobile in python programming thanks mukthyar

Member Avatar for Gribouillis
0
48
Member Avatar for Noob_Programmer

hi im new to python and programming, and I have just learned loop and nesting statements. I dont understand how to create functions and all that. could anyone come with some good suggestions to make my crappy script better? here is my script: [CODE]print 'choose option' print 'a) fortune telling' …

Member Avatar for griswolf
0
100
Member Avatar for rodm

hi, i am a python beginner, at the moment just playing_with/ testing/learning the language, and i must say that i love it. i intend to use it for a new project but i have a question about ... performance. for my project cpython is absolutely ok but, still, i have …

Member Avatar for woooee
0
204
Member Avatar for prakashr85

Friends I need to search for some strings like 'info stat, waiting, connecting, connection pending' in the source txt file those lines which has the strings need to be extracted and saved to a new file. [CODE]import re import os import sys file = open("C:\Users\Administrator\Desktop\logs test\source.txt", 'rU') script = file.readlines() …

Member Avatar for TrustyTony
0
96
Member Avatar for s1w

Problem looks easy. I havent issue like this in other languages, I cant find reason. PythonScript for Notepad++: non-greedy html comment removal for entity: <!-- <input id="file_upload" type="file"/> --> ass --> python script: (?P<begin> and ?P<end> group names are for clearness) [code]import re line = editor.getCurLine() p = re.compile('(?P<begin><!--+)(?P<between>.*?)(?P<end>--+>)') if …

Member Avatar for s1w
0
200
Member Avatar for vom53

Good morning/afternoon/evening, My high school Calculus teacher is requiring our class to program using VPython. Here is the link to the projects we are required to do: [URL="http://www.laquintahs.org/ourpages/auto/2007/5/15/1179207882248/math_programming%20_projects.doc"]Projects[/URL] I was able to finish Project #1 because my teacher provided the code and I just had to edit some parts, but …

Member Avatar for vom53
0
77

The End.