15,181 Topics

Member Avatar for
Member Avatar for Ismatus3

hello everybody , good day , i just need to insert an image : "BosqueTK.jpg" in a speciale place in my window Tkinter using .place(x= , y= ) , for this i created a frame f2 placed like : [CODE]f2.place(x=130 , y=213) [/CODE] , and want to insert in it …

Member Avatar for Ismatus3
0
220
Member Avatar for hencre

Hi Guys, I'm new to python - how to execute dos2unix from python - subprocess.popen with shell = False ? >>> cmd = subprocess.Popen(["dos2unix","./FEED1/bin/*"], stdout=subprocess.PIPE) dos2unix: converting file ./FEED1/bin/* to UNIX format ... >>> dos2unix: problems converting file ./FEED1/bin/* All help appreciated.

Member Avatar for hencre
0
1K
Member Avatar for chet6

Hi, We are a team of 3 people. We have not worked on Python before.We want to learn python & also develop a small project or software using python,c,shell scripts in LINUX environment. Could someone help us or give information on websites of the projects that we can develop?

Member Avatar for Ismatus3
0
154
Member Avatar for ThemattyC

Im working on my final project for school where i have to uses arrays to store the first year of energy costs, the second array will store the second year after going green, and the third array will store the difference. I have pretty much all the code written out …

Member Avatar for TrustyTony
0
163
Member Avatar for natehome

Hello, im currently taking a python programming class at my high school and we have an assignment to create a falling sand type game using pygame. im totally lost on how to start could someone please help me get started. if you dont know what the falling sand game is …

1
93
Member Avatar for Luis Ventura

Hello, i'm new to this forum and to Python and i want to creat a function that counts the number of words on .txt file, but also that creats a dictionary with it, with the words has a key and the number of referencies to it has a value. Thanks …

Member Avatar for Luis Ventura
0
527
Member Avatar for sofia85

Hi, I have a large file (11 GB), that I want to extract information from. I decided that the file was to big to work with, so I ended up with splitting it into 20 smaller files. Now I don't know what the smartest thing is to do with these …

Member Avatar for sofia85
0
144
Member Avatar for techguy2012

This is python code and I am new to programming and I can't get just the first word of the sentence to capitalize. [CODE] def main(): input= 'the money is in the bag. however you dont want it.' words = input.split('.') capitalized_words = [] for word in words: word=word.strip() title_case_word …

Member Avatar for TrustyTony
0
280
Member Avatar for carmstr4

Hey guys, Is it possible to change the color of characters in a list if they do/dont meet certain conditions? So here's my code: [CODE]def checkWord(real, guess, remReal, remGuess, wrongSpot): # Format the letters so user knows whats wrong/right fullWord= real # Create copy list of real word realWord= list(fullWord) …

Member Avatar for carmstr4
0
1K
Member Avatar for Catchamouse

I would like to know how to use [ICODE]system("pause")[/ICODE]from C++ in Python 2.7 to get similar effect. Could you help me?

Member Avatar for Catchamouse
0
5K
Member Avatar for jacob501

[code] from urllib import urlretrieve import urllib2 import re import gzip urlretrieve('http://www.locationary.com/place/en/US/Virginia/Richmond-page28/?ACTION_TOKEN=NumericAction', 'myfile') page = gzip.open('myfile', 'rb').read() findLoc = re.compile('http://www\.locationary\.com/place/en/US/Virginia/Richmond/.{1,100}\.jsp') findLocL = re.findall(findLoc,page) listIterator = [] listIterator[:] = range (0,25) for i in listIterator: urlretrieve(i, 'myfile2') page2 = gzip.open('myfile2', 'rb').read() findYP = re.compile('http://www\.yellowpages\.com.{1,100}\d{1,100}') findYPL = re.findall(findYP,page2) listIterator2 = [] listIterator2[:] …

Member Avatar for jacob501
0
4K
Member Avatar for jacob501

I am trying to use Beautiful Soup to scrape a website, Locationary.com, and get some information from it. I am a member and even when I'm logged in this doesn't work... OK. This first bit of code just returns the HTML of Locationary.com (the home page) in a "pretty" form. …

Member Avatar for Gribouillis
0
196
Member Avatar for Tcll

I'm currently working in another thread to find a better conversion method here's my script: [code] #!BPY """ Name: 'Brawl (.mdl0)...' Blender: 248 Group: 'Import' Tooltip: 'Import a Brawl model file (.mdl0)' """ __author__= ['Tcll'] __url__ = ("") __version__= '0.015' __bpydoc__= '''\ mdl0 Importer ''' # ***** BEGIN GPL LICENSE …

Member Avatar for Tcll
0
2K
Member Avatar for monica23

