[Tutor] i++

2007-06-05 Thread scott
Hi, is there any way in Python to simply add or subtract one from a variable like i++ or i--? I don't mind doing a i = i + 1, but would prefer something more simple and faster. -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty

Re: [Tutor] i++

2007-06-05 Thread scott
stions before I finish this project. -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) #!/usr/bin/env python '''This is a program to manage a PBEM EnGarde game using we=custom rules''' def mfile_read(): '

Re: [Tutor] i++

2007-06-05 Thread scott
nd before going on. If you have more > questions, please feel free to ask the list. Thanks, I never even expected you to go through the code :) I will work at your suggestions and will get back to you if I have any problems. -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Engarde program was: i++

2007-06-05 Thread scott
r", "October", "November", "December"] return months[monthNumeral - 1] ### and I was able to call then function nicely by using: s = "\n" + month_name(master.month) + " " + str(m

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread scott
e values into variables "glued" together in a class. I can then pass that class back and use the variables when I need them. -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) #!/usr/bin/env python '''This is a program

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread scott
### It seems to work perfectly :) -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Engarde program was: i++

2007-06-06 Thread scott
open("./Master/mfile", "w") mfile.close() print "File could not be opened, so I created one" master = Master_stats(1631, 8) return master master = cPickle.load(mfile) mfile.close() return master ###

[Tutor] Python IDE

2007-06-11 Thread scott
, but I am willing to use a IDE that is only Python for now until those bugs get fixed in Kdevelop. Lastly, I am a Linux user, so the IDE would need to run natively on Linux. Thanks. -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty

Re: [Tutor] Python IDE

2007-06-12 Thread scott
try out eclipse because I have a newer computer that should not have any problem running it and many people seem to suggest it. -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) ___ Tutor maillist - Tutor

[Tutor] Which GUI?

2007-07-27 Thread scott
Hi, now that I have a very basic understanding of Python I would like to take a look at programming in a GUI. Which GUI is generally the easiest to learn? -- Your friend, Scott Sent to you from a Linux computer using Ubuntu Version 7.04 (Feisty Fawn

Re: [Tutor] [Bulk] Re: Which GUI?

2007-07-27 Thread scott
pletely open source. I know I will eventually poke around a couple different GUI languages, but, would prefer to start with what is easiest to learn for a new programmer. -- Your friend, Scott Sent to you from a Linux computer using Ubuntu Version 7.04 (Feisty Fawn) ___

Re: [Tutor] Which GUI?

2007-07-31 Thread scott
or a Linux developer? Thank you for any help you can give me :) -- Your friend, Scott Sent to you from a Linux computer using Ubuntu Version 7.04 (Feisty Fawn) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Which GUI?

2007-08-01 Thread scott
nt by it being difficult to decide :) I am thinking about starting with Tkinter then trying WxPython because WxPython seems to be the most highly suggested and seems to have the best documentation and selection of software/RADs. -- Your friend, Scott Sent to you from a Linux computer using Ubunt

Re: [Tutor] Which GUI?

2007-08-01 Thread scott
like how Qt is only open source if you release under the GPL. Unless Qt 4 will be released only under LGPL and/or GPL, no matter how you decide to release your product. I actually moved from Kubuntu using KDE to Ubuntu using Gnome when I found out about the Qt licence. -- Your friend, Scott

Re: [Tutor] Which GUI?

2007-08-02 Thread scott
back to a dearth of tutorials, and yes, Tkinter would be > easier to learn. I was thinking about finding a copy of that book, so maybe starting WxPython would be easier then and not worry about Tkinter. Is "WxPython in Action" a ver

Re: [Tutor] [Bulk] Re: Which GUI?

2007-08-02 Thread scott
hrough some of the tutorials after to re-enforce my knowledge. I did something similar when I was first Learning Python and it worked out well. -- Your friend, Scott Sent to you from a Linux computer using Ubuntu Version 7.04 (Feisty Fawn) ___ Tut

Re: [Tutor] Which GUI?

2007-08-02 Thread scott
subjects, but its programming section is fairly nasty. Not many books and most of the few books they have are worthless. We do have a inter-library exchange here as well, but I have never used it and don't know much about it. I'll take a trip to the library sometime to ask. -- Y

Re: [Tutor] Newbie

