15,175 Topics
| |
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 | |
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 … | |
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 … | |
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 … | |
New python autodidact: please help with sorting the list "weather" in python using bubble sort, insertion sort, merge sort, quick sort, and selection sort. | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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() … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 + … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 | |
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) … | |
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 … |
The End.