Re: [Tutor] Finding even and odd numbers

2007-09-19 Thread Michael Langford
least not one you'd like to see. You're going to confusing everyone if you implement isDivBy8 with bitwise operations. --Michael On 9/19/07, Terry Carroll <[EMAIL PROTECTED]> wrote: > > On Wed, 19 Sep 2007, Boykie Mackay wrote: > > > if not n&1: >

Re: [Tutor] How to take in 2 or more values from user on a single line (like parameters?)

2007-09-19 Thread Michael Langford
gt;>> print a Bubby June >>> See how the variable "a" now has the whole sentence "Bubby June" in it? You can call split on "a" now and you'll get a list of words: >>> Names = a.split() >>> print Names ['Bubby','June

Re: [Tutor] Income calculator

2007-09-19 Thread Michael Langford
.. Unless there is some really good reason you need text keys, this is a lot more natural. --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ Entertaining: http://www.ThisIsYourCruiseDirectorSpeaking.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] IndexError: list index out of range

2007-09-19 Thread Michael Langford
You should check if the stack is empty before you access it: def popNum(num): if len(stackA) > 0 and num == stackA[-1]: stackA.pop() #etc --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ Entertaining: h

Re: [Tutor] Threading in Python

2007-09-19 Thread Michael Langford
again, you don't have a shared memory space, so get used to using pickle if you don't have another text protocol to send data back and forth. --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ Entertaining: http://www.ThisIsYourCruiseDirectorS

Re: [Tutor] Quick question

2007-09-21 Thread Michael Langford
Use the .get method of the dict to return a nonzero value (say None or -1) when it can't find an item. That will half your test cases. Example of .get below: --Michael >>> foo = {} >>> foo['d']=0 >>> foo['a']=1 >>> if(foo.ge

Re: [Tutor] Capturing ctrl-c

2007-09-22 Thread Michael Langford
pass def graceful_cleanup() pass if "__main__" == __name__: try: do_stuff() except: graceful_cleanup() --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ En

[Tutor] Learning a Language