2007-08-28 Thread Scott
s great, I believe a high school teacher. The writer does not expect you to know any prior programming. also, best of all, it is completely free. -- Your friend, Scott Sent to you from a Linux computer using Ubuntu Version 7.04 (Feisty Fawn) ___

Re: [Tutor] aBSOLUTE BEGINNER

2007-10-17 Thread Scott
.org/moin/BeginnersGuide/NonProgrammers > > Kent > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > -- Your friend, Scott Sent to you from a Linux computer using Kubuntu Version 7.04 (Feisty Fawn) __

[Tutor] sorting and editing large data files

2004-12-16 Thread Scott Melnyk
1054700.1 is present in both the transcripts listed in Z:\datasets\h35GroupedDec15b.txt however the second exon in that list (ENSE1054696.4) is only found in the first of the two transcripts. as below: NEW GENE ENSG0160818.4 ENST0292338.3 ENSE1363386.1 ENSE1054698.3 ***ENSE1054700.1*** ENSE1054701.1 ENSE1054703.1 ENSE1377097.1 ENSE1376166.1 ***ENSE1054696.4 NEW TRANSCRIPT ENSG0160818.4 ENST0334588.2 ENSE1434292.1 ENSE1054698.3 ***ENSE1054700.1*** ENSE1054701.1 ENSE1054703.1 ENSE1336475.3 end of gene group Any suggestions on where I am going wrong? Scott ___ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python and Ajax classes at Foothill College

2010-01-29 Thread Scott Pritchard
I would like to take your python class @ middlefield foothill campus. Can I sign up for the next class? When will it start? Thanks much, Scott ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] Python and Ajax classes at Foothill College

2010-01-29 Thread Scott Pritchard
Oh, sorry about that. Rich Lovely wrote: I think you've got the wrong mailing list. This is an online "helpline" for anybody who is learning python, not a list for a specific class. On 29 January 2010 17:49, Scott Pritchard wrote: I would like to take your python clas

Re: [Tutor] Plugin system - how to manage plugin files?

2010-07-28 Thread Scott Nelson
ped together a few years ago to remind myself of how I did this. I can't promise this is 100% tested, but it should give you an idea. http://pastebin.com/UtVp6J9j Also, you might want to look at this discussion: http://groups.google.com/group/comp.lang.python/browse_thread/thread/ba8d36151

[Tutor] Finding all IP addresses associated with a host

2009-04-09 Thread Scott Newton
py to hear them. Thanks in advance! Scott Newton ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Finding all IP addresses associated with a host

2009-04-09 Thread Scott Newton
Thanks, not sure how I missed that one. -Scott On Thu, Apr 9, 2009 at 7:25 PM, Emile van Sebille wrote: > Scott Newton wrote: > >> I'm very new to python, and my google-fu has failed to locate an answer to >> the following: >> >> How can I find all of the (ip

[Tutor] Python logging

2009-04-18 Thread Scott SA
which is quite hack-ish IMO. The only thing that comes to mind, after reviewing the logging via help(logging...), is that I may need to dynamically re-write the .conf file using ConfigParser. Any ideas on what I'm missing within the logging fo

Re: [Tutor] Webpy vs Django

2009-04-19 Thread Scott SA
't that anyone could say you were wrong by choosing either of the projects you mentioned given appropriate circumstances (though personally, I can't find _any_ circumstances where I'd recommend Zope today -- but that's probably a personal bias and I w

Re: [Tutor] Python logging

2009-04-19 Thread Scott SA
how a bit of code works by reading how others have solved problems). Thank you both! Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Reading from files problem

2009-04-20 Thread Scott SA
data into a database, bypassing a Student class (until there was a valid reason for one). Once the data is loaded in, it can be referenced without re- interpreting the CSV file, again through methods in a Students class. I hope this helps, Scott PS. My email is acting up, did my prev. messag

