14,947 Topics

Member Avatar for
Member Avatar for peaceofmind

hi :) i have problem with opening ".py" files in my web server this is the source code: [code] import string,cgi,time from os import curdir, sep from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class MyHandler(BaseHTTPRequestHandler): def do_GET(self): try: if self.path.endswith(".html"): f = open(curdir + sep + self.path) #self.path /index.html self.send_response(200) self.send_header('Content-type', 'text/html') …

Member Avatar for peaceofmind
0
507
Member Avatar for Micko

Hello, I've just read thread why I should lear python and I must admit that I'm very interestwed to learn oppython myself. i have experience with C and C++ programming language. If I understood corectly Python is an interpreted language. What is advantage of interepreted languages (if there are any)? …

Member Avatar for vegaseat
0
301
Member Avatar for luxnova

[FONT=Fixedsys]Hi it's me again, I want to know how to make a new directory containing my python script. Also, how do I make the new directory containing my python script into the current directory? Just for you to know, I installed the newest version of Python which is Python 2.4.1 …

Member Avatar for vegaseat
0
137
Member Avatar for luxnova

Hey I'm a new member here. I just need some help. I need help with setting the path for python. I must set a path in Windows to the directory where the Python.exe is located so that I can execute Python script. I need to get the directory containing the …

Member Avatar for vegaseat
0
289
Member Avatar for danizzil14

As I said before im new to python and stink at math(great combination huh?) Well I've looked at Thinking in Tkinter but I still don't fully understand the concept of classes. Could you provide any help\tutorials on this subject? Help Appreciated :cheesy:

Member Avatar for vegaseat
0
151
Member Avatar for mccarthp

Python Version: 2.1 Platform: HP Windows XP I am using Python scripts generated by ArcGIS/ModelBuilder in order to automate geoprocesses. Currently I am calling a series of scripts from a batch file that is called by the task scheduler. My problem is if there is an error the process stops, …

Member Avatar for mccarthp
0
202
Member Avatar for shanenin

I wrote simple python program that rips, encodes, and gets song data from the cddb. I would like to give the user the option of customizing it to there taste. So I want to make a config file that I can store in /etc(linux fiel location). for example it would …

Member Avatar for shanenin
0
262
Member Avatar for danizzil14

Ok new problem, I want to build off of a program I saw in a tutorial that has a "menu" and can calculate two different shapes. The two shapes are circle and rectangle. I've built it into a working order.(event bindings, buttons, area calculation programs) The program works all the …

Member Avatar for vegaseat
0
174
Member Avatar for danizzil14

Ok I've gotten py2exe because I have friends that want to test my programs, but they don't want to download the python program. Well I have tried to run the compiler out of MS-DOS and the Python version of MS-DOS. But every time I wind up with an error. I …

Member Avatar for vegaseat
0
161
Member Avatar for G-Do

Hi all, Here's one that has me stumped. I'm trying to build a system shell with a Tkinter GUI in Python, and I can't figure out what to do with one of the widgets. Here's the program concept: I have two major widgets: a ScrolledText widget and an Entry widget. …

Member Avatar for G-Do
0
2K
Member Avatar for nephish

Hey there, i have been writing python scripts for about 4 months now so i am still very new at programming. that said, i need to build a gui app to handle some data manipulation from a database, set points, etc... what i would like is the easiest to learn …

Member Avatar for nephish
0
206
Member Avatar for nephish

Hey there, i have some python scripts that run with the cgi-module. all named whatever.py the thing is, firefox will open one that has a form on it, but not load the next one in line. it pops up a window that says what do you want me to do …

Member Avatar for nephish
0
169
Member Avatar for shanenin
Member Avatar for vegaseat
0
251
Member Avatar for shanenin

I have been trying to make a class based on Tk(). My code is such a mess, I would be embaressed to show you what I came up with. Here is what I am trying to do [code] class Window(Tk): fill in the code here win = Window() win.mainloop() [/code] …

Member Avatar for vegaseat
0
335
Member Avatar for shanenin

I have been messing around with some scripts, and would soon like to start making a few gui apps. I plan on using either tkinter, or possibly pygame, or pygtk. Are there modules already built that will allow you to browse graphically? for instance, choosing a file, or directory, using …

Member Avatar for vegaseat
0
163
Member Avatar for shanenin