2007-09-23 Thread Michael Langford
e nice thing about going through the course work is that they're trying to teach programming, and just happen to be using python. That approach means you'll get the most important, general skills out of it. (That course or harder ones is required for all undergrads at that institution, so

Re: [Tutor] python problem

2007-09-24 Thread Michael Langford
Look here. Do this: http://en.wikipedia.org/wiki/Binary_search -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ Entertaining: http://www.ThisIsYourCruiseDirectorSpeaking.com On 9/25/07, Chris <[EMAIL PROTECTED]> wrote: > > > > ***I have

Re: [Tutor] Take if offline

2007-09-25 Thread Michael Langford
I agree with Kent... -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ Entertaining: http://www.ThisIsYourCruiseDirectorSpeaking.com On 9/25/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > > Hansen, Mike wrote: > > Anytime someone posts in HTML,

Re: [Tutor] New to Python and Linux

2007-09-25 Thread Michael Langford
ot;, then using the folder on the command line, browse to your python executable. I don't know where it is. If you open up a terminal and type: which python that *may* show you where it is. -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ Entertaining

Re: [Tutor] do i have to import modules at the start of a file?

2007-09-27 Thread Michael Langford
ibrary that does all the common things. --Michael On 9/27/07, shawn bright <[EMAIL PROTECTED]> wrote: > It's the second one, not all the modules will be available on the portable > version. But the threads that require those modules will not be necessary on > the p

Re: [Tutor] [tutor]Help needed to read Ascii file in wxPython

2007-09-27 Thread Michael Langford
and running in a couple minutes. http://pythoncard.sourceforge.net/walkthrough1.html Run some of the example programs (they're in a subdirectory of your python folder, like the tutorial says). Their source code will lead you to an appropriate sort of file editor. --Michael -- Michael Lan

[Tutor] Atomic file creation?

2007-09-28 Thread Michael Langford
ndows interpreter and visa versa." I'd check to see if the destination file exists before doing all of the above. I think your method is fine. Atomic file creation is not a common worry. I think this is a wholly reasonable quantity of code to pull it off. --Michael On 9/28/07

Re: [Tutor] Learning Python

2007-09-29 Thread Michael Langford
http://www.diveintopython.com is a *Great* start for experienced software developers. Within a weekend with that book I'd written an entire parser/decompiler when I'd never used python before that. --michael On 9/29/07, Fred P <[EMAIL PROTECTED]> wrote: > Hey

Re: [Tutor] Learning Python

2007-09-29 Thread Michael Langford
errhttp://www.diveintopython.org is the actual url =Michael On 9/29/07, Michael Langford <[EMAIL PROTECTED]> wrote: > http://www.diveintopython.com is a *Great* start for experienced > software developers. Within a weekend with that book I'd written an > enti

Re: [Tutor] CGI File Woes

2007-09-30 Thread Michael Langford
t the error is rather than speculating about it. --Michael On 9/30/07, wormwood_3 <[EMAIL PROTECTED]> wrote: > Hello all, > > I am working on a very simple CGI script. The site I want to use it on is a > shared linux host, but I confirmed that .py files in the righ

Re: [Tutor] Really basic web templating

2007-10-01 Thread Michael Langford
Check to see if mod_python is installed/installable. It would quite easily give you a very simple interface to do what you're looking for. --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ On 9/30/07, wormwood_3 <[EMAIL PROTECTED

Re: [Tutor] Increase speed

2007-10-09 Thread Michael Langford
You don't know what's slow. This is the perfect tool for a profiler. http://docs.python.org/lib/profile.html --Michael On 10/9/07, Øyvind <[EMAIL PROTECTED]> wrote: > > Hello. > > I have written a simple application that does a number of simple > calcu

Re: [Tutor] internet access

2007-10-11 Thread Michael Langford
f you make some with SWIG: www.swig.org) --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ On 10/10/07, Kirk Vander Meulen <[EMAIL PROTECTED]> wrote: > > Hi, > I'd like to write a script that limits internet access to certain hour

Re: [Tutor] VIX API

2007-10-11 Thread Michael Langford
if you're really feeling like you want to cause yourself some pain, you can try to hand code a python extension...but I suggest you try the automated tool first --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ On 10/11/07, Stephen

Re: [Tutor] slice lists and slicing syntax questions

2007-10-13 Thread Michael Langford
#x27;re going to be able to override the __getitem__ prototype without some serious pain.I've never tried to change the function/method signature with a decorator, but I'm pretty sure its possible at least for the non-builtin attributes. You may want to try to write a PEP for python 3000.

Re: [Tutor] Decimal Conversion

2007-10-15 Thread Michael Langford
Use b+=","+r instead. That will add the , to the string named by b, and will concatenate the string named by r to the end. --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ On 10/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Re: [Tutor] Decimal Conversion

2007-10-15 Thread Michael Langford
comma operator. b+="," + r Was not doing exactly what I said. What it's doing is creating a new string from the one named by b, the string literal "," , and the one named by r. After creating the string it assigns the name b to the new string. --michael -- Michae

Re: [Tutor] Decimal Conversion

