15,175 Topics
| |
I took an intro python class and learned some about jython. Unfortunately, what I have in mind is far too complicated for my level of training. Is it possible to use jython to import pictures from a scanner? If so, what module would I start with/use? The scanner is an … | |
I created python executable with py2exe. In my program, I use the pywin32 module. [U][B]Details of the SW's[/B][/U] OS Window 7 64 Bit Python 2.6 pywin32-214.win32-py2.6 when i created the exe its working fine on other system running Windows 7 but giving below error when running on Windows XP systems... … | |
Hi. I have a problem that I am tearing my hair out to solve. I am trying to transfer tens of thousands of records into a sqlite db using the script below. The script seems to run okay and I can see the db growing as it runs to some … | |
Hi, I am not aware where to post my query.That's why here I am posting my query.I am sorry for my mistake. Here the requirement is s to write small JYTHON script to modify some parameters on a WebSphere cluster at install time. I am new to this concept. SO … | |
| OK geniuses! I have to use python 2.4 and 2.5 here and my programs ideally work with both versions. This area of code was working in 2.4 and 2.5 versions until replacing my computer. Python did not get ported over so I reloaded with new downloads from the web. (both … |
Hi all. I'm writing a Python program to subscribe to a multicast group and prints out data it receives. The program works fine if the source is in the same subnet as my receiver. However if the source is on a different subnet, my application just doesn't pick it up … | |
Hi, I am really new to Python and I am having real trouble with this new language. This is what I want to do: I have two sets of .txt files that contain numbers. They look like this: FILE1 1028.085 283.795 2056.13 295.254 121912.4 11.346 0.004 147.932 780.677 966.771 289.326 … | |
So guys here is my situation. There is text file.Which contains some strings.They are all comma separated. What i wanna do is just read the text file and print individually those strings which are comma separated. Suppose the text file contains: dog,cat,bird,good,bad,blah,blah,blah etc.... The python script should print dog cat … | |
i am using python idle in windows7 to run my program. whenever i try to run the program i get an syntax error as unexpected indent. the code i am trying to run is as follows: [CODE]def print_lol(movies): for each in movies: if isinstance(each,list): print_lol(each) else: print(each)[/CODE] | |
Hello, I do the following exercise: [COLOR="Green"]Write a function called most_frequent that takes a string and prints the letters in decreasing order of frequency. Find text samples from several different languages and see how letter frequency varies between languages. Compare your results with the tables at wikipedia.org/wiki/Letter_frequencies.[/COLOR] I try my … | |
Hi, I am gettitn error in the python scripts as shown below: AttributeError: 'module' object has no attribute 'lib' I have installed the package WxPython of 2.8 version and Python of version 2.6 Please help me out to resolve this error | |
Lookup table is usually the fastest method to find function value, if number of values is small. Here we demonstrate the principle by using task of showing the value of byte as binary string or transforming binary string to byte binary value. | |
i have a problem with my python class. it contains a method that goes through all the keys of a multi_dimensional dictionary. The dictionary keys may be in the following order (1->(2,3),2->(5,6)). the problem is when the method attempts to get the keys, sometimes it gets them in the right … | |
Is there any good way to share a given directory over the network? Or at least, if the directory is already being shared, is there any way for me to get its network path? (Something like [code]\\190.10.10.1\my_shared_dir\[/code]) | |
Well, it bothers me to build menus for every shell application that needs one. So, I've written a module to handle that, like in the good old turbo pascal times. :) Here it is, the module comments are pretty explainatory, I think, and the sample usage if run as script … | |
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.! :) | |
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"," ") … | |
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 :) | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.