15,406 Topics

Member Avatar for
Member Avatar for OutOfReach
0
97
Member Avatar for vocalstud69

I was wondering how Python would work with this program I wanted to make. I have very little experience with Python, so bare with me. What I wanted was to make a program that brought up quotes randomly from a .txt file and put them in a XP/Vista message bubble …

Member Avatar for zachabesh
0
3K
Member Avatar for jancho1911

Hi ! I am new to DaniWeb. I searched everything to find an answer but i can't. This is for my final project and i need it to get my bachelor degree. I have a text file that has this type of files: 2001.7.1.407 изутрината во тетовски 2003.5.3.20083 кзк ја …

Member Avatar for zachabesh
0
145
Member Avatar for TheNational22

I have a problem. I have a csv that stores data about checks in a private restaurant . Not CC's or anything, just table number, items, server number, blah. It repeats for every check a four lines that start with 1,4,5,6,7. I have a interface that picks up this csv …

Member Avatar for zachabesh
0
92
Member Avatar for s_jmp

how do i login to site and stay logined?( i meant logged in) fore example i have a htm file with a text box named stxt that sends the form to a php file called login.php AND ALL OF THIS IS WITH POST METHOD and when i logged in i …

Member Avatar for s_jmp
0
97
Member Avatar for Stefano Mtangoo

Hi all, Im very New to My SQL and have done alot of googling and simple studies. I have two Questions: 1. Where can I start with Complete no knowledge of MySQL and databases in general (though i know a little) 2. I have tried to play with MySQL for …

Member Avatar for Shanti C
0
79
Member Avatar for regomodo

Hi, i have a major issue in program and i cannot figure out why. It is an image stacker which averages, brightens, darkens multiple images to a single image. When i call function self.saveFile() straight after the program has started, it acts as it should. I can specify a new …

Member Avatar for regomodo
0
349
Member Avatar for vistovistor

Hello daniweb, This is my first post, and coincidentally my first program! (more like a script though I am told) At my work there is a lot of programmers, unfortunately they do not like Python. I cannot agree with their sentiment! It is my first language (computer wise) and so …

0
67
Member Avatar for mm013

Hi, I am a newbie in python, and i am currently using py2exe in Windows and python 2.5 platform. The problem is, my python code is residing in several subdirectories (1 folder for images, 1 for other .py files etc). Now, I would like to use py2exe to create an …

Member Avatar for mm013
0
321
Member Avatar for samjeba