2007-10-15 Thread Michael Langford
>Michael has already explained that this is building >a tuple of tuples. But you want to create strings. >So first convert r to a string using str(r) Yeah sorry about thatread some java over the weekend (source code to http://reprap.org)...and then munged some of its syntactic sugar

[Tutor] python help

2007-10-21 Thread Michael Langford
_ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/

Re: [Tutor] "standard output: Broken pipe"

2007-10-21 Thread Michael Langford
t *must* shutdown cleanly, signal handling is an essential item to put into your program. --Michael On 10/19/07, James <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a snippet of code in a Python script I'm whipping up that's > causing a not-so-pretty o

Re: [Tutor] populating an array or using a dictionary

2007-10-21 Thread Michael Langford
n file('foo.dat'): tokens = line.split() dval = tokens[0] ls = [] for i in range(1,countOfVars+1): ls.append(float(tokens[i])) dic2[dval]=tuple(ls) print dic2 --Michael On 10/21/07, Bryan Fodness < [EMAIL PROTECTED]> wrote: > > Here is

Re: [Tutor] urllib2 and cookies

2007-10-25 Thread Michael Meier
is documented at http://docs.python.org/lib/module-cookielib.html Cheers, Michael ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Build exe on Vista, have it run on XP?

2007-10-29 Thread Michael Langford
mpile down to an exeis it a valid alternative? Should my CPython utility be compatible with ipy? I only use the random,time,sys, and serial modules. I really know nothing about ipy. --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ __

Re: [Tutor] Build exe on Vista, have it run on XP?

2007-10-31 Thread Michael Langford
That's not really a working solution. My available development platform is a Vista machine. I don't have an available XP platform. XP built exes run fine on Vista, just not vice versa. --Michael On 10/31/07, O.R.Senthil Kumaran <[EMAIL PROTECTED]> wrote: > &

Re: [Tutor] Automating operations... os module, mysql operations, more...

2007-11-01 Thread Michael Langford
, Jul 3 2007, 22:58:17) [GCC 4.1.1 20070105 (Red Hat > 4.1.1-51)], > PIL 1.1.6 > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > -- Michael Langford Phone: 404-386-0495 Consulting: http://www.TierOneDesign.com/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] List comp question

2007-11-02 Thread Michael Langford
Decorate level2 with a decorator that caches: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/425445 --Michael On 11/1/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > > I am building a list like this: > > tree = [] > for top in tops: >

Re: [Tutor] List comp question

2007-11-03 Thread Michael Langford
func_once_cleanup(print_and_return_big_list) print_and_return_big_list( On 11/2/07, Michael Langford <[EMAIL PROTECTED]> wrote: > > Decorate level2 with a decorator that caches: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/425445 > > --Michael > >

Re: [Tutor] I need an 'atomic read/ write action'

2007-11-04 Thread Michael Langford
You don't need an atomic read and write, you need a blocking file lock mechanism. This page explains them and how to use them: http://www.voidspace.org.uk/python/pathutils.html#file-locking --Michael On 11/4/07, Tom <[EMAIL PROTECTED]> wrote: > > Hi, > > I am tryin

Re: [Tutor] Sorting specific files by modification date

2007-11-05 Thread Michael Langford
In psudocode: #map the files to their time. filesByTimes = {} for each in filesInDirectory: filesByTimes[os.stat(each).st_mtime]=each #find the largest time times = filesByTimes.keys() sort(times) #retrieve the file that goes with it latestFile = filesByTimes[times[-1]] --Michael On

Re: [Tutor] Web programming

2007-11-17 Thread Michael Langford
what errors mean when you're trying to get it up and going: http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking I was amazed how helpful that second page was on setting things up. I think it took me about 20-25 min. --Michael On Nov 17, 2007 12:14 PM, Dinesh B Vadh

Re: [Tutor] network - send one line of text

2007-11-23 Thread Michael Langford
your problem. If you're on a unix-like OS, use netcat: http://netcat.sourceforge.net/ --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] pipeline - what is it and how do I use it?

2007-11-25 Thread Michael Langford
but should work) while not os.path.isfile("/var/jobs"): datafile = file("/var/jobs") map(myFileProcessingFunc,datafile.readlines()) datafile.close() os.remove("/var/jobs") -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com __

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

2007-11-27 Thread Michael Langford
his included. Do not use a database, that would be very ugly and time consuming too. This is cleaner than the dict keys approach, as you'd *also* have to convert to tuples for that. If you need this in non-list completion form, I'd be happy to write one if that's clearer to you o

