15,175 Topics

Member Avatar for
Member Avatar for ihatehippies

I have a shared drive that I'm trying to access from another computer on the network with a script. I keep getting IO errors(does not exist), is there a module that deals with network locations? -thanks

Member Avatar for vidaj
0
90
Member Avatar for yemu

Hi All, I've been learning python for some time, and I really like it. I used this forum many times, and found answers for many of my questions. Unfortunatelly I can't find answer for my current problem: I have two lists (both the same size) and I need to sort …

Member Avatar for vidaj
0
2K
Member Avatar for ak118

Hey guys. I'm a college student who just took a introduction to programming course for general credit. We are learning how to program with python. I am having real trouble with creating a graphical tic tac toe game. I am just a beginner and any help would be appreciated. This …

Member Avatar for tux4life
0
976
Member Avatar for gotm

So here is my program: [code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/22/09 import pdb #n is going to be equal to 4 for this queens problem. n = 4 #Assigning the empty list to initialState. initialState = [] #Making …

Member Avatar for targ
0
142
Member Avatar for nonang

New python autodidact: please help with sorting the list "weather" in python using bubble sort, insertion sort, merge sort, quick sort, and selection sort.

Member Avatar for jlm699
0
113
Member Avatar for bhanu1225

Hello all. For getting the values from text field, we use [COLOR="Red"]".get"[/COLOR] function. I would like to get all the contents from the [COLOR="Red"]text area[/COLOR]. What is the function to use.

Member Avatar for Mearah
0
93
Member Avatar for Joe Hart

Hi, This is my first post to this forum. I am just a beginner so I am not really sure what everything in my code does. Below is my python code. I would like to change the code to ask the user where the files are located and automatically update …

Member Avatar for Mearah
0
178
Member Avatar for harrykokil

hi guys.. ive tried to integrate a timer code (which works fine) into a tkinter window but im having errors. can u plz fix it 4 me? thanks. this is the code i want to integrate. [icode] import Tkinter as tk import time def start(): global count_flag count_flag = True …

Member Avatar for jlm699
0
114
Member Avatar for Straightone

My question is how do i call the variable Neotile from the main function into the Neo() function and then redefine it and return it back into the main function at the begging of the while loop so it is redefined? [code]from p2lib import * from string import * def …

Member Avatar for adam1122
0
144
Member Avatar for gotm

How come this just hangs, after debugging I found it never returns True for precondition even though it should on the very first go around....ugh!!! [code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/8/09 import pdb #n is going to be …

Member Avatar for gotm
0
140
Member Avatar for Trav580

Ok, so I just started using Python last week and I have written 4 VERY simple, non-GUI programs. This is for my intro to game physics class and I happen to be stuck on the last project until my next class. What this project is SUPPOSED to do is ask …

Member Avatar for Trav580
0
448
Member Avatar for vidaj

Hi, In my current project I'm trying to compose some objects at runtime based on a string containing the object-configuration. Based on the "Favour composition, not inheritance" pattern, but done runtime. My usecase: I have a downloader that downloads web-pages. The downloader is configured with a set of request-handlers and …

Member Avatar for vidaj
0
103
Member Avatar for guano

Dears, I am staring to learn python/wxpython in order to make an app aimed at structural geology analysis. As usual, I am starting with something simple, and after I get the way of it, make it more complex. The idea is (what I have running so far): a window with …

Member Avatar for scru
0
518
Member Avatar for daviddoria

I need to get an unknown number of file names from the command line, ie ./python MyScript.py --Files 1.txt 2.txt 3.txt [code] parser.add_option("-n", "--NumFiles", type="int", help="Number of files") parser.add_option("--Files", nargs=options.NumFiles, help="a triple") (options, args) = parser.parse_args() [/code] Clearly this will not work because options.NumFiles is not available until after parse_args() …

Member Avatar for daviddoria
0
194
Member Avatar for daviddoria

I want to parse some simple arguments from the command line. This shows all of the arguments: [code] #!/usr/bin/python import sys #print all of the arguments for arg in sys.argv: print arg [/code] but I want to handle something like [code] --file a.txt [/code] or [code] --x 12 --y 13 …

Member Avatar for jlm699
0
107
Member Avatar for mhangman

Hi, Im trying to write an irc client with python. This is its login page(i hope it will be) [CODE] #!usr/bin/env python # -*- coding: utf8 -*- import gtk, sys, socket class PyApp(gtk.Window): def con(self): iserver = self.entry.get_text() inick = self.entry2.get_text() room = self.entry3.get_text() password = self.entry4.get_text() socket.server = iserver …

Member Avatar for mhangman
0
99
Member Avatar for mitchandsuzy

hi everyone, I have searched for and answer to this and cannot find any solution. So please forgive me if it is a straight forward answer! I have a module that is imported. It has a number of subroutines inside it that need to be run, one for each year. …

Member Avatar for mitchandsuzy
0
84
Member Avatar for Buckets78

Let me start out by saying I've been playing with Python for a few weeks now, was recommended by a friend who uses Perl, and it's been quite enjoyable to play with. I've no other programming experience except HTML/CSS. This site has been a wealth of information and an excellent …

Member Avatar for Buckets78
0
84
Member Avatar for max.yevs

I'm trying to make a perfect numbers script but having almost no success... Perfect numbers are those whose factors add up to twice the number itself... factors don't have to be prime... So like the first four are 6, 28, 496, 8128... 28: 1,2,4,7,14,28 1 + 2 + 4 + …

Member Avatar for max.yevs
0
204
Member Avatar for ihatehippies

The question is in the title. How do you create a list r = range(5) and just reference the data without referencing the object itself. ie. o = r .. I just want to reference range(5) without referencing r itself. if i did o.pop(0) it likewise does r.pop(0) ...ideas?

Member Avatar for ihatehippies
0
77
Member Avatar for jmil2

I am working on a problem that requires that i create a 3x3 matrix in python using the list function. these are the functions that im required to use to create my matrix: def mlist(size): list = [] for i in range(size): list = list + [None] return list def …

Member Avatar for adam1122
0
8K
Member Avatar for ssn

Hi, I am interested in working on this project and would like to know more about this project...I am a completely newbie to Python. So I would like to know what I should study in Python and features that will be useful for this prj. Could you also explain in …

Member Avatar for vegaseat
0
109
Member Avatar for alicem

Hi, I'm a beginner, and just want to display an image using Python. I have this code... [code]from PIL import Image Image.open("pic.jpg").show()[/code] which according to what I've read, should work. However, it just opens Windows Photo Gallery and says 'There are no photos or videos selected'. I have ensured that …

Member Avatar for alicem
0
71
Member Avatar for alicem
Member Avatar for mbirame

Please see this thread to see where we are at... [URL="http://www.daniweb.com/forums/thread184723.html"]http://www.daniweb.com/forums/thread184723.html[/URL] I really don't have the knowledge to get this done, and I understand that I'm probably asking too much for someone to spend time for free on the forum finishing this project. Feel free to email me at joel …

0
60
Member Avatar for planetPlosion

I'm getting seemingly unfounded errors with this seemingly easy program.. the variables "guess" and "i" are user input [code] for guess in range (i): float(guess + float(x / guess)) / 2 print guess [/code] I'm getting: ZeroDivisionError: integer division or modulo by zero

Member Avatar for jlm699
0
152
Member Avatar for mdg583

Hello, I am relatively new in python, but I am jumping in and trying some things. I am working through how to write something like PyPanel, and am starting with PyPanel. The complicated part of that python is being extended by a custom c module, and the c module makes …

0
59
Member Avatar for daviddoria

A friend of mine said that python could be used to make simple GUIs (ie. a couple of buttons and a text box). I googled "python gui" and it looks like there are 30934 libraries to make GUIs. Is there a "standard" or "built in" one? Thanks, Dave

Member Avatar for jlm699
0
106
Member Avatar for phillip1882

im trying to write a recursive function that returns the fibonacci number, but am getting a weird result. here's my code. [code] def fibonacci(a,b,n): a =a+b b = a+b n= n-2 if n ==0: print b return b elif n ==1: print a return a else: fibonacci(a,b,n) x = fibonacci(1,1,7) …

Member Avatar for leegeorg07
0
101
Member Avatar for katamole

Hi all, Looking through the more popular visualization packages for Python, it seems like it is very difficult to specify a network with absolute length values for the edges. Example: Create 4 nodes: a, b, c, d Create edges between all nodes: a>b, a>c, a>d, b>c, b>d, c>d This is …

0
58

The End.