Re: [Tutor] Shebang (#!) in the first line of a python script

2009-10-13 Thread Scott Markwell
On Tue, Oct 13, 2009 at 1:54 PM, Dave Angel wrote: > Katt wrote: > >> >> You were right. I did not have .PY/.PYW in my PATHEXT. I have put it in >> as >> suggested. I do have python.exe in my path so that should take care of >> things. >> >> Messing around with the windows registry isn't some

Re: [Tutor] PyWin32 - Library of functions to interact with windows?

2009-10-14 Thread Scott Nelson
it takes too long, write back and I/we can nudge you in the right direction with a code snippet. (While writing this email, I also discovered that you can control the cursor position in a win32 console with pywin! Fun!) Best of luck, and feel free to ask for more help! -Scott [1] - htt

Re: [Tutor] PyWin32 - Library of functions to interact with windows?

2009-11-03 Thread Scott Nelson
Scott Nelson wrote: > > It *is* possible to color console text with Python and pywin. But, it is > tricky and not obvious. I've been wondering how to do this myself and I > recently found some C code on the web [2] that does this and I translated > that into to Python a

Re: [Tutor] What is URL to online Python interpreter?

2009-12-18 Thread Scott Nelson
> > On Thu, Dec 17, 2009 at 09:32:44PM -0800, Benjamin Castillo wrote: > > What is URL to online Python interpreter? > There is also http://codepad.org/ which also supports lots of languages (Python, Ruby, Perl, PHP, C/C++...). Pretty slick. You can also use it as a public pastebin (this link w

RE: [Tutor] Hi I made a mistake

2004-12-21 Thread Barnaby Scott
You *have* signed up to get help, it's just that you see all the mail to the mailing list. The requests for help go to all subscribers, not just a select group of 'tutors' - obviously you won't be offering solutions just yet, but maybe one day you will! This behaviour is the whole point of a mailin

[Tutor] replacement for constants from other languages in Python?

2005-01-06 Thread Scott W
STANT_STRING_VAL_LIKE_HTTP_ACCEPT_ENCODING_HEADER, strlen(strVal) { do_something(); } or if(floatVal > PI) { do_something() } ok, hopefully that's explaining some of why I'd like a 'constant equivalent' as well

Re: [Tutor] replacement for constants from other languages in Python?

2005-01-06 Thread Scott W
Kent Johnson wrote: Scott W wrote: The 'need' to define a global constant in an imported module, for example- (I know about sys.version_info, but it doesn't exist in 1.5.2...don't ask ;-) I also know this could be handled via a class, but what is the equivalent of the foll

[Tutor] class instance with identity crisis

2005-01-12 Thread Barnaby Scott
This is probably a very easy question, and one that I was shocked to find I was stuck on, having thought I understood classes! I was wondering how you can get an instance of a class to change itself into something else (given certain circumstances), but doing so from within a method. So: class Da

RE: [Tutor] class instance with identity crisis

2005-01-12 Thread Barnaby Scott
rning lots! Thanks > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Alan Gauld > Sent: 12 January 2005 20:13 > To: Alan Gauld; Barnaby Scott; 'Tutor' > Subject: Re: [Tutor] class instance with identity crisis > &

[Tutor] How to create a key-value pairs with alternative elements in a list ... please help.

2005-01-14 Thread Scott Widney
> I have a simple list:> ['a', 'apple', 'b', 'boy', 'c', 'cat']> I want to create a dictionary:> dict = {'a':'apple', 'b':'boy', 'c':'cat'} From the Quick and Dirty Department: If you have Python version 2.3 or later, you can use 'itertools' to unflatten the list in a very concise manner. Here i

RE: [Tutor] Re: glob or filter help

2005-01-22 Thread Barnaby Scott
For anyone who doesn't like lambda, how about import os def get_fles(exts, upd_dir): return [i for i in os.listdir(upd_dir) if i.split('.')[-1] in exts] > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of Javier > Ruere > Sent: 22

[Tutor] Changing (Unix) environment for python shell/popen() commands

2005-01-23 Thread Scott W
er things that I'd think would warrant some coverage).. Thanks, Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] sorting a 2 gb file

2005-01-25 Thread Scott Melnyk
only need the name of the result up to the | and the score at the end for each. to simplify things, the score could be dropped, and I could check it out as needed later. As always all feedback is very appreciated. Thanks, Scott FILE: This is the number 1 query tested. Results for scoring

[Tutor] Code review

2005-01-25 Thread Barnaby Scott
If anyone has the time to look through an entire script, I would would be very grateful for any comments, tips or suggestions on a wiki-engine script I am working on. http://www.waywood.co.uk/cgi-bin/monkeywiki.py (this will download rather than execute) It does work, but I have not been using Py

RE: [Tutor] sorting a 2 gb file- i shrunk it and turned it around

2005-01-25 Thread Scott Melnyk
the sys admin to give me permission to install something again etc etc. Where as I am hoping to get this together in a reasonably short script. However I will look at it later (it could be helpful for other things for me. Thanks again to all, Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Re: sorting a 2 gb file- i shrunk it and turned it around

2005-01-28 Thread Scott Melnyk
e. Next step is to cut out the ENST lines that only show up once and wind up with just the places where there are matches at least twice to a given transcript (using the ENST0...) ids. Like in the final example I only want the first and third so I know it is twice in that tran

[Tutor] help with regexps/filename parsing

2005-01-31 Thread Scott W
I've been beating myself up on this one for a bit. Thanks, Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] help with regexps/filename parsing

2005-01-31 Thread Scott W
Slight correction which I realized after sending, see below for version/release seperation, which I should have seen but blame lack of sleep ;-) Scott W wrote: Hey all. I've got an issue that's been driving me a bit nuts. I'm sure it _can_ be done with a regexp, although I&#x

[Tutor] variation of Unique items question

2005-02-04 Thread Scott Melnyk
chr15 range=chr7:148238502-148239073 ENST0339563.1 occurs 2 times hg17_chainMm5_chr13 range=chr5:42927967-42928726 ENST0279800.3 occurs 2 times All help and ideas appreciated, I am trying to get this finished as soon as possible, the output file will b

[Tutor] Re: variation of Unique items question

2005-02-04 Thread Scott Melnyk
Hello. Kent once again you have responded incredibly quickly in a most helpful manor. I sometimes wonder if the old reference to a "Kent-bot" has some truth to it. Thanks again, I will play with it and keep on going. Scott ___ Tuto

[Tutor] Is self.__init__() call bad style?

2005-04-22 Thread Barnaby Scott
I am working on a script at the moment, in which I seem to need to re-initialise a class instance from within some of its methods. Before I go too much further down this route - could anyone comment on whether the call self.__init__() is in itself considered bad style or 'unpythonic'? For instance

[Tutor] database applications with Python - where to start

2005-05-05 Thread Barnaby Scott
Hi, this is one of those difficult questions about where to start! I want to create a book-keeping/accounting application for my own use 1. because I can't find any that suits me, and 2. because I want to improve and extend my knowledge of Python. Clearly this is going to be a database applicatio

Re: [Tutor] "#!/usr/bin/env python" vs "#!/usr/local/bin/python"

2007-06-22 Thread Scott Oertel
at you have to either A) make sure the environment is initialized, or B) initialize the environment manually before executing the script. If you, for example, want to use a python script at boot time, before the environment is initialized, i strongly recommend using an absolute path. -Sc