Re: [Tutor] How is "tuple" pronounced?

2007-12-10 Thread Michael Langford
Tuple, rhymes with "you pull" --Michael On 12/10/07, earlylight publishing <[EMAIL PROTECTED]> wrote: > Is it tuh-ple (rhymes with supple) > > or is it two-ple (rhymes with nothing that I can think of)? > > Please visit our websi

Re: [Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
#x27;t reply back to the list and I'll delve into the older mii-tools to tell you which one to hack on. --Michael On Dec 12, 2007 9:48 PM, Robert Recchia <[EMAIL PROTECTED]> wrote: > I was wondering can python can be used to check the duplex settings of a > networ

[Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
#x27;t reply back to the list and I'll delve into the older mii-tools to tell you which one to hack on. --Michael On Dec 12, 2007 9:48 PM, Robert Recchia <[EMAIL PROTECTED]> wrote: > I was wondering can python can be used to check the duplex settings of a > networ

Re: [Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
be done with python. Or you can just parse the ifconfig output. --Michael On 12/12/07, Robert Recchia <[EMAIL PROTECTED]> wrote: > > > On Dec 12, 2007 11:01 PM, Michael Langford <[EMAIL PROTECTED]> > wrote: > > Most easily: If your card supports ethtool, you

Re: [Tutor] Python Versions

2007-12-12 Thread Michael Langford
ques can do that, so its all hunky dory. Try each though, they'll make you learn something you didn't know, at least how to talk to the other types of Geek. --Michael On 12/13/07, earlylight publishing <[EMAIL PROTECTED]> wrote: > Actually the first thing I noticed is the

Re: [Tutor] python links

2007-12-16 Thread Michael Langford
academic project to boot. If you are going to go with a processor on which you can embed Linux, there is a python in the buildroot tree, however buildroot can be quite the crap shoot, depending on processor and mix of applications (It didn't work on the last board I was using

Re: [Tutor] Bound To Be A Typo

2007-12-17 Thread Michael Langford
Its "under under", not "under under under" before and after init --Michael On 12/17/07, earlylight publishing <[EMAIL PROTECTED]> wrote: > Okay I copied this code directly from a book (author Michael Dawson) and > it's not working. I'm s

[Tutor] Application Tutorials

2007-12-18 Thread Michael Schultz
Hello everyone. I'm one of those people stuck in that odd space between total noob and partially competent :) What I'm looking for are nicely structured intermediate tutorials that focus on creating actual applications, even if fairly useless :) But mainly something that can give me an understand

Re: [Tutor] XML data reading

2007-12-20 Thread Michael Langford
from amazon. urlib2 and sax parsers are formidable, quick technologies to perform simple parsing needs. Look into BeautifulSoup as well: http://www.crummy.com/software/BeautifulSoup/ --Michael On Dec 20, 2007 4:15 PM, Lockhart, Luke <[EMAIL PROTECTED]> wrote: > &g

Re: [Tutor] Regular Expression

2007-12-21 Thread Michael Langford
You need to pass a parameter to the string in the following line: outfile.write("%s\n" % m.string[m.start():m.end()]) And you need to use m.search, not m.match in the line where you're actually apply the expression to the string m = patt.search(line) --Michael On 12/2

Re: [Tutor] PythonCard error checking

2007-12-24 Thread Michael Langford
ted into its own files: to keep the hair out of your main program. --Michael On Dec 24, 2007 10:02 AM, Roy Chen <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I've just started trying PythonCard to build a simple GUI for a little > application I'm writing. >

Re: [Tutor] Careful Dictionary Building

2007-12-28 Thread Michael Langford
: mydict[ record[0] ].append( record ) defaultdict is usually good enough for datasets I've used it for. --Michael On 12/28/07, doug shawhan <[EMAIL PROTECTED]> wrote: > > *sigh* Ignore folks. I had forgotten about .has_key(). > > > > On Dec 28, 2007 11:22 AM, d

Re: [Tutor] Displaying images on a web page

2008-01-01 Thread Michael Langford
m your python backend). If you're really trying to avoid writing your own HTML out, the table example from GWT( http://gwt.google.com/samples/KitchenSink/KitchenSink.html#Panels) will do what you're looking for. Pyjamas(http://code.google.com/p/pyjamas/) will generate GWT code from pyt

Re: [Tutor] Choice of GUI builders

2008-01-02 Thread Michael Langford
Windows, Linux, Mac, Firefox, IE6, IE7 and Opera, makes this a great choice for a easy UI toolkit. --Michael On Jan 2, 2008 9:08 AM, Roy Chen <[EMAIL PROTECTED]> wrote: > Hello all, > > I've been using PythonCard to build a GUI for a simple program I'm trying to &

Re: [Tutor] Choice of GUI builders

2008-01-02 Thread Michael Langford
out. I don't think I understand your concern enough to address it. Are you worried about reliability? Error checking? What in particular? Perhaps you could cut and paste a bit of code you've already written that you think would be complicated by the Async? --Michael On Jan 2

[Tutor] Tkinter OptionMenu question

2008-01-04 Thread Michael Schultz
Hello list! I was wondering if any of you could help me with this: I've got a small GUI connected to a SQLite DB. My OptionMenu pulls a category list from the DB, and there's a field to add a new Category if you need to. Now, I'd like the have the OptionMenu update with the new category after the

Re: [Tutor] Windowss sidebar gadgets with Python?

2008-01-09 Thread Michael Langford
#x27;ve ever seen, but it looks possible. --Michael PS: I've had notes on this for awhile, but haven't had the time to try. If it works, let me know. On 1/9/08, Timothy Sikes <[EMAIL PROTECTED]> wrote: > > Hello all. > > I have been working with Python for a couple years of

Re: [Tutor] new guy problem, what's wrong with this program.

2008-01-13 Thread Michael Langford
I suggest using pychecker. It helps if you have spelling issues like I do: pychecker.sourceforge.net/ Its sorta like lint for python. --Michael On 1/13/08, John Fouhy <[EMAIL PROTECTED]> wrote: > On 14/01/2008, bill.wu <[EMAIL PROTECTED]> wrote: > > mumber =

Re: [Tutor] Recieving emails in python

2008-01-13 Thread Michael Langford
iles/rfc821.txt --Michael PS: What's the tutor policy on cross posting? On 1/14/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I m trying to create something simple a mailing list similar to yahoo groups > I m stumbling at the part where the python recieves mes

Re: [Tutor] Daemonizing Scripts

2008-01-13 Thread Michael Langford
I've had this work before: http://support.microsoft.com/kb/251192 Cygwin also has a service maker, but I'm unaware of the details of using it. --Michael On 1/14/08, Lawrence Barrott <[EMAIL PROTECTED]> wrote: > > >>Hello, > >> > >>How can a

Re: [Tutor] Recieving emails in python

2008-01-13 Thread Michael Langford
imap: http://docs.python.org/lib/module-imaplib.html pop: http://docs.python.org/lib/module-poplib.html or mbox: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/157437 Milters also look like they might be apropos: http://www.bmsi.com/python/milter.html --Michael On 1/14/08, [EMAIL

Re: [Tutor] Read protection of python files for Abaqus

2008-01-14 Thread Michael Langford
rity guard or something else at that point to safeguard your valuables. Pick locks that are good enough, and try to remove the incentives and abilities to break in other ways. --Michael PS: I would like to point out. These other people will be able to *call* your highly proprietary code

Re: [Tutor] Document Control System

2008-01-14 Thread Michael Langford
I'm porting my mod_python stuff over --Michael On Jan 14, 2008 11:43 AM, ammar azif <[EMAIL PROTECTED]> wrote: > Hello, > > Is python suitable in developing web based document control system ? I was > thinking of using python and mysql to create such system.

Re: [Tutor] Reading Input Data

2008-01-15 Thread Michael Langford
gt; > > > > > > > > > Never miss a thing. Make Yahoo your homepage. > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Reading Input Data

2008-01-15 Thread Michael Langford
("file.csv")): s = line.split(",")[1] try: f = float(s) locals()["x%i" % subscript]=f except: locals()["x%i" % subscript]=s print x1 print x0 On Jan 15, 2008 3:47 PM, Michael Langford <[EMAIL PROTECTED

Re: [Tutor] Reading Input Data

2008-01-15 Thread Michael Langford
ou would do in software like maple, this approach can greatly simplify the notation over the list/dict approach. If you're not using python as a huge substitute for a math solver, then avoid what I said like the plague and use a dict. --Michael On 1/15/08, Michael Langford <[EMAIL PRO

Re: [Tutor] Programming Ideas, need some focus

2008-01-16 Thread Michael Langford
sts&ph=113 --Michael On 1/16/08, Fiyawerx <[EMAIL PROTECTED]> wrote: > I've been over google for hours now, and I'm sort of at a lull in my > learning, as I don't really have a current "goal". I know I could set some > easy goal like to learn a specific fu

Re: [Tutor] Programming Ideas, need some focus

2008-01-16 Thread Michael Langford
No, but this is quite useful for getting it up and going on your PC: http://wiki.laptop.org/go/OS_images_for_emulation I was looking at Metropolis (the non-TM version of SimCity) as its gui is all written in python --Michael On 1/16/08, Eric Abrahamsen <[EMAIL PROTECTED]>

Re: [Tutor] Programming Ideas, need some focus

2008-01-16 Thread Michael Langford
lation page for Windows and Mac OS X. Any takers? Eric on the mac side? Some other windows user on the windows side? I guarantee OLPC will be running on your computer by the end of this. --Michael On 1/16/08, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > I'm on a Mac, and

Re: [Tutor] Programming Ideas, need some focus

2008-01-18 Thread Michael Langford
yone else have any ideas for some types of programs that might actually > prove useful to people for beginners to work on? > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/list

Re: [Tutor] interview questions

2008-01-19 Thread Michael Connors
be prepared to answer "Why do you want to work with Python?" and have a clear picture of its pros and cons. The job is probably not all about Python, so don't forget to prepare the other areas you mentioned on your CV. -- Michael Connors ___

Re: [Tutor] Obssfurcatedpuytthonlessons nneeded

2008-01-20 Thread Michael Langford
any of them can just drop in and handle all the forms of licenses you're used to. --Michael On Jan 19, 2008 9:40 PM, Kirk Bailey <[EMAIL PROTECTED]> wrote: > I aam writing some software which calls for some unreadable code in > it to let me secretly set a registrat

Re: [Tutor] MySQLdb for Python 2.5? (Debian related) (was: csv.reader: bad argument type)

2008-01-23 Thread Michael Langford
was originally written by the Zope people I believe, but has been made independent of zope so all of us non-zope people can use it. --Michael Cheese Shop: www.python.org/pypi Monty Python Cheese Shop Skit: www.youtube.com/watch?v=B3KBuQHHKx0 Buildout: www.python.org/pyp

Re: [Tutor] MySQLdb for Python 2.5? (Debian related) (was: csv.reader: bad argument type)

2008-01-23 Thread Michael Langford
was originally written by the Zope people I believe, but has been made independent of zope so all of us non-zope people can use it. --Michael Cheese Shop: www.python.org/pypi Monty Python Cheese Shop Skit: www.youtube.com/watch?v=B3KBuQHHKx0 Buildout: www.python.org/pyp

Re: [Tutor] MySQLdb for Python 2.5? (Debian related)

2008-01-23 Thread Michael Langford
cation. There is no change system wide, just for the application that is running. This is *much* safer than using the system package manager. Its like running a standalone exe like putty on windows, versus installing a microsoft product. --Michael > Michael Langford schrieb: > > I

Re: [Tutor] Comparing more than 2 lists

2008-01-24 Thread Michael Langford
"%s: %s" % (each, dd[each]) I'd provide code, but I'm not sure what an appropriate naming function is for you, nor am I sure what you're doing with this when you're done. --Michael On Jan 24, 2008 3:15 AM, Fiyawerx <[EMAIL PROTECTED]> wrote: >

Re: [Tutor] IronPython, the wii remote, and blender

2008-01-26 Thread Michael Langford
please tell me so. => (I got this > message in plain text this time!) > _ > Shed those extra pounds with MSN and The Biggest Loser! > http://biggestloser.msn.com/ > ___ > Tutor maillist - Tutor@python.org > http://mail.pyt

Re: [Tutor] What web framework?

2008-01-29 Thread Michael Langford
wsgi.org/wsgi/Frameworks Pick according to your comfort level/motivation level when choosing between Configuration and Magic Probably use Paste(http://pythonpaste.org/), but maybe use a more involved framework too. --Michael -- Michael Langford Phone: 404-386-0495 Consulting:

Re: [Tutor] question about a number and bytes.

2008-01-29 Thread Michael Langford
Use pyserial: http://pyserial.sourceforge.net/ Use struct.pack: http://docs.python.org/lib/module-struct.html The format string will depend whether you need little or big endian. --Michael On Jan 29, 2008 4:13 PM, shawn bright <[EMAIL PROTECTED]> wrote: > Thanks for your r

Re: [Tutor] how to make python program as executable

2008-01-30 Thread Michael Langford
at doesn't depend on the presence of python, then this tutorial will help you: http://wiki.python.org/moin/Freeze --Michael On Jan 30, 2008 9:11 AM, brindly sujith <[EMAIL PROTECTED]> wrote: > i am using linux... > > plz tell me how to do it > > > -

Re: [Tutor] how to make python program as executable

2008-01-30 Thread Michael Langford
> make it executable > > please guide me > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com _

Re: [Tutor] How to compare the first line from multiple files

2008-01-31 Thread Michael Langford
from the first file as the reference.) > > How would I go about doing this. > > Thanks in advance. > > Regards, > Sorghum Crow > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor >

Re: [Tutor] os.system() problem

2008-02-03 Thread Michael Langford
Popen may be a better call for what you're trying to do. Some of the higher numbered popens will give you the stderr stream. The lowered numbered ones are probably all you need. http://docs.python.org/lib/node529.html --Michael On Feb 3, 2008 12:54 PM, dave selby <[EMAIL P

Re: [Tutor] Hello and newbie question about "self"

2008-02-03 Thread Michael Langford
uot;self". Otherwise you'll be writing a class method and it doesn't work the same way. --Michael On Feb 3, 2008 3:15 PM, Patrick <[EMAIL PROTECTED]> wrote: > Hi guru's, > > New to the list. I bought O'Reilly's Learning Python (3rd edition

Re: [Tutor] PHP & Python suggestions....

2008-02-04 Thread Michael Langford
gramming can be. --Michael On Feb 4, 2008 10:43 AM, Chris Fuller <[EMAIL PROTECTED]> wrote: > > On Sunday 03 February 2008 17:35, GTXY20 wrote: > > Hi all, > > > > First off let me say how helpful and informative this mailing list is. It > > is very much

Re: [Tutor] Adding network play to an open source game.

2008-02-09 Thread Michael Langford
more than your networking additions. Approach 2 also requires much less rejiggering of the internals of the C/C++ program. --Michael On Feb 8, 2008 11:21 PM, Timothy Sikes <[EMAIL PROTECTED]> wrote: > > > Thanks for your advice. You're probably right, I do need to

Re: [Tutor] Closing file objects when object is garbage collected?

2008-02-12 Thread Michael Langford
.com/pub/a/python/2005/09/01/debugger.html It will allow you to poke around at the innards of your program right as it dies. --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to Set python path

2008-02-12 Thread Michael Langford
Show us both path statements, then we might be able to fix it. --Michael On Feb 12, 2008 2:01 AM, Narain <[EMAIL PROTECTED]> wrote: > > > Hi, > > Iam facing problems in Environment variables for python path as > follows > >Iam using Windows

Re: [Tutor] designing POOP

2008-02-15 Thread Michael Langford
bjects on real world objects" is how people are taught so they get the idea of an object. Actually designing all code that way is a needless proscription that really really hurts many projects. --Michael On Fri, Feb 15, 2008 at 8:38 AM, Kent Johnson <[EMAIL PROTECTED]> wrote

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

2008-02-18 Thread Michael Langford
import sys code = """import datetime print 'This is a pile of arbitrary code to execute' print sys.argv print datetime.datetime.now()""" if len(sys.argv) > 2: exec(code) else: print "Fooless" --Michael On Feb 18, 2008 5:1

Re: [Tutor] Change mouse cursor position

2008-02-19 Thread Michael Langford
I do not know of a python library to do this. Therefore, I'd use a popen call to http://www.hoopajoo.net/projects/xautomation.html. --Michael PS: If we you were on windows, I'd use http://pywinauto.openqa.org/ On Feb 19, 2008 4:34 AM, Flaper87 <[EMAIL PROTECTED]> w

Re: [Tutor] How to deal with a thread that doesn't terminate

2008-02-19 Thread Michael Langford
): self.process = subprocess.Popen([self.cmdline]) def stop(self): win32api.TerminateProcess(int(self.process._handle), -1 --michael On Feb 19, 2008 4:53 PM, Tony Cappellini <[EMAIL PROTECTED]> wrote: > When I executing a program external to the main program in a thread, &

Re: [Tutor] DATA TYPES

2008-02-20 Thread Michael Langford
er your code with this loop and go through the output for lines that are wrong. --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] DATA TYPES

2008-02-20 Thread Michael Langford
By writing the unit tests in cPython/Jython compatible code, you'll be able to run the same tests on both sets of functions and verify you've completed your port. ==Michael PS: Sorry about the missing %, it was there when I ran the code. Don

Re: [Tutor] How do I get GASP

2008-02-26 Thread Michael Connors
is maybe: https://launchpad.net/gasp-code -- Michael Connors ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] rss feed reader, but having trouble with unicode

2008-02-28 Thread Michael Langford
feedparser.org also works really well for this sort of thing. Does a lot of the unicode automagically for you. --michael On Wed, Feb 27, 2008 at 8:58 AM, Tom <[EMAIL PROTECTED]> wrote: > Finally got it working. I used your suggestion Rui, but I also had to > change the char

Re: [Tutor] Const on Python

2008-03-06 Thread Michael Langford
he area that really matters in). --Michael -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] surprising len() results ???

2005-08-09 Thread Michael Janssen
s. You can proberbly decode your strings from utf-8 (or whatever encoding you use (and perhaps encode it back into a one-char-one-byte encoding [on my system the decoded (unicode) string is just fine]). regards Michael ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Customized endswith/startswith version

2005-08-10 Thread Michael Janssen
cause strings are immutable types, which means that a new string is created ervery time we "mutate" one. Which in turn means that you have to know how to subclass from immutable types (using __new__ instead of __init__ and things like that I can't remember and allways have a har

[Tutor] LiveWires problems

2005-08-15 Thread Michael Murphy
Hi all I'm having problems with installing LiveWire for python for Linux (Linspire 5.0 to be exact) and I'm having trouble compiling setup.py. Heres the results: running install running build running build_py running install_lib creating /usr/lib/python2.3/site-packages/livewires error: could not

<    1   2   3   4   5   6   7   8   9   >