Re: [Tutor] fileinput problem

2005-06-25 Thread Kent Johnson
Kevin Reeder wrote: I'm getting unexpected behaviour from this module. My script is meant to count the number of occurences of a term in one or more files. --- import sys, string, fileinput searchterm, sys.argv[1:] = sys.argv[1], sys.argv[2:] for line in fileinput.input():

Re: [Tutor] fileinput problem

2005-06-25 Thread Kevin Reeder
On Sat, 25 Jun 2005 06:41:01 -0400 Kent Johnson [EMAIL PROTECTED] wrote: You named your program fileinput.py, so when you import fileinput you are getting your own program again instead of the library module. Change the name of your program and try again. Doh! I do remember reading that

[Tutor] MineSweeper

2005-06-25 Thread Alberto Troiano
Hey Tutors I have a question I want to make a minesweeper (just for practice) but I don't what can I use to make the GUI I was thinking about buttons (click event you know) and change the background image on change Maybe there's another widget to use My doubt is that I want to be able to allow

Re: [Tutor] MineSweeper

2005-06-25 Thread Adam Cripps
On 6/25/05, Alberto Troiano [EMAIL PROTECTED] wrote: Hey Tutors I have a question I want to make a minesweeper (just for practice) but I don't what can I use to make the GUI I was thinking about buttons (click event you know) and change the background image on change Maybe there's another

Re: [Tutor] wxPython shaped window

2005-06-25 Thread Adam Cripps
On 6/25/05, Adam Bark [EMAIL PROTECTED] wrote: Is it possible to put controls into a shaped window in wxPython. I have tried putting a button on the demo and it becomes the exact size and shape of the window. Also when I tried to bind it to an action it wouldn't even start. Adam I'm

Re: [Tutor] wxPython shaped window

2005-06-25 Thread Adam Bark
Thanks for the info Adam I just seem to be having a problem with the panel size it greys out nearly all the image. Ideally I would like to make the panel transparent but I can't work out how to do that.On 6/25/05, Adam Cripps [EMAIL PROTECTED] wrote: On 6/25/05, Adam Bark [EMAIL PROTECTED] wrote:

Re: [Tutor] MineSweeper

2005-06-25 Thread Danny Yoo
On Sat, 25 Jun 2005, Alberto Troiano wrote: My doubt is that I want to be able to allow the user to put how many bombs they want and how any spaces (how big is the board) so I will have to create buttons dinamically, but in doing this the reference to the buttons will be lost How do I know

Re: [Tutor] wxPython shaped window

2005-06-25 Thread Danny Yoo
On Sat, 25 Jun 2005, Adam Bark wrote: Is it possible to put controls into a shaped window in wxPython. I have tried putting a button on the demo and it becomes the exact size and shape of the window. Also when I tried to bind it to an action it wouldn't even start. Hi Adam, You might want

[Tutor] clob and string conversion

2005-06-25 Thread Ming Xue
Hello, I am trying to access oracle9i with cx_Oracle package. One of the column is clob and when I tried clob.read() I got non-text output. I know the real data is text. Can somebodyshow me how to convert clob to string in python? Thank, Ming ___

[Tutor] Alternative File I/O for Tuples

2005-06-25 Thread Don Parris
When I pickle a SQL result into a file (ASCII mode), it lays out the data in an interesting format. When I send it to the printer, I'd like to see it arranged more like it is on the console screen - in tabbed columns. None of the tutorial type stuff I've seen even mentions printing files, or

Re: [Tutor] clob and string conversion

2005-06-25 Thread Danny Yoo
On Sat, 25 Jun 2005, Ming Xue wrote: I am trying to access oracle9i with cx_Oracle package. One of the column is clob and when I tried clob.read() I got non-text output. I know the real data is text. Can somebody show me how to convert clob to string in python? Hi Ming, This seems really

Re: [Tutor] Alternative File I/O for Tuples

2005-06-25 Thread Danny Yoo
I would like to see something more like when the file is printed: AustinJames704-111-1234 AustinJanet704-111-1234 etc. Is this a simple task, or am I jumping into deep water? :) Hi Don, Not too bad; I think you'll looking for String Formatting:

Re: [Tutor] Alternative File I/O for Tuples

2005-06-25 Thread Danny Yoo
In your example, it looks like every row is ten characters long. A ^^^ Hi Don, Gaa, that's why I'm so bad at matrix math. I meant column, not row. Sorry about that. ___ Tutor maillist - Tutor@python.org