15,190 Topics
![]() | |
Hi all, I need some help regarding how to cancel the connection from my server using the urllib2 library. I want the database to stop writing the data away as soon as the connection has been cancelled. The `allchannels_timer` will be called when I hit the 'enter' button, which will … | |
First off this is my second day writing in Python. My manager switched us off SAS and moved us to Python and R which I actually am starting to like the flexibility. I have a few datasets that I work with on a regular basis that require a lot of … | |
Hello all, I have a Hindi Text file, from which i want to access the maximum repeated words and other similar operations. I went through many articles which help in accessing English text files. But i need to use the same operations on the Hindi text file, i am not … | |
Hi need help passing an argument through signal emitted from a function at module level, when the function is executed I want to emit a signal with an argument whose value i want to pass to the method that is connected to that signal in the class in that same … | |
I need to make an object called Accounts that can be used as a banking system. It requires 3 inputs, first name, last name, and initial deposit and 4 member functions: withdraw, deposit, fee and interest. The fee is $20 a month if the amount in the account is less … | |
I know that all you really need to execute a python program is the python interpriter, what what if your program uses config files that might be in /etc, ~/.program, or C:\users\Name\Appdata ? How would you go about creating an installer for you python program and all of it's files … | |
[QUOTE]I would like to search for more than one word in a text file and if the word found i would like to save it to a group in which i have files belonging to English,Entertainment etc.The thing is Im unable to search for more than one string in a … | |
Hello, I need to make a python scrip to perform the following: *I have a list of IP's 1. Read from a text/csv file to input IP #1 into a telnet session. 2. Once the telnet session is initiated I need to run a GET cmd 3. Output the result … | |
I can't go back to a submenu. Using continue or break will make me go back to the main menu. Can you get what I'm saying? New to Python. Thanks! | |
Hi i'm new to python, i want to generate results by comparing two files(txt/xls)line by line as Pass or Fail. i was able to achieve this using difflib and htmldiff(). comparison works fine but not able to add third column as results which should return pass/fail for corresponding line. can … | |
I am a total newbie to programming. I was hoping to learn how to write a program that prints out a string representation of a random card from a deck of playing cards. The programs should use either “A”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “J”, “Q”, … | |
Hi I'm new to Python. I can't seem to go back to a submenu. Using continue or break will make it go to the MAIN menu. Will using def help? If so, how is def used in that situation? | |
Hi, I want to display a Frame2 when I clic the button4 in Frame1,my problem is when I clic in that button the Frame2 is not displayed this is my code: #Boa:Frame:Frame1 import wx import wx.animate def create(parent): return Frame1(parent) [wxID_FRAME1, wxID_FRAME1BUTTON1, wxID_FRAME1BUTTON2, wxID_FRAME1BUTTON3, wxID_FRAME1BUTTON4, wxID_FRAME1BUTTON5, wxID_FRAME1BUTTON6, wxID_FRAME1GIFANIMATIONCTRL1, wxID_FRAME1PANEL1, wxID_FRAME1STATICTEXT1, … | |
when getting file from a web server or ftp server, if we use `u = urllib2.urlopen(url)` Correct me if I am wring, it is not getting downloaded to disk, i think its getting stored in buffer(RAM), is there a way that the buffer split should get saved onto disk directly … | |
Hi all, I'm running on python version 2.6 for xbmc media application, but I'm having trouble with setLabel function. When I run the code, it will update the value in the setLabel, but it will not allow me to update the values in the setLabel more than once. Here it … | |
ok, so I'm kindof a complete noob when it comes to stuff dealing with windows specifically... I know it's possible to have an interactive OpenGL desktop BG in XP as [this article](http://engineering.imvu.com/2010/11/24/how-to-write-an-interactive-60-hz-desktop-application/) proves it works in C++. but I want to get it working in python and have no idea … | |
Hi all, I need your help, I'm having a trouble with writing the database at the same time when I'm using the time.sleep function. I can be able to create the database table without have any problem, but when I use the time.sleep function, it will stop writing the data … | |
I am on OSx and I am trying to exit the program by pressing CTRL+C. but it seems like even if I have a signal handler registered in main thread it doesn't exit while the thread is executing on pressing CTRL+C. Here is a piece of cake where I am … | |
Hi All, Im new to programming and am trawling through Python as we speak. API & web services type stuff is of real interest to me but not sure how to structure my learning. I know google is my friend but any ideas on how best to structure my learning … | |
I have a large gff file 15,6 GB.. I wanna retrieve features from each record.. and for each subjectOrganism in the qualifier feature I will compare it with sorted list of species and get the index of this organism in sorted list. It work with a small data from the … | |
So i have a python code that searches for a folder in a directory and gets the size of the folder. I am wanting to search inside the folder and get the file size of what is in the folder. The items in the folder will have different extentions so … | |
I am trying to learn element tree so that i cna work with xml files a little more indepth. I have researched it and everythign i have read says that my version of python should have ElementTree already installed on it. But every time i try to run my sample … | |
I'm working with a LIST that am getting from a soup which after the clean up gives me: lists of variable length ['7.0', '7.5', '6.8', '6.9'] or ['7.0', '7.5'] so my problem is when I try formating the output: code snippet: if grades: print '\r\n["' + str(student[0]), if len(grades) == … | |
#!/usr/bin/env python3 import sys import re file = sys.argv[1] f = open(file, 'rb') seek_positoin = 0 artist_string = b'artist=' line = b'' f.seek(seek_positoin) while artist_string.upper() or artist_string.lower() not in line: line = f.readline() if artist_string.upper() or artist_string.lower() in line: seek_positoin = line.find(artist_string) f.seek(seek_positoin, 1) word = f.read(10) #line = str(line) … | |
I have a small program that searches through two folders and gets the size of the files in them. As of right now for every file that is over the specified size limit sends a email. What i am wanting to do it have it compile a lsit of the … | |
I have following code: # -*- coding: utf-8 -*- forbiddenWords=['for', 'and', 'nor', 'but', 'or', 'yet', 'so', 'not', 'a', 'the', 'an', 'of', 'in', 'to', 'for', 'with', 'on', 'at', 'from', 'by', 'about', 'as'] def clear_screen(): button2.destroy() button3.destroy() text.destroy() label.destroy() def main_page(): var = StringVar() global label label = Label( root, textvariable=var) var.set("Fill … | |
Hello, I am trying to create a function that will search a fixed line of text for a word or phrase. Once that is completed, I am to try and pass the line of text and the word as parameters. Can someone help lead me in the right direction. I … | |
Friends, I'm completely new to python, i have question with setting width of PySide.QtGui.QDockWidget in python. I have MainWindow class in python which inherits QtGui.QMainWindow ( PySide ) and have added one left dock widget with simple plot and one right dock widget with simple plot and embedded simple plot … | |
Hello! So, I'm taking some classes and learning how to write sample programs in Python, and I've stalled out pretty hard on one of the sample programs. The current exercise wants me to do the following: 1. Create an empty list home_prices 2. While loop asks for a home price … | |
Hello, all! My name's Keegan, and I'm a college student finishing up my B.S. in Journalism, and learning Python is one of the final steps toward earning my degree. I hope to use what I learn about Python and apply it to digital journalism in the form of app development, … |
The End.