Re: [Tutor] eval and exec

2004-12-04 Thread Bill Campbell
not accessing the dictionary. Would something like this work: # dbtables is already built for table in dbtables.keys(): exec(%s = dbtables['%s'] % (table, table)) Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E

Re: [Tutor] (OT) How to run a script file

2005-01-05 Thread Bill Campbell
using yast2. FWIW, I would strongly recommend the SuSE Professional rather than the Personal if you're going to be doing any serious development work. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX

Re: [Tutor] TKinter and things over Linux

2005-04-16 Thread Bill Campbell
of file it is, but generally look at the first few bytes of the file (if a text file starts with ``#!'' the rest of the line is taken to be the command to run the script. ... Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641

Re: [Tutor] Of fish and foul...(aka the Perl require command)

2005-04-18 Thread Bill Campbell
recommend? Good? That depends on what your standards are. I found ``Perl to Python Migration'' by Martin C. Brown useful. I think I found this on bookpool.com, but you can always try bookfinder.com which can find pretty much anything. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial

Re: [Tutor] TKinter and things over Linux

2005-04-20 Thread Bill Campbell
. make 21 | tee make.output Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``If the personal

Re: [Tutor] Detecting my own IP address?

2005-06-05 Thread Bill Campbell
isn't what is required). One disadvantage of parsing ifconfig is that output varies depending on the operating system. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186

Re: [Tutor] Detecting my own IP address?

2005-06-05 Thread Bill Campbell
can't say what it does (knowing Microsoft, it may vary between Windows versions, patch levels, and the phase of the moon :-). Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186

Re: [Tutor] CPAN for python

2005-06-06 Thread Bill Campbell
http://www.vex.net/parnassus/ Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com

Re: [Tutor] strip an email

2005-06-24 Thread Bill Campbell
___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell

[Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread Bill Campbell
will be faster than dictionries since it doesn't have to calculate the hashes. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-18 Thread Bill Campbell
has two articles on those two: http://www.nist.gov/dads/HTML/linearSearch.html http://www.nist.gov/dads/HTML/hashtab.html Thanks for the references (occassionaly there's something that government does that's actually useful :-). Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell

Re: [Tutor] FTP from mainframe

2010-07-29 Thread Bill Campbell
. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Skype: jwccsllc (206) 855-5792 If you want government to intervene

Re: [Tutor] A Plea for Sensible Quoting

2010-09-14 Thread Bill Campbell
been able to get my fingers retrained for emacs after almost 30 years of vi :-). Agreed on the quoting. Interspersing new information between quoted sections is great, but quoting an entire message only to add ``ditto'' at the end is idiotic. Bill -- INTERNET: b...@celestial.com Bill Campbell

Re: [Tutor] list comprehension, efficiency?

2010-09-28 Thread Bill Campbell
. Before I discovered sets, I found significant time savings by creating a dictionary, adding as necessary, then use d.keys() to get the keys back. This became a significant factor when I was selecting unique lines from about 1.3 million samples. Bill -- INTERNET: b...@celestial.com Bill Campbell

Re: [Tutor] How to pass a python variable to subprocess.call?

2010-10-25 Thread Bill Campbell
? For example: mydir = /usr/local/bin subprocess.call(ls -l /usr/local/bin, shell=True) How do I replace /usr/local/bin in the subprocess call with the mydir variable? subprocess.call(ls -l '%s' % mydir, shell=True) Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL

Re: [Tutor] Sorting a List

2011-01-12 Thread Bill Campbell
(object): def __init__(self, fname) self.fname = fname self.cmp = ver(fname) def __cmp__(self, othr): return cmp(self.cmp, othr.cmp) Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer

[Tutor] distutils site.cfg variable expansion

2011-04-28 Thread Bill Campbell
=%(prefix)s/sbin Better yet would be for the prefix to be available from the command line or taken from sys.prefix if not specified. Is there a way to do this other than fiddling the site.cfg file? Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http

Re: [Tutor] mac os x executable

2009-07-07 Thread Bill Campbell
start with something like this: #!/usr/bin/env python # do stuff here Then ``chmod +x mypython.py'' and it's ready to go. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676

Re: [Tutor] mac os x executable

2009-07-07 Thread Bill Campbell
for X11 applications that one can click on or drop files on to execute them. For instance, I have one I call Gvim.app that executes the vim editor in an xterm (I don't like the GUI versions of vim, but prefer working in a simple xterm). Bill -- INTERNET: b...@celestial.com Bill Campbell

Re: [Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread Bill Campbell
, or perhaps it's being executed as the wrong user or something. (Linux environment) Are you closing or flushing the output file before starting the subprocess? Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way

Re: [Tutor] != -1: versus == 1

2009-07-17 Thread Bill Campbell
if ``Source Heigtht'' is not in line, and one generally wants to have the test return True if there is something to do. The alternative would be to say ``if not line.find('Source Height') == -1: ...'' Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http

Re: [Tutor] Issues with regex escaping on \{

2009-07-29 Thread Bill Campbell
(r'UserID: \{(.+)\}',...) The alternative is to backwhack any special characters with an appropriate number if ``\'' characters, whatever that may be. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice

Re: [Tutor] What is Curses and why do they call it that.

2009-10-12 Thread Bill Campbell
that require efficient, heads-down data entry where one does not want to take fingers off of home keys or numeric keypads. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676

Re: [Tutor] Faster list searching?

2009-11-18 Thread Bill Campbell
to deal with large lists, I have found that using an intermediate dictionary can save huge amounts of time. Something like: dict2 = {}.fromkeys(list2) for x in list1: if x not in dist2: dict2[x] = True list2 = dict2.keys() Bill -- INTERNET: b...@celestial.com Bill

[Tutor] email module, convert non multipart to multipart message

2010-01-25 Thread Bill Campbell
and the clean key, but I think there ought to be a neater way. Thanks. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186

[Tutor] imaplib command to delete messages

2010-02-26 Thread Bill Campbell
documentation as lots of ways to delete mailboxes (folders) and expunge messages from folders, but I don't see anything about marking individual messages as deleted. What am I missing? Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO

Re: [Tutor] Why is the max size so low in this mail list?

2010-03-01 Thread Bill Campbell
in the body of the message. That's a feature I would like to see an all webmail servers. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread Bill Campbell
= dict( key1 = MyStuff('john', 1), key2 = MyStuff('bill', 2), ) vals = d.values() vals.sort() # vals should be sorted by income in descending order and name. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641

Re: [Tutor] Sorting Dictionary of Dictionary by certain Value

2008-09-23 Thread Bill Campbell
On Tue, Sep 23, 2008, Bill Campbell wrote: On Wed, Sep 24, 2008, John Fouhy wrote: 2008/9/24 Joe Python [EMAIL PROTECTED]: Hi Pythonistas, I have a large dictionary of dictionary (50,000+ keys) which has a structure as follows: [snip] I want to sort the dictionary by 'income

Re: [Tutor] dealing with user input whose value I don't know

2008-10-02 Thread Bill Campbell
of input resulting in sql injection attacks, and other breaches. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186

Re: [Tutor] python based blogging software/cms?

2008-11-03 Thread Bill Campbell
PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 If taxation without consent is not robbery, then any band of robbers have only to declare

Re: [Tutor] Decimal fixed point representation

2008-11-21 Thread Bill Campbell
since they were designed primarily to run COBOL accounting applications. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206

Re: [Tutor] reading output from a c executable.

2008-12-20 Thread Bill Campbell
-- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Independent self-reliant people would be a counterproductive

Re: [Tutor] beginsWith multiple prefixes

2008-12-24 Thread Bill Campbell
the prefix that matched as the caller already knows what ``word'' is. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232

Re: [Tutor] eval and floating point

2009-01-14 Thread Bill Campbell
Thing(tm) when dividing two integers, returning an integer result. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186

Re: [Tutor] *nix tail -f multiple log files with Thread

2009-02-15 Thread Bill Campbell
it? The ``swatch'' program, written in perl, does this by using the gnu-tail program via a pipe using. gtail --follow=name --lines=1 file1 file2 ... Use the source Luke. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box

Re: [Tutor] *nix tail -f multiple log files with Thread

2009-02-16 Thread Bill Campbell
On Mon, Feb 16, 2009, David wrote: Bill Campbell wrote: The ``swatch'' program, written in perl, does this by using the gnu-tail program via a pipe using. gtail --follow=name --lines=1 file1 file2 ... Use the source Luke. ... That looks like the right tool for the job at hand. Looking

Re: [Tutor] glob in order of the file numbers

2009-03-06 Thread Bill Campbell
$ python globbing.py This is four This is one This is two This is three Could somebody please tell me how to get the output in the right order? files = glob.glob('*.temp') files.sort() for file in files: ... Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial

Re: [Tutor] sorting file paths made up of of strings and numbers

2009-04-14 Thread Bill Campbell
, Bloomington ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http

Re: [Tutor] quick question to open(filename, 'r') vs. file(filename, 'r')

2009-05-04 Thread Bill Campbell
? Cheers for a quick shot of enlightenment ;-) ``pydoc file'' is your friend. It says open is an alias for file. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer

Re: [Tutor] Processing Linux command line output

2013-04-24 Thread Bill Campbell
= os.popen('ifconfig') for line in fh: # scan line here The more modern way to handle this is using the subprocess module with something like: from subprocess import PIPE, Popen fh = Popen('ifconfig', stdout=PIPE).stdout ... Bill -- INTERNET: b...@celestial.com Bill Campbell

[Tutor] Library for rtf to text?

2006-07-12 Thread Bill Campbell
that if necessary, but would prefer a pure python solution. Any hints on this? Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``I have

Re: [Tutor] is there a tutorial on ez_install.py

2006-09-08 Thread Bill Campbell
things impossible''. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``People who relieve others of their money with guns

Re: [Tutor] is there a tutorial on ez_install.py

2006-09-08 Thread Bill Campbell
On Fri, Sep 08, 2006, Kent Johnson wrote: Bill Campbell wrote: On Fri, Sep 08, 2006, Kent Johnson wrote: http://peak.telecommunity.com/DevCenter/EasyInstall Is it possible to use EasyInstall to install relative to a directory other than the site-packages directory in the manner

[Tutor] python equivalent of perl readlink()?

2006-10-15 Thread Bill Campbell
rather than the relative one (/usr/local/bin/ls in the case above). Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``It's time

Re: [Tutor] python equivalent of perl readlink()?

2006-10-15 Thread Bill Campbell
On Sun, Oct 15, 2006, Michael P. Reilly wrote: On 10/15/06, Bill Campbell [EMAIL PROTECTED] wrote: Is there a python equivalent of the perl readlink() function (e.g. one that returns the relative path in cases where a command such as ``ln -s ls /usr/local/bin/gls'' created

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread Bill Campbell
On Mon, Oct 16, 2006, Alan Gauld wrote: Bill Campbell [EMAIL PROTECTED] wrote in messageThe function is in the os module ([2] http://docs.python.org/lib/os-file-dir.html). Silly me. I was looking in the os.path module :-). Yes, its confusing/. One thing that should be rationalised

Re: [Tutor] Capture telnet output to a file?

2006-10-16 Thread Bill Campbell
captures your entire session. I haven't used pexpect with python yet, but the perl expect module can also be used to capture things like this, and I would expect that one could do this with pexpect as well. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http

Re: [Tutor] Capture telnet output to a file?

2006-10-16 Thread Bill Campbell
] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 To say that UNIX is doomed is pretty rabid, OS/2 will certainly play a role, but you don't build a hundred million

Re: [Tutor] can i pass a list to a function and get one back ?

2006-10-21 Thread Bill Campbell
) return some_list is this cool ? Ayup! The best way to find answers to questions like this is to just do it, and see what python does. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232

Re: [Tutor] Has anyone tried matplotlib...??

2006-10-22 Thread Bill Campbell
On Sun, Oct 22, 2006, Matt Richardson wrote: I just used it a couple of weeks ago to produce a histogram of randomly generated numbers. Read the documentation, it's well written and has good examples. You might also want to look at gnuplot. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell

Re: [Tutor] ***SPAM*** List to dictionary

2006-12-06 Thread Bill Campbell
-- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``Find out just what people will submit to, and you have found out the exact amount

Re: [Tutor] file open error

2007-02-08 Thread Bill Campbell
(/etc/dhcpd.conf,r) TypeError: an integer is required I dont know what the issue is? any hints ? It appears to me that your ``from os import *'' is biting you in the butt as the os.open command is being executed instead of the normal open. Bill -- INTERNET: [EMAIL PROTECTED] Bill

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Bill Campbell
the ``mutt'' mailer, this effort is simply pressing ``L'' instead of ``r'' when posting to the list and adding the listname to the subscribe section of ~/.muttrc, hardly a major inconvenience. http://www.unicom.com/pw/reply-to-harmful.html ... Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Bill Campbell
On Thu, Feb 15, 2007, Luke Paireepinart wrote: Bill Campbell wrote: The major reason for not setting Reply-To: thelist is that it makes it *SLIGHTLY* more difficult to post something to the list and replys should go to the sender. IHMO, one should have to go to a little bit of effort before

Re: [Tutor] dictionaries and memory handling

2007-02-23 Thread Bill Campbell
documentation). These can be treated exactly like dictionaries in python, and are probably orders of magnitude faster than using an SQL database. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206

Re: [Tutor] dictionaries and memory handling

2007-02-23 Thread Bill Campbell
On Fri, Feb 23, 2007, Alan Gauld wrote: Bill Campbell [EMAIL PROTECTED] wrote It seems that an SQL database would probably be the way to go, but I am a bit concerned about speed issues (even though running time is ... You would probably be better off using one of the hash databases, Berkeley

Re: [Tutor] Passing a list, dict or tuple to MySQLdb?

2007-03-07 Thread Bill Campbell
PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Few skills are so well rewarded as the ability to convince parasites that they are victims. -- Thomas Sowell

Re: [Tutor] Question about exception

2007-04-05 Thread Bill Campbell
) try: check_something() except MyException, e: for entry in e.mylist: ... Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676

Re: [Tutor] os.path.join question

2007-05-03 Thread Bill Campbell
On Wed, May 02, 2007, Jason Coggins wrote: Is it possible to use os.path.join to link to a file located in the directory above where you are currently located? os.path.join('..', filename) os.path.realpath(os.path.join('..', filename)) Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell

Re: [Tutor] How to test for a remainder from division

2007-05-14 Thread Bill Campbell
: import calendar if calendar.isleap(year): ... Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software, LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 We contend that for a nation to try

[Tutor] Behaviour of dictionaries and others when deleting?

2007-05-21 Thread Bill Campbell
of deleting items while processing things like this, keeping a list of keys to be deleted, then processing that list upon completion of the mail loop to delete the items from the original dictionary or database file. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software, LLC URL

Re: [Tutor] Behaviour of dictionaries and others when deleting?

2007-05-22 Thread Bill Campbell
On Mon, May 21, 2007, Kent Johnson wrote: Bill Campbell wrote: Is the behaviour defined if one is processing a dictionary using iteritems, and delete items? for k, v in d.iteritems(): if somecondition(k, v): del d[k] Would this process all the original members of the dictionary

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

2007-06-14 Thread Bill Campbell
wants to run a version that's not first in the PATH. In that case one needs to put the full path to the proper executable. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186

Re: [Tutor] Stupid newbie question

2005-09-23 Thread Bill Campbell
sharing services. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``You know the one thing that's

Re: [Tutor] Importing Modules Within Classes

2005-10-07 Thread Bill Campbell
... class ... # other things that don't need the extra functions. All that's necessary to activate the interactive classes and other related stuff is to include the curses routines before importing the modules that may or may not use them. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell

Re: [Tutor] python ncurses vs OS X Tiger's xterms.

2005-10-14 Thread Bill Campbell
, but it would be much nicer if there is something I can handle in my python ncurses routines than if I have to dig into the keyboard mapping stuff. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX

[Tutor] Who called me?

2005-11-08 Thread Bill Campbell
know how to get to that. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ My brother sent me

Re: [Tutor] Who called me?

2005-11-10 Thread Bill Campbell
On Tue, Nov 08, 2005, Kent Johnson wrote: Kent Johnson wrote: Bill Campbell wrote: Is there a way in python for a method to determine its parent? In particular, I'm working with SimpleXMLRPCServer, and would like to be able to find the client_address in the routine that has been dispatched. I

Re: [Tutor] Who called me?

2005-11-10 Thread Bill Campbell
On Thu, Nov 10, 2005, Kent Johnson wrote: Bill Campbell wrote: The problem I'm working on now is to have our client's machines connect to our XML-RPC server in cron jobs which will do at least two things, check to see if their dynamic IP address has changed so we can update DNS for them

Re: [Tutor] Postgresql+Python -tutorial?

2006-02-10 Thread Bill Campbell
the python sqlobject system which provides a very object oriented wrapper on top of relational databases. Using sqlobject can make many database functions very easy, and largely independent of the underlying database. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL

Re: [Tutor] Test If File System is mounted in Linux

2006-03-17 Thread Bill Campbell
: [EMAIL PROTECTED] Bill Campbell; Celestial Systems, Inc. URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``I presume you all know who I am. I am humble Abraham Lincoln. I have been solicited by many friends

Re: [Tutor] Test If File System is mounted in Linux

2006-03-17 Thread Bill Campbell
On Fri, Mar 17, 2006, Adam wrote: On 17/03/06, Bill Campbell [EMAIL PROTECTED] wrote: On Fri, Mar 17, 2006, Michael Lange wrote: On Fri, 17 Mar 2006 00:36:35 -0700 fortezza-pyt [EMAIL PROTECTED] wrote: If there a semi-standard way to test if a file system has been mounted or not using

Re: [Tutor] Test If File System is mounted in Linux

2006-03-17 Thread Bill Campbell
of these systems have the gnu gdf which returns information in the same format. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Systems, Inc. URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676

Re: [Tutor] Python + PostGreSQL

2006-03-31 Thread Bill Campbell
-- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 A child can go only so far in life without potty training. It is not mere coincidence that six

Re: [Tutor] Regex Ordering

2007-07-23 Thread Bill Campbell
are tested first. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Virtually everything is under federal control nowadays except

Re: [Tutor] Bookpool sale on Addison Wesley

2007-08-09 Thread Bill Campbell
or Powells. They're generally the first place I look. (my only assocation with any of them is as a customer). ... Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA

Re: [Tutor] Image Analysis

2007-09-11 Thread Bill Campbell
PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 We'll show the world we are prosperous, even if we have to go broke to do it. Will Rogers

Re: [Tutor] Image Analysis

2007-09-12 Thread Bill Campbell
On Wed, Sep 12, 2007, Kent Johnson wrote: Bill Campbell wrote: Most mailing lists limit the size of messages to 40k or less. On this list large messages go to moderation. I think I was so captivated with the images that I forgot about the size. A better way to present this would be to put

Re: [Tutor] function for removing all white spaces from a string

2007-10-01 Thread Bill Campbell
('', dirtystring) Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Marijuana will be legal some day, because the many law students who

Re: [Tutor] Re-Naming an existent file

2007-10-10 Thread Bill Campbell
On Wed, Oct 10, 2007, Ed Goulart wrote: Hello! Though I've tried very hard, I couldn't find in the WEB the needed help; so, if you can help me, please...!!! import os os.rename(old, new) Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http

Re: [Tutor] Windows - Linux based open() file handle mode

2007-11-19 Thread Bill Campbell
quotes to get what you want. blast_out = open(r'C:\human\prb_blast.out','U') Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676

Re: [Tutor] Spaces and tabs messing up code

2008-01-08 Thread Bill Campbell
, add a line ``set expandtab'' (Friends don't let friends use emacs :-). Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Giving

Re: [Tutor] appending to a list

2008-01-30 Thread Bill Campbell
. This should be easy, but I've never seen example code. any pointers? mylist.append(somefunc()[1]) Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206

Re: [Tutor] Truncate First Line of File

2008-02-27 Thread Bill Campbell
that might be better wouldn't use python at all. Edit the file in place with ed or ex: #!/bin/sh ex - filename DONE 1d w q DONE Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer

[Tutor] imaplib and mutt flags

2014-01-29 Thread Bill Campbell
. I would like to have the script restore the 'N' status flag that mutt uses instead of 'O'. The mail server is using courier-imap with Maildir stores on CentOS Linux. Mutt access is direct on the file system, not via IMAP. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software

Re: [Tutor] imaplib and mutt flags

2014-01-30 Thread Bill Campbell
On Thu, Jan 30, 2014, Alan Gauld wrote: On 30/01/14 02:45, Bill Campbell wrote: I'm writing a python script which uses imaplib We don't get many messages about imaplib so I'm not sure how many folks here know about it. I've used it off and on for years, but still don't know much about

Re: [Tutor] python smtplib 'Message denied - From address spoofing attempt detected via SMTP

2016-03-25 Thread Bill Campbell
inks the 'From:' address, <no-re...@jss.hs.org> is bogus. There's no MX record for jss.hs.org, and no IP address for jss.hs.org either. The From: address should be legitimate and deliverable. It might also accept a legitimate 'Reply-To:' address. Bill -- INTERNET: b...@celestial.

Re: [Tutor] Unable to get the gateway IP of wlan interface using python code

2018-11-12 Thread Bill Campbell
available to test this, but I think this pattern should work: re.compile(r'^(default|0\.0\.0\.0)\s+(\S+)') Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www2.celestial.com/ PO Box 820; 6641 E. Mercer Way Mobile: (206) 947-5591 Mercer Island