Re: [Tutor] A replacement for a "for" loop

2007-08-29 Thread Scott Oertel
quot;for" loop causes the >> dictionary keys to be read in a certain order. How could I take away the >> first "for" loop and replace it with something else to do the same general >> function? >> > > for key in keys: > print 'Attribute %s has

Re: [Tutor] A replacement for a "for" loop

2007-08-30 Thread Scott Oertel
Terry Carroll wrote: > On Wed, 29 Aug 2007, Scott Oertel wrote: > > >> Why even have the keys variable at all.. >> >> for key in attrs: >> print 'Attribute %s has value %s' % (key, attrs[key]) >> > > In a prior email thread, th

[Tutor] Formatting output into columns

2007-08-30 Thread Scott Oertel
Someone asked me this question the other day, and I couldn't think of any easy way of printing the output besides what I came up with pasted below. So what you have is a file with words in it as such: apple john bean joke ample python nice and you want to sort and output the text into columns as

Re: [Tutor] Formatting output into columns

2007-08-30 Thread Scott Oertel
Alan Gauld wrote: > "Scott Oertel" <[EMAIL PROTECTED]> wrote > > >> and you want to sort and output the text into columns as such: >> >> a p j b n >> apple python john bean

Re: [Tutor] Formatting output into columns

2007-08-31 Thread Scott Oertel
Luke Paireepinart wrote: > Scott Oertel wrote: >> Someone asked me this question the other day, and I couldn't think of >> any easy way of printing the output besides what I came up with pasted >> below. >> >> So what you have is a file with words in it as suc

Re: [Tutor] visualizing code structure / flow charting

2007-11-06 Thread Scott SA
g) but don't know what function to call. While not as educational from one perspective, I've found the epydoc package quite useful. It extracts all of the doc strings and formats them in a nice, easy to read, layout. <http://epydoc.sourceforge.net/> Scott __

Re: [Tutor] Obtaining image date of creation

