15,175 Topics
| |
Hello I am fresh newbie in Python world. I need a python code that just copy my input file with a different name. I just want to test it. Example. A simple scipt file : [B]copyfile.py[/B] when I do a command like "python copyfile.py 1.jpg" it would copy the "1.jpg" … | |
This is a follow up to my solved thread a few days ago about extracting parts of a RegEx search in a web scraping app. Now, I have a script that includes 4 RegEx searches that each work individually. Now I want to compile all 4 into a single search … | |
i downloaded and put linux mint on a Cd it took about 3 hours i started the CD up and it's just files that i can't do nyhting with. what should i do? | |
Can anyone help me in graphics in python GUI using Tkinter toolkit...can anyone give me a code that can implement simple images onto the canvas of a GUI program, i know i have to use bmp. or gif. images which is fine because i got that. Thanks... | |
Hi there, I'm trying to connect to a PostGIS database (which is basically an enriched PostgreSQL database) and I'm having trouble with the [I]INSERT[/I] statement. Here's my code: [code=python] import psycopg2 try: conn = psycopg2.connect("dbname='postgis' user='fdi' host='localhost' password='fdi'"); print "Database connection established" except: print "Critical Error: Unable to connect to … | |
Heigh.. I have made an html editor which is a wx.stc.StyledTextCtrl with style=wx.TE_LINEWRAP definition. (stc.STC_LEX_HTML) when the lines are wrapped, they starts in the left side of the editor window. I found out only haw to make them start at fixed numbers of characters frrom the left, but I really … | |
High.... I am making a multi editor to use in my (some days in a month) job relateed to web building, and i have a problem in my html editor. I transformed the StyledTextCtrl_2 module from the wxPython Demo, from Python editor to HTML editor. Thats mean that i [B]changed … | |
when you are writing a program and you get an errer do you have to start all over again or is it ok to go on. i am just writing some of the programs that are on this site in the sticky's i am writing them in the command line … | |
can u guyz help me on how to make a program that's able to read chm file? i got this idea when i want to convert an entire chm file to pdf. i kno theres awready a software on that. but i reckon it would b interesting if we can … | |
Hello, I'm very much new to Python and I am stumbling on my first 'experiment'. What I want to do is create an application that operates as an on-screen log viewer where Python prints information it is processing into a wxTextCrl widget (called 'sampler' in my example). I am using … | |
Hi, Please can anyone help me to find a way to shutdown an SimpleXMLRPCServer. | |
Hello there everyone. For a summer project I'm doing, I have to use a phone to pass an image I've taken (on the phone) to a dedicated server I've made on a local ubuntu machine. For the upload code, I decided on python (seeing on how its easy to learn, … | |
[B][U]Ok heres the deal they're both a mathematics program but i want to make it like this...[/U][/B] [ICODE]from Tkinter import * import tkMessageBox import random def ask(): global num1 num1 = random.randint(1, 100) global num2 num2 = random.randint(1, 100) global answer answer = num1 + num2 label1.config(text='What is ' + … | |
[code] url='http://www.google.com' webbrowser.open_new_tab(url) [/code] This should open the google.com webpage, but instead it attempts to open : "file:///u/guest/python/%22http%3A//www.google.com%22 guest is my username, and /u/guest/python is where I execute the script from . Could you please tell me why this is happening ? Thanks | |
i have a python script and would like to know how to email the output of the script in python. i can do it from the command line(kshell) with in *nix but would like something like this in the script. somescript.py; echo "test" | mailx [email]john_smith@xyz.com[/email] | |
Hello again, everyone. My program for my robot is progressing. Thanks to your help its coming along great. I've also found that I'm more and more able to solve my own problems with programming now. One thing that I can't seem to solve: I'm working on a part of my … | |
Helo All, I need to write a python script that will automatically log into a website and retrieve a URL once it has logged in. I already know how to fetch the html of a page, but how do I make the script log into the page first? On the … | |
I'm trying to write my first web scraper with Python using simple regular expressions to match the info I want to extract (I realize BeautifulSoup is available, but I'm not ready to use that yet, so I want to figure out how to use reg ex first) . I want … | |
i m new to programming where do i start? i have python on my computer and have played around with it. but dont know where to start or what to do. any advice would help me so much. | |
I have a list of the stock prices over 14 years and am required to calculate the daily returns as Returns = log(today_s price/yesterday_s price) Here's what my data looks like: 7/18/2008 19.57 7/17/2008 18.08 7/16/2008 14.27 How do I calculate this while reading the data from excel? I have … | |
Hi, I have a treectrl and a checklistbox with some data in them. On click of a button I want to freeze the treectrl and the checklistbox. However, I want the scrollbars in both of these controls to move. Is there any way to implement this? Please Help. Thanks and … | |
For my new job I need to learn a bit of Python to parse and extract data from .txt files. Essentially, I have a table that looks like this: Pair NO. Sense Antisense Coding/Noncoding Cis/Trans Overlap ATH00001 At1g02170 At1g02180 coding-coding cis 3 As you can see, the top are simply … | |
[code] # #hangman.py # import random import sys wlist = ['apple', 'blue', 'house', 'frog'] guessed = [] gright = [] choice = None word = random.choice(wlist) guesses = 0 # add dictionary for category def menu(): while True: print 'Welcome to hangman!' print 'To start a new game type "n"\n' … | |
I am using python Qt Designer. There i created for with widget. In that form i placed many textEdits nearly 15. So form size is more than screen size, iam not able to see all textEdits. How can i put scroll bar to this form to view total form. -------------------------------------------------------------------------------------------------------------------------------------- … | |
Hi, I have to create *.xls (or *.csv) with multiple tabs. The program is in the loop and every time the loop runs it should create a new tab. Can any one help me with this. (I want to code it with out using PYExcelerator - I tried using that … | |
I'm writing a gravity simulation in python and pygame, and had a quick question. Say I have an object that I can move. Lets call it "square". Then I created a line like so... [CODE] pygame.draw.line(screen, (0, 0, 0), (84, 368), (510, 368)) [/CODE] How would I tell python not … | |
the question is within this example: (using *'s) [code] #!/usr/bin/python # Filename: inherit.py class SchoolMember: '''Represents any school member.''' def __init__(self, name, age): self.name = name self.age = age print '(Initialized SchoolMember: %s)' % self.name def tell(self): '''Tell my details.''' print 'Name:"%s" Age:"%s"' % (self.name, self.age), class Teacher(SchoolMember): '''Represents a … | |
we are able to query successfully from a Column called "ParentUUD" (without space) using query in python for MS ACCESS DB. "SELECT Name FROM PartVersion WHERE ParentUUID='"+ str(lstUUID[0]) +"'" we have a column whose name is "Parent UUID" (with space) We are trying to query the column from PYTHON. we … | |
Hello, I'm trying to write a code to automate logging into a website.I have chosen the forum 'www.tek-tips.com' as an example and tried this script on it....But it doesnt seem to work...What am i missing here..plz help [code]import urllib2 theurl = 'www.tek-tips.com' protocol = 'http://' username = 'johnny' password = … | |
Hi I have a weather forecasting program that uses a few threads. These threads stop and start at different times throughout the program so there is no set amount of threads at one time. My problem is when i try and close the main thread the program keeps going because … |
The End.