15,181 Topics

Member Avatar for
Member Avatar for monstercameron

just an idea ...im not a programmer yet starting college aug. c++ and java both have complex syntax and i cant learn on my own, python is good but not supported aswell and basic is really basic any more thanks to object oriented stuff English the programming and scripting language …

Member Avatar for 0x69
0
259
Member Avatar for PythonNewbie2

I need a function which can take in a variety of time formats like "05/26/1999" and "02/14/2010 12:44" and convert them into this format: May-26 or Feb-14. I've tried to do this, but without success. Here's the code I tried (with some prints included for debugging purposes): [CODE] #Function for …

Member Avatar for snippsat
0
174
Member Avatar for PythonNewbie2

I need to do CSV parsing and I was wondering if this is possible with python and where I should go to learn how to code this script or get help. Let's say I have a CSV file with 20 rows and 4 columns. I need to: -Strip out the …

Member Avatar for PythonNewbie2
0
139
Member Avatar for leahk

i want this loop to keep on checking the number of files that are in the current working directory and every time one is added... print it out with cat. it stops running after a few seconds. right now it works for a bit but when i try to add …

Member Avatar for TrustyTony
0
97
Member Avatar for appunu

I new to python . I created the one console application in python for that i used two data bases IBM_DBI and POSTGRESQL8.4. I converted the console application into windows exe for that i used py2exe. It is created, while running the exe it coudn't connect with DB2 data base …

Member Avatar for TrustyTony
0
977
Member Avatar for pyprog

I have the following class. I have tried many basic examples but I always get the same error. [CODE]class Factorial(object): def calculate(self, n): if n == 0: return 0 elif n == 1: return 1 else: return n * calculate(self, n - 1) if __name__ == "__main__": fact = Factorial() …

Member Avatar for jcao219
0
119
Member Avatar for pyguy25

I have another string dilemma. I am asked to write a program that counts the number of words in a sentence entered by the user. This is what I have right now, although I don't think that it is anywhere near being correct: [code] import string def main(): print "This …

Member Avatar for j6m8
0
271
Member Avatar for doomas10

Hello all, I have a question. You see i have a file which contains data in this format: index 388.315813 index 311.214286 syndrome 289.708333 factor 184.246753 loss 168.578313 index 451.123455 factor 321.676544 What i want to do is to read every line and print it. However if i encounter the …

Member Avatar for TrustyTony
0
417
Member Avatar for mastermoo420

[url]http://paste.pocoo.org/show/234632/[/url] The error's in there and I explain what my thoughts are. Extra information: There is definitely enough RAM. I watched the RAM go down as the program ran (lol), but there was still 2.3GB of RAM before the program crashed, giving the MemoryError. Here is an example of what …

Member Avatar for mastermoo420
0
97
Member Avatar for vlady

Hello, I try to generate output (all posibilities) for logical AND. Nb inputs is 10 and that means there are 1024 combination. example: n i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 output 1 0 0 0 0 0 0 0 0 0 0 0 2 0 0 …

Member Avatar for TrustyTony
0
170
Member Avatar for ctayn

#I have to revise this code below to allow the teacher to perform these calculations for any number of students. The teacher will be asked if she wants to calculate the average of another student. If she does, the program will allow her to input his / her test grades …

Member Avatar for nounlu
0
120
Member Avatar for Zemeus

[code] #reg.py #Choose username and password def regis(): userpass = open("userpass.txt","w") userpass1 = userpass.write(raw_input("Please select a username: ") + "\n") password1 = userpass.write(raw_input("Select a password: ")) userpass.close() #end of reg.py #login.py # Should i import reg before this function or is it ok to do it in the function? # …

Member Avatar for TrustyTony
0
143
Member Avatar for mtliendo

I'll start off by saying that not only am I new to Python but programming in general. But the problem is that whenever I have the user put in a number, then have the user put in another number, I can't get the two x,y variables to add up. the …

Member Avatar for griswolf
0
168
Member Avatar for echellwig

Hi, I am trying to interface between Java and Python in a program called Eclipse. Specifically, I need to call a program I wrote in python while in java. Any insight on how to do this would be helpful. Thanks! Elise

Member Avatar for Stefano Mtangoo
0
98
Member Avatar for Dan08