2007-11-14 Thread Scott SA
', 'ImageNumber', 'OwnerName', 'SerialNumber', 'FirmwareVersion', 'InternalSerialNumber'] try: image_file = open(strPath,'rb') image_tags = EXIF.process_file(image_file, details=False) image_file.close() image_keys = image_tags.keys() for key_name in exif_keys: if key_name in image_keys: return_exif_dict[key_name] = image_tags[key_name] ... You should be aware that it _is_ possible for a DC to take more than one image per second - though with a consumer P&S it is unlikely. The solution I used was to capture the camera's original sequential number - had the added benefit of letting the photogs I was working with reference to their own libraries later. There are lots of pages to be found discussing file renaming and date conversions, so that should not be a problem... just be sure to use file-system compatible characters (sorry, I don't know your python exp. - just covering a couple of bases). HTH Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] repeat

2007-11-17 Thread Scott SA
Still, the links can elaborate more than I can. HTH Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread Scott SA
the latter two, but there is a reason they are generally popular. While those reasons don't meet with my req. they may meet with his. It is _always_ easier to engineer/re-engineer from a _good_ base of knowledge than it is to start fresh... though an open mind is equally important. I hope th

Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread Scott SA
nterfaced with a DB. I'm an object-oriented guy so the ORM (object-relational model) was a consideration. The cost of that is performance as a site becomes more complex. If your db requirements are minimal then this may not be an issue or it may make the db interface so transparent you

Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread Scott SA
o on. Still, as much as _I_ like this framework, I fully recognize there are good reasons why others exist and respect their capabilities. I don't want you or anyone else to use this because I said so, but because after review it is what meets your needs. All the best, Scott PS. In fa

Re: [Tutor] Python CMS advice wanted

2007-11-27 Thread Scott SA
;ve pointed out. (I wish I could get my teen-aged kid to figure out the DRY principal... but I digress ;-) Thanks for the good discussion, Jim. For my part, I think it's about time for me to stick a fork in it 'cause it's done ;-) Happy trails! Scott >On Nov 27, 2007, at 6:49

[Tutor] Silly question: Modifying code while the script is running

2008-02-18 Thread Scott Wolcott
run it. It sounds possible, but there are a couple of things i'm not sure how to do. The biggest problem is I'm not sure how to run the external code. Does anyone know of good way to do this, or can someone just point me in the right direction? -Scott _

[Tutor] help beginner in python.

2008-02-24 Thread Krystle Scott
i need to write an algorithm for computing square roots. so far I have import math def main (): print " This program computes approximate square roots using Newton's method: " print input = (" Enter whose square root you wish to compute (a) : ") input = (" Enter the number

[Tutor] Counting help

2005-08-23 Thread Scott Oertel
s my first post to this list, I hope I included enough information. -Scott Oertel ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Counting help

2005-08-23 Thread Scott Oertel
or the snipplet, it's perfect for what I'm doing, I wasn't aware of the has_key() or get(), this is very usefull. -Scott Oertel ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Counting help

2005-08-23 Thread Scott Oertel
Scott Oertel wrote: Byron wrote: Luis N wrote: Ideally, you would put your names into a list or dictionary to make working with them easier. If all you're trying to do is count them (and your list of names is long), you might consider a dictionary which you

Re: [Tutor] Counting help

2005-08-23 Thread Scott Oertel
Scott Oertel wrote: Byron wrote: Luis N wrote: Ideally, you would put your names into a list or dictionary to make working with them easier. If all you're trying to do is count them (and your list of names is long), you might consider a dictionary which you

Re: [Tutor] Counting help

2005-08-24 Thread Scott Oertel
Kent Johnson wrote: Scott Oertel wrote: The next problem I have though is creating the dict, i have a loop, but i can't figure out how to compile the dict, it is returning this: ('Joey Gale', ('Scott Joe', 'This is lame' ))) listofnames = []

[Tutor] Working with files

2005-08-24 Thread Scott Oertel
How do I use the built in file objects to insert text into a file at a certain location? i.e. something, 2, chance, weee nothing, happened, crap, nice need to search for "something" and insert, "what," before it thanks for the feedback you guys are great :)

Re: [Tutor] Working with files

2005-08-24 Thread Scott Oertel
;what" the rest of the original string write the new string to the file Hi Scott, Bob gave you the basic instructions that you need to complete the task that you are asking for. If you don't know how to do this, I would suggest that you start with t

Re: [Tutor] Working with files

2005-08-25 Thread Scott Oertel
Bob Gailer wrote: > At 02:55 PM 8/24/2005, Scott Oertel wrote: > >> How do I use the built in file objects to insert text into a file at a >> certain location? >> >> i.e. >> >> something, 2, chance, weee >> nothing, happened, crap, nice >> &g

[Tutor] mod_python.publisher

2005-09-02 Thread Scott Oertel
x27;m running Apache/1.3.33 (Unix) mod_python/2.7.11 Python/2.2.3 -Scott Oertel ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] mod_python.publisher