here is the code i am trying to read ascii value which is string and print , but execution stops at file open file print statement :( [code] import os import sys import string filename = "c:\\test.exe" try: f = open(filename,"rb") except IOError: print'cannot open the file' sys.exit(0) print'file is …

Member Avatar for woooee
0
97
Member Avatar for alc6379

Thanks to Dani for adding Python to the scripting languages category! ...I haven't heard many people mention Python around here... Am I the only Python fan here? I know its usage isn't as widespread as Perl, but it is, IMHO, as powerful and useful as Perl, for general scripting, web …

Member Avatar for ZZucker
0
526
Member Avatar for vic huebner

I'm attempting to learn wxPython by writing a card game. After reading the excellent tutorials here as well as wxPython in Action, I still don't know how to put over-lapping objects in the right order. The biggest problem is in correctly stacking playing card images (StaticBitmaps) as in PySol. It …

Member Avatar for ZZucker
0
95
Member Avatar for zachabesh

Scenario: I have 2 scripts. One is an ftp program that takes a list of files and downloads them. The other is a simple program that takes one file and copies it to another directory. What I want to do: When the ftp program finishes with one file, I want …

Member Avatar for zachabesh
0
83
Member Avatar for fake-name

Ok... I'm working on a program that takes ISBN numbers, grabs data on them from ISBNdb.com and sticks said data into a database. At this point, I've successfully managed to get the ISBN XML file from isbndb.com, but whenever I try to feed it into SAX, it seems to try …

Member Avatar for jlm699
0
341
Member Avatar for dinilkarun

we are able to query successfullu from a Column called "ParentUUD" (without space) using query "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 are getting error.I think the error …

Member Avatar for LEwen
0
340
Member Avatar for lumeniel

Hello, everyone the follow error shows when i try run my code if (i==2): width = line[0,3] TypeError: string indices must be integers The code of error is this [CODE] for line in fl: i += 1 if (i==2): width = line[0,3] elif (i==3): frames = line[1,1] elif (i>3): append(array_color, …

Member Avatar for lumeniel
0
89
Member Avatar for bpacheco1227

I am a beginner with VB, I'm coming from C++. When I compile and test the program the base pay textbox changes to 0, gross pay textbox to 0 and the total deductions turns to 0.25. For the life of me I can't figure out why. My little experience with …

Member Avatar for bpacheco1227
0
185
Member Avatar for db_ozbecool

1. Does Python have some built in [B]statistical functions [/B]- eg. like PERCENTILE, Root Mean Square etc ? I tried Python help and the web, to no avail. I checked standard Python maths functions and could not find anything too. If there is nothing built in then is there a …

Member Avatar for woooee
0
164
Member Avatar for scott212

I'm building a site and attempting to do everything I used to do in PHP in Python (what can I say, I just like it better!). There are a couple of scenarios that I don't quite understand, however. Such as: 1. If my plain ol' Python page is called from …

Member Avatar for [Wacky]
0
116
Member Avatar for iamthwee

I am using xls2csv.py from the module pyExcelerator in python but there appears to be a bug in it. [url]http://www.daniweb.com/forums/thread144178.html[/url] [code] #!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Kiseliov Roman __rev_id__ = """$Id: xls2csv.py,v 1.1 2005/05/19 09:27:42 rvk Exp $""" from pyExcelerator import * import sys …

Member Avatar for iamthwee
0
107
Member Avatar for Stefano Mtangoo

Hello all, Please review these two piece of code and see why the latter doesnt resize as desired. When I add panel I find result becomes very strange. How can I resize widgets in a panel without such problem? Below are the two codes for simple editor PROBLEMATIC CODE [CODE] …

Member Avatar for Stefano Mtangoo
0
78
Member Avatar for fordprefect

Hi all! I'm a complete pyhthon n00b and I'm trying to execute an external command from within my python script. For this I use the subprocess module. Here is all the relevant code: [code]class PipeThread(threading.Thread): def __init__(self, fin): self.fin = fin self.sout = "" threading.Thread.__init__(self) def run(self): self.sout = self.fin.read() …

Member Avatar for rajatdudeja
0
229
Member Avatar for massivefermion
Member Avatar for pravdexter

Hi, I want to Access the device manager of remote machine through python program. The actions which I want to do with the program is Update Driver, Disable, Uninstall So please help me with in this regard if possible.

Member Avatar for Ene Uran
0
278
Member Avatar for massivefermion

is it possible to make python executable files that can be run on any platform?(without python.like c++) thanks

Member Avatar for lllllIllIlllI
0
76
Member Avatar for lllllIllIlllI

Hi guys I have been making a program over the last few days that grabs an image and re-paints it in paint in 256 colour. The main thing this program is for is so you can watch it getting painted in paint. It works perfectly on my computer but i …

Member Avatar for lllllIllIlllI
0
371
Member Avatar for lllllIllIlllI

Hey everyone I am interested in learning Pygame as a GUI that is suited to making games and i was wondering if it was worth it? My question is, is it good for anything else than games or animations?

Member Avatar for Ene Uran
0
110
Member Avatar for tomtetlaw

i was busily typing away one day for my text game when i decided that i wanted to test it so i tried to run it and it came up highlighting the first print in the section below can someone please help me? [CODE=python]choice = raw_input("Look around or go back …

Member Avatar for tomtetlaw
0
64
Member Avatar for massivefermion

Hi guys and gals I wrote someting like this: [CODE]s1=s2=0 p=[] for x in range(200,250,1): for d in range(2,x): if x%d==0: s1=s1+x/d for d in range(2,s1+1,1): if (s1+1)%d==0: s2=s2+(s1+1)/d if (s2+1)==x: p1.append((x,s2+1)) print p[/CODE] but when i interpret\compile it,it prints an empty list thanks in advance

Member Avatar for massivefermion
0
94
Member Avatar for OutOfReach

Ok I'm making a program in PyQt and when I call [code=Python]os.path.join("~/", "otherdirectory")[/code] It gives me: [code=Python]File '/usr/lib/python2.5/posixpath.py', Line 62, in join: elif path == ' ' or path.endswith('/'): Attribute Error: endswith [/code] I don't know what is causing this. :S Any help would be appreciated!

Member Avatar for OutOfReach
0
289
Member Avatar for AndrejM.

Hi all. I've done some bit of programming in the past, mostly in python and some C aswell. (I can still remember that "C for dummies book" hehe). I'm trying to get started with some anticheat software, of course I'll start with some easy methods first before trying anything more …

Member Avatar for ArkM
0
175
Member Avatar for Caiterz

Ok in the journal community, livejournal, you are limited to 1000 tags. THey decided to do this randomly after i accumulated more than 1000 tags. So I want to merge tags.. there is only one script out there. (LJ themselves dont support merging) [url]http://community.livejournal.com/lj_nifty/156195.html[/url] - the EXE [url]http://community.livejournal.com/lj_nifty/155984.html[/url] - the …

0
55
Member Avatar for CostaRica

Hi. I have been trying really hard to make a CRUD app with a wx.grid.PyGridTableBase-based wx.grid.Grid that takes its data from a resultproxy of the SQL Expression Language of SQLAlchemy from a MySQL database table, but the problem I have is that I have to convert the resultProxy to a …

Member Avatar for sneekula
0
88
Member Avatar for jimjag

Hey I'm having a problem with an attribute error that i was wondering how to fix the code I have is [CODE] import pygame pygame.init() #---------------------------------------------------------------------------------------------------------------------------------------------# """ This is the small box which the players will be able to stand on""" class Ground(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface((768, 18)) …

Member Avatar for sneekula
0
163
Member Avatar for tomtetlaw

I was writing a text adventure in python and i ran into a "NameError: name 'military' is not defined" error and i need help, heres the code this is the part with the prob: [code=python] choice = raw_input("Pick your civ:") if choice == military: [/code] thnx for your time -- …

Member Avatar for tomtetlaw
0
108
Member Avatar for lllllIllIlllI

Hi guys Im pretty new to java after programming with python for about a year i thought i'd give it a go. I did have a quick question though. How would i check for membership in a string. For example [code=java] String str1="Hello world"; String str2 = "world"; [/code] Is …

Member Avatar for peter_budo
0
101
Member Avatar for anderson

I am writing an application using python to display a FITS image file. I am using pythoncard to build GUI for my application.I can display image files in jpeg, .png, etc . but I am not able to dispaly FITS image in the same application...I donot understand why I am …

Member Avatar for anderson
0
277
Member Avatar for trihaitran

I am trying to write a web scraper and am having trouble accessing pages that require authentication. I am attempting to utilise the mechanize library, but am having difficulties. The site I am trying to login is [url]http://www.princetonreview.com/Login3.aspx?uidbadge=[/url] user: [email]bugmenot2008@yahoo.com[/email] pass: letmeinalready Previously I did something similar to another site: …

0
74
Member Avatar for LexiK

Hey Hey everyone :) I need some serious help with writing this game. Its called Nine Men's Morris! If some one has any idea how to write it, or possibly has the code for it. PLEASE PLEASE LET ME KNOW!!! You will be a life saver!!!! Thx Lexi

Member Avatar for jlm699
0
1K
Member Avatar for hardik.38

Write a program that uses loops to generate table where each cell equals the number in the column divided by the number in the row. The maximum column and row numbers are specified by the user. The following table results when the user specifies 3 as the maximum column and …

Member Avatar for jlm699
0
97
Member Avatar for Dekudude

Hi there! First off, let me say I HAVE Googled the subject, but all provided functions... didn't work. Simply put, I want a function that closes my Python script, and then reopens it. I tried making my own, which would open the same file, sleep 2 seconds, and then close, …

Member Avatar for mathijs
0
3K
Member Avatar for pocnib

I know this is a homework question, but I have reached the end of my rope and really need guidance. I have had four years of Java programming then walked into my CS 3 class and was given an assignment in python. I have never worked in Python before but …

Member Avatar for pocnib
0
165
Member Avatar for lumeniel

Hello I have a problem that I can't understand. This errror return when I try to compile: name 'image_name' is not defined. This is my code: [CODE] def LoadImage(image_name): file_name = self.clssSnc.sprites[slf.clssSnc.stat] if self.clssSnc.stat == 0: file_name = self.clssSnc.spritesi[slf.clssSnc.stati] #carrega a imagem do cenário ou do personagem fl = None …

Member Avatar for lumeniel
0
729
Member Avatar for random7

Hi, everyone I have a question about reading column data from file. helium.dat He 1.31 He 1.32 He 1.39 He 1.41 He 1.38 He 1.39 He 1.21 He 1.45 He 2.31 I want to print just the 2nd column data(number) from helium.dat like below 1.31 1.32 1.39 1.41 1.38 1.39 …

Member Avatar for hardik.38
0
237
Member Avatar for Zelores

Hey guys, So I finished my first year of college. I'm taking computer science, or well tiring to. My first programming class (python) wasn't to bad. The next class was java and well... I failed the class.... badly. Was it hard for you guys to learn programming for the first …

Member Avatar for Zelores
0
165
Member Avatar for csm_tC

I have searched the forums and could not find a direct answer to my question, it's probably too simple and i'm over looking something. It's my first day with Python, I'm in the process of developing a program that converts a given float integer into a variety of different things. …

Member Avatar for Shadow14l
0
263
Member Avatar for s_jmp

hi all, i have loaded a dll with stypes.cdll and i want to get thta dll's parameters and method like when you write: <'the dll handle'>. and just after you put the dot a list appears to show you the methods or like when you get a dir() from a …

0
76
Member Avatar for charn66

Hi. I'm very new to this field. I have had a computer for about 10 years, and now I am studying IT at Tafe (college). I am majoring in Help Desk Support. I stumbled upon this site as I was looking for Python Commands. lol. From what I have seen …

0
14
Member Avatar for scru

I'm using [B]pygtk[/B] and [B]glade[/B]. I built the UI using glade and I loaded it using the gtk.Builder. Now, I'm trying to retrieve the a menu item using gtk.Builder.get_item() so that I can update the submenu, but it returns a gtk.Action object. There seems to be no way for me …

0
69
Member Avatar for dr_hamburger

hello guys... i have a bit of a problem with my assignment im working on :( what the problem is there is a function which accepts a string, a keyword and an array of keywords to replace the keyword occurrences with for eg, def function(text, keyword, keyword_list): and for eg, …

Member Avatar for woooee
0
503

The End.