I am having a tough time understanding what is going on in this following code [code=python] class Player(object): """ A player in a shooter game. """ def blast(self, enemy): print "The player blasts an enemy.\n" enemy.die() class Alien(object): """ An alien in a shooter game. """ def die(self): print "The …

Member Avatar for Walrus Bites
0
260
Member Avatar for bumsfeld

Is there a way to get the day of the week when supplied with a date? Like November 11, 1911 may be a Monday?

Member Avatar for vegaseat
0
221
Member Avatar for zauber

Hello, I started coding a little app for exploring the mandelbrot fractal. Hopefully someone here is familiar with it, and perhaps tried coding it in python. My problem is, as you will see if you try running my code, is that the generated image is NOT the mandelbrot (although it …

Member Avatar for vegaseat
0
148
Member Avatar for reezin14

I was wondering if anyone knows if any Python books that are availible,and where I might be able to purchase them?

Member Avatar for shanenin
0
248
Member Avatar for Walrus Bites

I have looked through the forums for this and found several hits but none of them truly answered my question. How can I make a Python program an executable file that does not require my friends to have Python installed on their computers?

Member Avatar for shanenin
0
261
Member Avatar for fanfan1313

Is there any place where you can find a complete list of python commands? I have googled and skimed through the tutorial and I can't find any place where I can find a complete list of python commands and examples on how to use them? If there isn't one I …

Member Avatar for fanfan1313
0
191
Member Avatar for mattd2

Hello, I got my last issue resolved, working great thanks to you guys. I have a wide variety of date formats that I need to parse into this format: MM/DD/YYYY HH:MM:SS (a mysql DATETIME type value).. I have tried: [code]post_date = time.strftime("%Y-%m%d %H:%M:%S", i.issued)[/code] However, this gives me: [code] Traceback …

Member Avatar for vegaseat
0
1K
Member Avatar for mattd2

Hello, This is my first python script, so I could use a little bit of help here. :) I'm using the 'Universal Feed Parser' ([url]http://feedparser.org/)[/url], and I have a list of feed URLs in a database which I would like to pull out and go through each of them. I …

Member Avatar for mattd2
0
309
Member Avatar for madgokuss4

I have just started getting into python and so far it's all been very interesting and the help good to, but now i have ran into a problem. I'm sure it's very easy to solve but i just can't seem to figure it out or find anything on the web. …

Member Avatar for vegaseat
0
140
Member Avatar for G-Do

Hi, I'm writing a client program that downloads data from an HTTP server via urllib, like so: [CODE]ufile = urllib.urlopen(urlstring) text = ufile.read() # Do stuff with text[/CODE] Nice and simple. Unfortunately, the server only accepts requests with a session ID embedded inside - and I don't know how to …

Member Avatar for G-Do
0
241
Member Avatar for peaceofmind

hi :) I need some help for this script I have -------------------- [CODE]cursor = conn.cursor() cursor.execute("select * from playlist limit 5") result = cursor.fetchall() # iterate through resultset playlist_txt = '' for record in result: mp3id = record[0] mp3_title = record[1] mp3_artist = record[2] playlist_txt += mp3id + mp3_title + …

Member Avatar for peaceofmind
0
203
Member Avatar for shanenin

I have been reading through the "python library reference" with no luck finding the module needed to copy a file. Any help would be appreciated.

Member Avatar for shanenin
0
243
Member Avatar for shanenin

I need root privledges to do some stuff in my python script. I am currently using this technique [php] current_user = os.geteuid() if current_user != 0: print "you need to be root to run this script" sys.exit()[/php] this will at least polietly end the script so i am able to …

Member Avatar for vegaseat
0
295
Member Avatar for danizzil14

Hello Everyone! My question is simple, where are any half decent tutorials out there? I mean, all of the ones I've tried have only skimmed the surface(print, name = raw_input yah know things like that)- or were way to complicated. I've only been doing this for something like a week

Member Avatar for danizzil14
0
144
Member Avatar for Flinch

Hello, I am relatively new with Python and Pygame, however, I am an experienced PHPer, so programming isn't something new to me. My problem is this: I got Python 2.4 installed and Pygame 1.6 for Python 2.4 installed. I know Pygame works because I can make calls to the Pygame …

Member Avatar for vegaseat
0
716

The End.