2005-09-02 Thread Scott Oertel
Scott Oertel wrote: I'm having an issue with mod_python.publisher, supposedly i should be able to just place this code def index():    return "This is only a test." into test.py and when placed into my browser it should run the index function by default, bu

Re: [Tutor] CREATING A PR.EXE FROM A PR.PY

2005-09-05 Thread Scott Oertel
stribution. http://starship.python.net/crew/theller/py2exe/ -Scott Oertel ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Opening files, finding their location

2005-10-08 Thread Scott Oertel
I have a small problem with one of my scripts currently, I'm using the config parser to open a config.ini file, but this program is going to be designed to be used as a cron job, currently i made a work around.. ./program.py config.ini is how you run it from the command line I'm looking for an

Re: [Tutor] Opening files, finding their location

2005-10-08 Thread Scott Oertel
Christopher Arndt wrote: Scott Oertel schrieb: I'm looking for an easy way to find the current directory location of my program so I can include the config.ini file correctly without having to pass command line args. So, do you want to find out, where your scri

Re: [Tutor] code improvement for beginner ?

2005-10-11 Thread Scott Oertel
lmac wrote: > --- > >The problem with downloading the images is this: > >- >http://images.nfl.com/images/globalnav-shadow-gray.gif >Traceback (most recent call last): > File "/home/internet/bin/nflgrab.py", line 167, in ? >urllib.urlretrieve(img,img[f:]) > File "/usr/

Re: [Tutor] Can anyone teach me...?

2005-10-13 Thread Scott Oertel
d I  can go back to using wxPython instead. Boa constructor always crashes on me in linux, on windows it's nice, but I make one small change in the code and boaconstructor will freak out and not be able to read anything. that's just my experience. -- scott oertel gawr.com :) ___

[Tutor] Newbie Question - Python vs Perl

2005-10-30 Thread Scott Clausen
g any views on this topic. My own view is that it's always good to learn new things as you then have more tools to use in your daily programming. Thanks in advance. Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Request For Suggestions

2005-12-02 Thread Nelson, Scott
sure everyone could suggest their favorite module be included, but Pygame might be the kind of thing that would catch some beginner's fancy. How many of us wrote a game as one of our first programs? :) -Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behal

Re: [Tutor] Exception repeated in a loop

2005-12-06 Thread Nelson, Scott
aught exception' print 'fell through' Hope this helps... -Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jan Eden Sent: Tuesday, December 06, 2005 10:24 AM To: Pawel Kraszewski; tutor@python.org Subject: Re: [Tutor] Exception repeated

[Tutor] Auto package install?

2005-12-06 Thread Nelson, Scott
ution exists currently, what do people consider "best practices" when releasing scripts dependent on other packages to a number of users?   Thanks for the help.  I'm relatively new to the group and it has been great so far!   -Scott __

Re: [Tutor] Pyton and Webpages

2006-05-01 Thread Nelson, Scott
that looks something like this: Name, Age, Hair Adam, 23, brown Don, 19, gray Biff, 42, blond Cathy, 35, red Gary, 99, none Excel handles these files just fine. You don't get all the fancy formatting, but this is a good first step. Good luck -Scott -Original Message- From: [EMAIL

[Tutor] Getting current class method name

2006-05-19 Thread Nelson, Scott
  I also looked at this recipe http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062 but it only gives me a function name and not the class name as well.   Any thoughts?  I’m a bit new to Python’s reflection features…   Thanks tons!   -Scott

[Tutor] Communicating with Win2000 runas.exe