Good day everyone, i need to display image from the database but the code returns error page when i tried to print image from the database using [CODE] print fout [/CODE] below is the entire codes [CODE] #! /data/python import MySQLdb import sys print ("Content-type: image/jpeg"); print # End of …

0
44
Member Avatar for MazzGonzo

Hi, Basically I want to put my responses for each of the outputs of my loop (answers yes or no to different contrast numbers) into an empty list ... so I would have a list for each contrast corresponding to how many yes or no's there were? [CODE]from observerClass import …

Member Avatar for TrustyTony
0
117
Member Avatar for eceisl

I need to write a recursive Python function that takes a numeric list as its argument, finds and returns the minimum of its elements. I am not allowed to use min() function of Python. I'll be very grateful if someone can help me.

Member Avatar for TrustyTony
0
106
Member Avatar for gorbulas

Hello Having trouble reading in some 8-bit data (not text) from serial port using pyserial module. Am storing the data in a string buffer as it comes in, that's working fine. Problem is that I'm printing the buffer out to the terminal screen, after a wee bit of data (30~200 …

Member Avatar for Gribouillis
0
343
Member Avatar for Lemony Lime

So, I have a two part question for you... I'm going to be writing several lines of code to a .txt file, but I won't know what each line is, or how many there will be. There could easily be hundreds of lines. I need to add a prefix to …

Member Avatar for gorbulas
0
223
Member Avatar for arindam31

Hi Guys , this questioned has been asked before , but the answers haven helped me . I want to seperate lines when i am appending the text control. But "\n" is simply not working . I am using Python 2.7 , on Windows 7. Please help. I want to …

Member Avatar for arindam31
0
34K
Member Avatar for vegaseat

Python does not have a type like struct in C or record in Pascal, but it can be easily implemented with a class. This little code snippet shows you how to do it.

Member Avatar for Gribouillis
0
4K
Member Avatar for rollingapes

I have to create a simulation to repeatedly play the Monty Hall game. I've created a class. This is what I have so far. I have created the buttons, activated them, deactivated the stay and quit buttons. I have a button class that is used to activate and deactivate buttons …

Member Avatar for rollingapes
0
182
Member Avatar for vegaseat

I couldn't find a meaningful code sample for the wxPython slider (wx.Slider), so I concocted this one and added a few explanations. It explores two different sliders, one is horizontal, the other vertical. The slider events are then fed to a function that retrieves the position values and displays them …

Member Avatar for skyrimmer
0
764
Member Avatar for gnik2009

I need to read a file that contains this: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 …

Member Avatar for gnik2009
0
236
Member Avatar for carmstr4

So after a lot of work I got functions to compare one word with another one. Now my problem is formatting the output. I have one function that locates letters int he wrong position, one that finds matching letters and one to compare the results in order to format the …

Member Avatar for TrustyTony
0
183
Member Avatar for python123456

I am working on a program that uses a recursive function to print the digits of a number in English (i.e. 456 would display "Four Five Six".) Right now I am beyond confused and I don't have much code to show for the hour and a half of work I've …

Member Avatar for TrustyTony
0
2K
Member Avatar for psvpython

Hi, I have created a checkbutton within a dialog box. But, I am not able to capture the value of the checkbutton. The value always seems to be 0 whether checked or not. [CODE] class MyDialog: def __init__(self,parent): self.Frame1= Tix.Frame(parent) self.Frame1.pack(side=Tix.LEFT, fill=Tix.BOTH) self.enabled = Tix.IntVar() self.checkbutton = Tix.Checkbutton(self.Frame1,text = "Enable …

Member Avatar for psvpython
0
135
Member Avatar for pointers10

I am trying to let the user search an external file for 2 things after they tell me one of the things.. There are 3 different products and prices in the txt file in the form of: apple 1.99 orange 9.99 coconut 1.59 however, this only shows the price of …

Member Avatar for woooee
0
84
Member Avatar for sofia85

Hi, I have a file containing one column with values: 3.258 1.345 5.769 1.00 etc... I want to sort this data. I tried to use sort() directly on my raw data but I get error message saying 'str' object has no attribute 'sort'. I now it's basic, but I'm a …

Member Avatar for sofia85
0
129
Member Avatar for junoh1991

# I wanted to change the question. I have a list something like this: list1= ['NNW 30', 'SE 15', 'SSW 60', 'NNE 70', 'N 10'] For this list, if the element in the list starts with N, i want '+' to be inserted before the integer. If the element in …

Member Avatar for valorien
0
4K
Member Avatar for Lemony Lime

I'm pretty new to programming, so this may be really obvious, but I'm having trouble with it. I'm trying to learn python, so I thought I'd make a simple program in python to help me write similar lines of java code faster, (I'm going to easily have hundreds of lines …

Member Avatar for Lemony Lime
0
538

The End.