Hey everyone again, so I am having a lot of problems with function in wxPython, this time, I need to know how, or if it is possible, to add new widgets to the main frame from a function, so here is my code: [CODE]import wx class Example(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,id,'Example', …

Member Avatar for TrustyTony
0
257
Member Avatar for vello

[CODE]import time import subprocess from PyQt4 import QtGui, QtCore[/CODE] ............. This function is not working! [CODE]@button.clicked.connect def connectClicked(): button.setEnabled(False) process = subprocess.Popen("command", shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) time.sleep(5) # 5 sek (?) button.setEnabled(True) [/CODE] ................

Member Avatar for TrustyTony
0
153
Member Avatar for Sagar14

Hi, I'm using Google Base API for python to insert data in Google Merchant centre. The code is working fine till I asked for inserting the data (the last 3 lines of the code). Can anybody help me to figure out where the error can be. [CODE]import gdata.base.service import gdata.service …

Member Avatar for Sagar14
0
102
Member Avatar for Tommymac501

We get files from a unix system that are delimited with linefeed only, this is not a problem. The problem is that within some of the fields themselves, there are carraige controls ("\r\n"). Reading the file using OS will see a row like this and stop reading at the crlf. …

Member Avatar for TrustyTony
0
11K
Member Avatar for lewashby

[CODE]# create options menu options = read_depots("depots.txt") OptionMenu(app, depot, *options).pack()[/CODE] In the above code I'M getting the error that __inti__ takes 4 arguments and that it's only given 3. I'M writing the code just how the book gives it to me.

Member Avatar for griswolf
0
98
Member Avatar for Tech B

I am trying to access some functions with in a dll I downloaded. I know I need to use ctypes, but all the examples and tutorials use windll.kernel or windll.user32 respectively. How would I go about calling a function with in xyz.dll? EDIT: Never mind, with a bit more digging …

Member Avatar for Member 785599
1
194
Member Avatar for funfullson

Hi dears. I am playing windows commands with python scripts. for example I did: [CODE] import os print os.system("ipconfig -a") [/CODE] but there is a problem with some commands.for example see this: [CODE] >netsh netsh>dhcp netsh>dhcp>scope 192.168.100.10 [/CODE] after playing the first one script, I have to come back to …

Member Avatar for Beat_Slayer
0
170
Member Avatar for lewashby

[CODE]# create GUI app = Tk() app.title("Head-Ex Deliveries") # create a label Label(app, text = "Depot:").pack() # add to Tk app window # create a text entry depot = Entry(app) depot.pack()[/CODE] I understand and have been told that placing the instance name(app) as a parameter of Tk methods and other …

Member Avatar for TrustyTony
0
275
Member Avatar for WildBamaBoy

In the code below I have a class that handles what folder the user is in, so they can browse through multiple folders. I know that this isn't going to work right just yet. This is the first time I've tried using classes and I don't understand them so well. …

Member Avatar for WildBamaBoy
0
110
Member Avatar for monjuri

Hello, I am trying to use openoffice myThes code. This code is written in C and now I need that code in python. I have used swig tool to convert the c code in python. The python code has been produced. but problem is the c main function takes a …

Member Avatar for monjuri
0
259
Member Avatar for echellwig

Hi, I am trying to interface between Java and Python in a program called Eclipse. Any insight on how to do this would be helpful. Thanks! Elise

Member Avatar for jcao219
0
113
Member Avatar for parijat24

hi , my problem isthat i have two file s with this format file 1 has two coloumns protein id geneid qqqq yyyy tttt pppp oooo llll now i have one other file as cluster file as cluster 1 : yyyy,pppp cluster 2 : llll, yyyy, . . . . …

Member Avatar for Beat_Slayer
0
90
Member Avatar for Member 785010

Hi, everyone! I'm new to python, and I'm having a few issues getting started with writing useful code on mac OSX. I'm wanting to import a module, either wx or pygtk for GUI, but in either case I get the error that there is no such module. As far as …

Member Avatar for Beat_Slayer
0
142
Member Avatar for Kanem

••••i am trying to build a clock using python where the clock is about 1/2 an earth second, it would have 11 seconds in a minute, it would have 5 minutes in an hour, and it would have 3 hours in a day. it would also have 3 months per …

Member Avatar for TrustyTony
0
143
Member Avatar for Member 784833

hey could you please help me :( (((write a function called acronym which read a file which contains words, and create an acronym by taking the first letters of the words in a phrase and making a word from t hem. Then save all acronyms to a file called myacronym.txt.)))

Member Avatar for Member 784833
0
112
Member Avatar for faby

Hello everyone, I am presently working on speech synthesis/speech to text on Ubuntu 10.04. So far I've been using festival but I discovered espeak which is also cool by reading other people's previous questions and answers. My main goal is to develop a communication system whereby festival or espeak can …

Member Avatar for fpmurphy
0
627

The End.