2006-08-17 Thread Barnaby Scott
's password, but I can't get anything to work in terms of getting the script to provide the password. Am I barking up the wrong tree here? Any clues would be gratefully received. (Even if I do get this to work, my next trick is to hide the password from any prying eye

Re: [Tutor] Communicating with Win2000 runas.exe

2006-08-17 Thread Barnaby Scott
Tim Golden wrote: > [Barnaby Scott] > > | So I'm thinking along these lines: > | > | import subprocess > | sp = subprocess.Popen(r'C:\WINNT\SYSTEM32\runas.exe > | /user:administrator > | C:\Program Files\Microsoft Games\Age of Mythology\aom.exe') > | #s

[Tutor] string.uppercase: too many for locale

2007-01-10 Thread Barnaby Scott
ËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ >>> print string.lowercase abcdefghijklmnopqrstuvwxyzƒšœžßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ >>> What am I missing here? Surely for UK English, I really should just be getting A-Z and a-z. In case it is relevant, the platform is Windows 2000. Thanks Barnaby Scott ___

Re: [Tutor] string.uppercase: too many for locale

2007-01-11 Thread Barnaby Scott
Kent Johnson wrote: > Barnaby Scott wrote: >> Can anyone explain the following: I was getting string.uppercase >> returning an unexpected number of characters, given that the Python >> Help says that it should normally be A-Z. Being locale-dependent, I >> checked th

Re: [Tutor] miniwiki 1.3 BETA bugs

2007-02-23 Thread Barnaby Scott
return bool(re.match('^([A-Z][a-z]+){2,}$', word)) Of course you need to import re, but that seems a small price to pay! HTH Barnaby Scott ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] miniwiki 1.3 BETA bugs

2007-02-26 Thread Barnaby Scott
Kirk Z Bailey wrote: > RE leaves me totally confuzzzeddded. Yep, so confuised I'm having > trouble spelling it. Sp this one line will replace both words and give a > reliable result? > > Barnaby Scott wrote: > [snip] >> No idea if it has anything to do with y

[Tutor] win32gui, SetForegroundWindow() and setting focus

2008-03-16 Thread Scott Nelson
bove. Run it as "WinTests 12345" to set focus the window with hwnd of 12345. Run it as "WinTests" to get a list of all top level windows and their hwnd's. I've tried reading the very-sparse win32 docs provided with ActiveState's PythonWin, I've read a bit

Re: [Tutor] Which Python Script Editor of Choice?

2008-04-03 Thread Scott Nelson
> > Komodo also often gets props from the "IDE People" I've known. To throw another one into the mix, ActiveState has a free/open source version of its Komodo IDE called "Komodo Edit". I downloaded it and played with it for a few minutes awhile ago. Seems pretty slick. Anyone have any first h

[Tutor] Python Best Practice/Style Guide question

2008-04-29 Thread Scott SA
er can be changed, but there are reasons why it might be inapropriate to reorder i.e. dependencies. TIA, Scott PS. There is a good best-practice link here too: <http://www.fantascienza.net/leonardo/ar/python_best_practices.html> ___ Tuto

Re: [Tutor] Providing Solutions for all the Common Questions

2008-10-21 Thread Scott Nelson
To throw out an idea... http://www.showmedo.com/ is a site that believes that learning-by-watching is a very effective way to teach people new skills. So, they host lots of (user-generated) screencasts (usually 5-10 minutes) that show people how to do things. Because the site is Python focused,

[Tutor] Possible to search text file for multiple string values at once?

2009-01-23 Thread Scott Stueben
y_table WHERE first_name IN ('Bob', 'John', 'Joe', 'Jim', 'Fred')" and you would get results for all five values. I would love to set up a script to parse a file and show results from a list of strings. Is this possible with python? Thanks for

Re: [Tutor] Possible to search text file for multiple string values at once?

2009-01-23 Thread Scott Stueben
would process the search and output all lines to a file. Something like that is what I am imagining, but I am open to suggestions on items that may be easier to use or code. Is that reasonably simple to code for a beginner? Thanks again, Scott On Fri, Jan 23, 2009 at 11:52 AM, Kent Johnson wrote:

Re: [Tutor] Possible to search text file for multiple string values at once?

2009-01-24 Thread Scott Stueben
Excellent ideas...thanks to you all for the input. I will see what I can work out in the next few days and report back. :) Scott On Sat, Jan 24, 2009 at 2:16 AM, spir wrote: > Le Fri, 23 Jan 2009 14:45:32 -0600, > W W a écrit : > >> On Fri, Jan 23, 2009 at 1:11 PM, Scot

  1   2   3   >