[Tutor] Confusing Unicode Conversion Problem.

2006-12-12 Thread Chris Hengge
I've got a script that uses com to read columns from an excel workbook(very slow for 6500ish items :/ ) and I'm getting this error: 'ascii' codec can't encode character u'\xa0' in position 11: ordinal not in range(128) Error with: FRAMEMRISER of type: Excel Row : 6355 FRAMEMRISER is exactly ho

[Tutor] Organizing 15500 records, how?

2006-12-12 Thread Thomas
I'm writing a program to analyse the profiles of the 15500 users of my forum. I have the profiles as html files stored locally and I'm using ClientForm to extract the various details from the html form in each file. My goal is to identify lurking spammers but also to learn how to better spot spamm

Re: [Tutor] Accessing the name of a Function

2006-12-12 Thread Carroll, Barry
Andreas: You're right, that is kind of messy and somewhat limited. In the present case, however, it is the function's defined name that I want, so this would work okay. I'm guessing that there is a way to determine the number and names of the arguments to the function as well. I'll go look at

Re: [Tutor] Getting the directory the program is in

2006-12-12 Thread Andreas Kostyrka
* Laszlo Antal <[EMAIL PROTECTED]> [061212 18:12]: > Hi, > > I use this: > > # This is the file name this code is in > curfile = "findcurdir.py" > #__file__ gives everything so slice off the file name > curdir = __file__[:-len(curfile)] > print curdir > #will print the curdir the file is in > #ev

Re: [Tutor] Accessing the name of a Function

2006-12-12 Thread Andreas Kostyrka
* Carroll, Barry <[EMAIL PROTECTED]> [061212 23:54]: >Greetings: > > > >Is it possible, from inside a stand-alone function (not a member of a >class), to access the string representation of the function's name? If >so, how? Probably, but it's dirty like help (sys._getframe would

[Tutor] Accessing the name of a Function

2006-12-12 Thread Carroll, Barry
Greetings: Is it possible, from inside a stand-alone function (not a member of a class), to access the string representation of the function's name? If so, how? Regards, Barry [EMAIL PROTECTED] 541-302-1107 We who cut mere stones must always be envisioning

Re: [Tutor] Opening a pdf on a certain page

2006-12-12 Thread Dave Kuhlman
On Tue, Dec 12, 2006 at 04:00:29PM -, Tim Golden wrote: > [Toon Pieton] > > | Is there anyway to open a .pdf at a certain page? Been > | searching the internet, but couldnt find anything. > > Pretty certain there isn't. Even if you'd generated the > PDF yourself and set an internal anchor th

Re: [Tutor] How to allow user to choose an option from a window

2006-12-12 Thread Jason Massey
If you mean which type of GUI model to use you have at least two popular choices. Tkinter: It's bundled with Python, and there's a tutorial at: http://www.pythonware.com/library/tkinter/introduction/ wxPython: My GUI of choice. http://wxpython.org A quick and dirty example in wxPython of what y

Re: [Tutor] Opening a pdf on a certain page

2006-12-12 Thread Tim Golden
[Dave Kuhlman] | On Tue, Dec 12, 2006 at 04:00:29PM -, Tim Golden wrote: | > [Toon Pieton] | > | > | Is there anyway to open a .pdf at a certain page? Been | > | searching the internet, but couldnt find anything. | > | > Pretty certain there isn't. Even if you'd generated the | > PDF yoursel

Re: [Tutor] User identification and running in the background.

2006-12-12 Thread Tim Golden
| I've had a quick scan around and can't find a way to identify the user | who is logged in on the machine while a script is running? I've seen a | few mentions of it being possible using bits of the win32 library but | I would have liked my software to be portable with no adjustments. | | How can

Re: [Tutor] Getting the directory the program is in

2006-12-12 Thread Laszlo Antal
Hi, I use this: # This is the file name this code is in curfile = "findcurdir.py" #__file__ gives everything so slice off the file name curdir = __file__[:-len(curfile)] print curdir #will print the curdir the file is in #even if this file(module) has been imported I hope it helps Laszlo Antal

Re: [Tutor] getting all txt files in a folder

2006-12-12 Thread Kent Johnson
Toon Pieton wrote: > Hey friendly users, > > Is there any way to get all the txt files in a certain folder and all of > its "sub"-folders? With sub-folder I mean all the folders inside the > previously found folder. Any help would be greatly appreciated Using the path module from http://www.jo

Re: [Tutor] getting all txt files in a folder

2006-12-12 Thread Simon Brunning
On 12/12/06, Toon Pieton <[EMAIL PROTECTED]> wrote: > Is there any way to get all the txt files in a certain folder and all of its > "sub"-folders? With sub-folder I mean all the folders inside the previously > found folder. Any help would be greatly appreciated http://aspn.activestate.com/ASPN/Co

[Tutor] How to allow user to choose an option from a window

2006-12-12 Thread Urban . Landreman
I'm trying to allow a user to select one option from a list. My simple code works: OptionList = ['One', 'Two', 'Three'] while 1: print 'Here are your options:' for option in OptionList: print option optionChosen = raw_input("Which one do you want? ") if optionChosen in OptionList:

Re: [Tutor] getting all txt files in a folder

2006-12-12 Thread Tim Golden
[Toon Pieton] | Is there any way to get all the txt files in a certain folder | and all of its "sub"-folders? With sub-folder I mean all the | folders inside the previously found folder. Any help would be | greatly appreciated Have a look at os.walk and fnmatch TJG _

Re: [Tutor] Opening a pdf on a certain page

2006-12-12 Thread Tim Golden
[Toon Pieton] | Is there anyway to open a .pdf at a certain page? Been | searching the internet, but couldnt find anything. Pretty certain there isn't. Even if you'd generated the PDF yourself and set an internal anchor there doesn't seem to be a URI which will jump to that point. I'd be really

[Tutor] getting all txt files in a folder

2006-12-12 Thread Toon Pieton
Hey friendly users, Is there any way to get all the txt files in a certain folder and all of its "sub"-folders? With sub-folder I mean all the folders inside the previously found folder. Any help would be greatly appreciated Greetings, Toon Pieton ___

[Tutor] Opening a pdf on a certain page

2006-12-12 Thread Toon Pieton
Hey friendly users, Is there anyway to open a .pdf at a certain page? Been searching the internet, but couldnt find anything. Thanks in advance, Toon Pieton ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] User identification and running in the background.

2006-12-12 Thread Wesley Brooks
Good morning Users, I've had a quick scan around and can't find a way to identify the user who is logged in on the machine while a script is running? I've seen a few mentions of it being possible using bits of the win32 library but I would have liked my software to be portable with no adjustments.