Re: [Tutor] Variables and Functions

2007-11-29 Thread Alan Gauld
"Devon MacIntyre" <[EMAIL PROTECTED]> wrote > input their own numbers to fill in the board. My problem is that I > can't get > the variables 'puzzle' and 'new_puzzle' into that function (to be > compared) > because they are not globally defined; only in 'new_sudoku' > function. Here's > some se

Re: [Tutor] [wxPython-users]How to avoid the traces of frame or panelwindow

2007-11-29 Thread Alan Gauld
"Varsha Purohit" <[EMAIL PROTECTED]> wrote > I created a simple frame, but when i move the frame or any > panel > window i get traces of the windows all over which makes the screen > look > shabby. How can i avoid getting them ? sample code for a panel is > # simple.py > > import wx >

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-29 Thread Alan Gauld
"Don Taylor" <[EMAIL PROTECTED]> wrote > I have this code: > > import webbrowser > webbrowser.open("file:///D:/EclipseWS/XML-RPCTesting/webbrowser.htm?open=8001") > > when executed it does bring up the web-page ok, but the parameter > (?open=8001) is lost. If I try the same thing with an http url

Re: [Tutor] Grid Manager Positioning

2007-11-29 Thread Alan Gauld
"Johnston Jiaa" <[EMAIL PROTECTED]> wrote > big_frame = Frame(root) > big_frame.grid(sticky=W+E) > > left_frame = Frame(big_frame) > left_frame.grid(row=0, column=0, sticky=W) > > right_frame = Frame(big_frame) > right_frame.grid(row=0, column=1, sticky=E) > > Supposing the root window is wider th

Re: [Tutor] Grid Manager Positioning

2007-11-29 Thread Johnston Jiaa
> > Presumably because big_frame is narrower than root. > The inner frames will only go as far as the border of big_frame. Well, with my code, I made bg="blue" so I see that it's big enough, and the big_frame stretches to fit inside root if i use sticky=W+E. > Use pack(side= expand="true" )

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-29 Thread Don Taylor
Alan Gauld wrote: > What are you using for the XML-RPC server? Doesn't that need to be a > web server of some sort anyhow? XML-RPC communicates using http... > I am using simpleXMLRPCServer. Yes, XML-RPC does use http as its transport protocol, but it does not have to run in the context of a

Re: [Tutor] Starting a browser instance and passing a parameter toit.

2007-11-29 Thread Alan Gauld
"Don Taylor" <[EMAIL PROTECTED]> wrote > Yes, quite possibly. Just for fun, I am experimenting with ways to > build portable desktop GUI applications - where portability includes > independence from window managers. I am trying to use a browser as > the > window manager for a (Python) applicat

Re: [Tutor] Grid Manager Positioning

2007-11-29 Thread Alan Gauld
"Johnston Jiaa" <[EMAIL PROTECTED]> wrote > I heard that it's not good to mix grid and pack positioning? And I > already wrote it in grid. You can't mix them within a Frame but provided you are operating in different frames you can (and should!) choose whichever is most appropriate for that Fram

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-29 Thread Richard Querin
On Nov 27, 2007 5:40 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > This is a two-liner using itertools.groupby() and operator.itemgetter: > > data = [['Bob', '07129', 'projectA', '4001',5], > ['Bob', '07129', 'projectA', '5001',2], > ['Bob', '07101', 'projectB', '4001',1], > ['Bob', '07140', 'pr

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-29 Thread Kent Johnson
Richard Querin wrote: > import itertools, operator > for k, g in itertools.groupby(sorted(data), key=operator.itemgetter(0, > 1, 2, 3)): > print k, sum(item[4] for item in g) > > > > I'm trying to understand what's going on in the for statement but I'm > having troubles. The i

Re: [Tutor] Starting a browser instance and passing a parameter toit.

2007-11-29 Thread Don Taylor
Alan Gauld wrote: > Have you considered writing a small Java applet (maybe using Jython to > do so?) > that could communicate with the Javascript and send the XML-RPC stuff > to > your server? > Well, I am on a Procrustean bed here - Java is not available on one of my target platforms. > In

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-29 Thread Kent Johnson
Don Taylor wrote: > Alan Gauld wrote: > >> What are you using for the XML-RPC server? Doesn't that need to be a >> web server of some sort anyhow? XML-RPC communicates using http... >> > > I am using simpleXMLRPCServer. Yes, XML-RPC does use http as its > transport protocol, but it does not hav

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-29 Thread Eric Brunson
Kent Johnson wrote: > Don Taylor wrote: > >> Alan Gauld wrote: >> >> >>> What are you using for the XML-RPC server? Doesn't that need to be a >>> web server of some sort anyhow? XML-RPC communicates using http... >>> >>> >> I am using simpleXMLRPCServer. Yes, XML-RPC does use http a

Re: [Tutor] Starting a browser instance and passing a parameter toit.

2007-11-29 Thread Don Taylor
Don Taylor wrote: > > First is to construct the apps opening web-page on the fly in the > XML-RPC server before the server instantiates the page. I can generate > some custom Javascript in this page that has the port number embedded > within it. Then the Javascript can store it in a cookie o

[Tutor] parsing a continuous log file

2007-11-29 Thread ray sa
Hello I need some help. I am working with a program that dumps a continuous file while the program is running. This file contains loads of information and I am only looking for a small amount of the data. I have written the program below: import re,os fopen = open("c:\\data.txt",'r') lines =

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-29 Thread Don Taylor
Kent Johnson wrote: > I can't decide if this is brilliant or crazy or both :-) Definitely crazy, but I hope both. In addition, I want to be able to run these apps on a Nokia Internet Tablet... > > I guess what you get from XMLRPC is an almost-free way to expose > functions to the browser. Y

[Tutor] (no subject)

2007-11-29 Thread enter_weirdman
- Get the freedom to save as many mails as you wish. Click here to know how.___ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-29 Thread Don Taylor
Eric Brunson wrote: > Definitely, or even just CGIHTTPServer. > No, I don't think so. I am not a RESTafarian. :-) Don. ___ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Starting a browser instance and passing a parameter to it.

2007-11-29 Thread Eric Brunson
Don Taylor wrote: > Eric Brunson wrote: > > >> Definitely, or even just CGIHTTPServer. >> >> > > No, I don't think so. I am not a RESTafarian. :-) > Forgive my inexperience with the SimpleXMLRPCServer, but I didn't think it provided state any more than any other connection oriented

Re: [Tutor] parsing a continuous log file

2007-11-29 Thread Alan Gauld
"ray sa" <[EMAIL PROTECTED]> wrote > used in UNIX called the tail command. > > May be someone can help me to achieve the same result with modifying > the above code? Sorry i didnm't look too closely but i think you should only need to keep the file open andd then loop around with a delay. Som

Re: [Tutor] parsing a continuous log file

2007-11-29 Thread Michael H. Goldwasser
The for loop below will exit once it hits EOF (and will not continue if more data is later appended. But as Alan says, a while loop will suffice. I've tested the following variant. import time f = file('foo.txt') while True: line = f.readline() if line: print "do what you want

[Tutor] Ruby on Rails course at Foothill College

2007-11-29 Thread Elaine
If you would like to get an introduction to web application development with Ruby on Rails, Foothill College in Los Altos Hills, CA is offering a course starting Tues. evening, January 8th, 2008, at 6pm. The course is designed for students who are already familiar with web application development