15,181 Topics
| |
i need to fade a picture into another picture.i need to use crossfade function to to this. i need some help please, i am new at this. any help would be great. i have done a program than makes a double image but this need to happen slowly. | |
Hi, trying to learn recursion right now. I'm trying to write this program where it will tell the position of the letter if found in the list. I'm trying to not use the in function or the .index() function to find the position. I got everything except the position. Any … | |
Hello all, I would be grateful for your advice regarding something I tried to do using unique() but it didn't work. I have a two dimensional numpy array that looks like that (but much larger): >>> pop_A1 array([[10, 2, 10], [10, 9, 10], [10, 9, 10], [10, 9, 10], [10, … | |
Hi, there! I'm pretty new to the programing world and I have a question. How can I write this code so it returns to surv1.set_sex = raw_input? after the "not in sex statement"? It's really confusing maybe I should try and write it in someother way? I don't quite understand … | |
hello, I'm writing calculator with Python and i came across few problems. First problem is that if user enters letters it would ask him to reenter them i thought i could do it like this [code=python]try: class num: x = float(raw_input("number\n")) numb = num() except: bull = False else: bull … | |
Hi!totally new, i did an undergrad in non-python related science, and I'm trying to move into incorporating python into my postgrad, so my questions right now are fairly basic. I basically want to run muscle (a sequence alignment tool) on a large number of files.how do i start a python … | |
In the following code, could someone please explain these if statements? elif 5 <= unhappiness <= 10:, & elif 11 <= unhappiness <15:, they have two arguments, one on each side which is something I haven't seen before. Also, what the one to the far right for anyway? Also, this … | |
I need to write: Starting weight of food (in lbs:ozs)=8:9 into a python 3.0, I'm very new to this and what I came up with was: Starting_weight_of_food_in_lbs{:}ozs=input("Enter Starting_weight_of_food_in_lbs{:}ozs") print("Starting_weight_of_food_in_lbs{:}ozs entered=", Starting_weight_of_food_in_lbs{:}ozs) and I belive i'm way off....any help would be great! | |
Joining together ordered sample points (xi, yi) when ths xi's are different yields a piecewise linear continuous (P1) function. This snippet defines a handy class to manipulate these functions. It allows computing the value and the slope of the function at each point, arithmetic operations, absolute value, truncation and linear … | |
how to store image file into database using python | |
I'm trying to make a SMTP Checker using Python. The checker will do the following things: The code will take a list of smtps accounts (ex: host,user,pass) and will try to send an email to a email you will specify in the code. If it's successful (the send of the … | |
This program uses the Python win32 extension module to get information on disk or flash drives for Windows machines. Specify the drive with its letter. If no drive letter is specified, the current drive is applied. | |
Hi all, I would like to make a for loop in which should do the following: To print the string n[i] twenty times then the string s[i] only one time. Then leave a gap and continue this until the n reaches n599 and s goes to s30. n0 n1 n2 … | |
I have a limit of 30-45 dollars to buy an editor (with Python support, obviously) . Here's what I would like. Customizable syntax highlighting (like the kind in Notepad++). Auto indent, so it autmatically indents 4 spaces after a ':' character. Good code completetion. A built in IDE. Preferably like … | |
I've been working with Java for several years now and it's time for me to expand to other languages. I've decided to learn Python and have now just started looking into where to begin. I'm wondering if there is one, maybe two books out there that are considered to be … | |
I have a list of part files (that is many parts of single file). I want to append all parts into a single file to make a full file. I used this code: [CODE] import os l = ["home/baskar/1.part","home/baskar/2.part","home/baskar/3.part"] source_file ="/home/baskar/source.file" re_size = 0 buffer = 10*1024 #10 KiB's for … | |
Hello I'm trying to add highlighting to the specific keywords in the text widget. For instance I would like to highlight : Hello World. where is "hello" - will be coloured in red and "World" coloured green. Any Idea ??? [CODE] from Tkinter import * import os import subprocess import … | |
im confused with [I]__call__() [/I] method defined within the class. [I]__init__() [/I] is used as constructor, and is called when we create an instance of the object. when does [I]__call__() [/I] method get called even though we not specify it explicitly... please help.......... | |
This is what I intended to do [CODE] class person: "class to represent a person" def _init_(self): self.name = "" self.age = 0.0 self.sqr_age = 0 class ageName: def listAgeName(x,y): # x is name # y is age x = 0 y = 0 listAgeName = [('John', 18)] p = … | |
Hi there! I new learner in Python. And just couldn't get threading. I wrote this script. [CODE] import sys import MySQLdb if len(sys.argv)!=3: """the program name, mac and ip makes three""" """stop program and send error""" sys.exit("Must provide mac and ip!") mac = sys.argv[1] ip = sys.argv[2] print 'Connected to … | |
hello I am inserting records into a MYSQL table via a loop Records are being inserted, but every now and then the program bombs out with the below message There is nothing wrong with the query line though (If i restart the job, this record will be inserted without issue) … | |
[code] Program to make snowflake! # Local graphics module. Must be in same folder as this # program (or both on Desktop) import ecs10graphics as gr # Math module that comes with Python import math def pointOnCircle(f, r): # f is fraction of the way around # r is radius … | |
Dear All, I am opening a file called initialisation: [CODE]try: initFile = open("initialisation.dat", "r") except IOError: print ("Initialisation file cannot be openned for reading")[/CODE] I would like to read the contents of this file and then print them on several other files i.e. file1, file2, file3, file4, etc. i am … | |
I am a newbie just getting started with Python. I have trouble understanding the statement "The __init__.py files are required to make Python treat the directories as containing packages; this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later … | |
Hello I wondered if anyone had an idea on a piece of code that could tell me the available free disk space. There is a trick here, otherwise this easy question wouldn't be here. I need the free disk space to read off where the program is being run, and … | |
-------------------------------------------------------------------------------- So i just realized after checking my emial that i have a python hw for my comp sci class due tom night at 12am . I read the hw and i am a bit lost. I will be starting it tonight once i get out of work. The task … | |
i am a bit stuck on this, i need to call the first 2 functions for the output in the 3rd one. The user has to should be able to continue until they want to stop converting and they should be asked on which way the conversion is to be … | |
[CODE]def main1(f): return (f - 32) * 5.0 / 9.0 def main2(c): return 9.0 / 5.0 * c + 32[/CODE] the two function above convert fahrenheit and celsius I have to write a third function which calls the two functions above and allows the user to input to convert between … | |
I want to read two points in a picture. Most pixel values will be (0,0,0). I don't know how to take the flatted data and separate it into x,y coordinates. I use the Image library and VideoCaputre. | |
Good day. I would need an advice about sys.stdout and sys.stderr. I use Python 2.6, on Windows XP SP3, but i think the question is the same for UNIX/ MAC computers. I tried all possible combinations before posting this message, so ANY advice would be great. I work with "subprocess" … |
The End.