Re: simultaneous reading and writing a textfile

2006-05-16 Thread Larry Bates
ook at seek(), write() methods. The alternative is to create a different file (read/write the entire file)each time you want to make a change. Unless the file is REALLY long, this will be extremely fast. If you have a LOT of data you want to work with this way and it is changing a lot, you need to use a database not a text file for data storage. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: calling upper() on a string, not working?

2006-05-16 Thread Larry Bates
'I' and 'i' as you do in the lower case version of the string. >>> set(original.split('|')[0]) set(['a', ' ', 'c', 'e', 'd', "'", 'f', 'i', 'h', ',', 

Re: Beautiful parse joy - Oh what fun

2006-05-16 Thread Larry Bates
dic[column[1].findNext('font').string.strip()]= > column[2].findNext('font').string.strip() > > for key in dic.keys(): > print key, dic[key] > > The problem is I am missing the last name ABLE. How can I get "ALL" > of the text. Clearly I have something wrong with my font string.. but > what it is I am not sure of. > > Please and thanks!! > In the last row you have 3 tags. The first one contains LOO the second one is empty and the third one contains ABLE. LOO ABLE Your code is not expecting the second (empty) tag. -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: number of different lines in a file

2006-05-18 Thread Larry Bates
(hash_dict.keys()) if __name__=="__main__": fn='c:\\test.txt' total_lines, distinct_lines=number_distinct(fn) print "Total lines=%i, distinct lines=%i" % (total_lines, distinct_lines) -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: Script to make Windows XP-readable ZIP file

2006-05-19 Thread Larry Bates
> This produces an archive that can be extracted by Windows XP using its > built-in > capability, by WinZip, or by another Python script. Now that I have > the solution it > seems to make sense, but it wasn't at all obvious when I started. > > Paul Cornelius > O

Re: Name conflict in class hierarchy

2006-05-20 Thread Larry Bates
le__', '__name__', 're'] Depending on the author, you may also be able to get extensive help on all the methods with help(). >>> help(ConfigParser) Help on module ConfigParser: NAME ConfigParser - Configuration file parser. FILE c:\python24\lib\configparser.py DESCRIPTION A setup file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: buffers readlines and general popen2 confusion...

2006-05-20 Thread Larry Bates
ght we worth a look. http://caspian.dotconf.net/menu/Software/LogDog/v1.0-old/ -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-20 Thread Larry Bates
We often referred to programs written in APL as "write only code" because going back to read what you had written after-the-fact was very hard. You could write in one line of APL what takes 1000's of lines of C or even Python and it was pretty efficient also (for applications that needed to manipulate vectors or matrices). I understand what you are trying to say, but I can't support your conclusions as presented. -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: windows xp scripting

2006-05-22 Thread Larry Bates
mate?' > > > Is there a more efficient way of doing this? > Suggested changes: import os import glob import shutil dirfrom = 'C:\\test' dirto = 'C:\\test1' if not os.path.exists(dirto): os.makedirs(dirto) for src in glob.glob(os.path.join(dirfrom, "*.

Re: problem with writing a simple module

2006-05-22 Thread Larry Bates
thod. > > anyone know what i am doing wrong? > > thanks > You can do either: from DbConnector import * x=DbConnector() or (preferred method these days) import DbConnector x=DbConnector.DbConnector() When you zay x=DbConnector all you are doing is setting a variable (pointer) x that points to the class DBconnector, which is basically an alias. x in fact would not have a getOne method as it hasn't been instantiated yet. -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with writing a simple module

2006-05-22 Thread Larry Bates
set of understanding, but once you get it you can write reusable classes and productivity really begins to take off. If you haven't yet picked one up, get a copy of the Python Cookbook (really good) and if you do Windows get a copy of Python Programming on Win32. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: File attributes

2006-05-22 Thread Larry Bates
you can (barely tested): import win32api import win32con fattrs=win32api.GetFileAttributes(filename) if fattrs & win32con.FILE_ATTRIBUTE_ARCHIVE: # # Archive bit set # -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: real time info to web browser from apache side ?

2006-05-23 Thread Larry Bates
ry few seconds by imbedding a header at the top. Something like: Refresh every 10 seconds. -Larry Bates would refresh every 10 seconds. -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-24 Thread Larry Elmore
a > killfile. It is certainly less of a hassle than all this complaining > you do. No shit. Lately it seems that for every "spam" post of Xah's, there's at three or more by John *to all the same newsgroups* bitching about Xah's use of bandwidth. Pot, meet kettle. I'm killfiling Xah for being a useless twit and killfiling John for being a prick about it. --Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Web frameworks and credit cards

2006-05-25 Thread Larry Bates
TrustCommerce (www.trustcommerce.com) has an easy to use Python interface (they other interfaces as well) that I've used on a large Zope project recently. -Larry Bates Ed Leafe wrote: > I may have an opportunity to develop an online ordering system for a > client, and will have

Re: os listdir access denied when run as a service

2006-05-25 Thread Larry Bates
) > > anything I can do about this.. > > > - > Thomas Thomas > Remember that services run under a different context than the foreground login. You can configure services to run under a user context by editing that info in the service control panel applet under the Log On tab at the top. The default is to run the service under Local System account which probably doesn't have any mapped drives. -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: Modify one character in a string

2006-05-25 Thread Larry Bates
er return ''.join(b) You should open file in binary 'b' mode. Use .seek() method to seek to the character you want to replace. use .write() method to write one character. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: access to TimesTen using python

2006-05-25 Thread Larry Bates
gunsupancar wrote: > is there any module to access > TimesTen in-memory database using python? > I didn't find native one, but TimesTen has ODBC interface that you could use. http://www.compwisdom.com/topics/ODBC -- http://mail.python.org/mailman/listinfo/python-list

Re: hide python window, con'td

2006-05-26 Thread Larry Bates
ssarily looping. Pick up a copy of Mark Hammond's Python Programming on Win32 book for example services in Python. You could then start/stop the service with service manager or with net start/ net stop commands. -Larry Bates Bell, Kevin wrote: > Great! And now that it's hiding w/ .p

Re: hide python window, con'td

2006-05-26 Thread Larry Bates
t services aren't really all that hard to write after you first one. Larry Bates Robin Becker wrote: > Larry Bates wrote: >> Something that runs all day in the background is a perfect candidate >> for being turned into a Service. That and servicemanager has a good >>

Re: access serial port in python

2006-05-26 Thread Larry Bates
pyserial? http://pyserial.sourceforge.net/ -Larry [EMAIL PROTECTED] wrote: > hi > i hav written a code in python to send an SMS from a nokia 3310 > connected to my PC... > i wanted to receive a msg on my PC. In order to do so, the PC must know > when it has to read data frm

Re: csv to xls using python 2.1.3

2008-01-23 Thread Larry Bates
LizzyLiz wrote: > Hi > > I need to convert a .csv file to .xls file using python 2.1.3 which > means I can't use pyExcelerator! Does anyone know how I can do this? > > Many thanks > LizzyLiz FYI - Excel can read .CSV files directly and convert them to .XLS. -Larry

Re: is possible to get order of keyword parameters ?

2008-01-25 Thread Larry Bates
Keyword arguments are normally treaded as "order independent". Why do you think you need to find the order? What problem do you wish to solve? -Larry rndblnch wrote: > (sorry, draft message gone to fast) > > i.e. is it possible to write such a function:

Re: Too many open files

2008-02-04 Thread Larry Bates
to split on, then you only have to have 1 file at a time open. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Traversing python datatypes via http

2008-02-06 Thread Larry Bates
you are trying to accomplish. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: TheSchwartz in Python?

2008-02-06 Thread Larry Bates
> [2] http://brad.livejournal.com/2332359.html Are you sure CRON won't do the job for you. If not, then you may want to at least take a look at Python's sched module (if you haven't already). -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Small problem executing python script as shortcut

2008-02-07 Thread Larry Bates
ation (setup.exe) program. It takes care of all this for you. 2) Take a look at py2exe to bundle your entire application up so that you don't need python on the machine at all. Hope info helps. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Using a signal to terminate a programm running with an asyncore loop

2008-02-08 Thread Larry Bates
ease share a little of the code you used to "catch" the signal. What signal(s) are you catching? What kill level are you sending (these have to match up). I've used this quite successfully in some of my programs. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: keyword 'in' not returning a bool?

2008-02-08 Thread Larry Bates
Now try >>>> bool('t' in sample) == True > True > > Can someone explain what is going on? > Precedence. In: 't' in sample == True sample == True is evaluated first then 't' in that which is false you should write ('t' in sample) == True but that is unnecessary because t' in sample is easier to read and to code and less prone to this problem. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: What do Python IDEs use for the member drop-down?

2008-02-08 Thread Larry Bates
"getb" ] > def __getattr__(self, attr): > if attr == "geta": > return self.__dict__["a"] > elif attr == "getb": > return self.__dict__["b"] > else: > raise AttributeError I "think" I understand what you want. Try this: class tryit(object): def __init__(self, a, b): self.__a = a self.__b = b def __ga(self): return self.__a def __gb(selt): return self.__b geta=property(__ga, 'ga property') getb=property(__gb, 'gb property') -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Using a signal to terminate a programm running with an asyncore loop

2008-02-08 Thread Larry Bates
[EMAIL PROTECTED] wrote: > On Feb 8, 7:04 am, Larry Bates <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> I'm developing a program that runs using an asyncore loop. Right now >>> I can adequately terminate it using Control-C, but as things get >

Re: CSV Reader

2008-02-11 Thread Larry Bates
; > reader = csv.reader(f) > for data in reader: > read data file > > write new CSV > > Cheers > > Mike > What part "obviously" doesn't work? Try something, post any tracebacks and we will try to help. Don't ask others to write your code for you without actually trying it yourself. It appears you are on the right track. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Email Directly from python

2008-02-13 Thread Larry Bates
portable fashion without a smtp > server installed on the machine? > > Thanks, > Brad smtp module can do what you want yes. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: copying files through Python

2008-02-13 Thread Larry Bates
t;move '%s'->'%s'" % (srcfile, dst) shutil.move(os.path.join(root, f), dst) -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: average of PIL images

2008-02-18 Thread Larry Bates
totaldiff=sum(ImageStat.Stat(diff)._getmedian()) Maybe at least this will point you in the right direction. -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: is this data structure build-in or I'll have to write my own class?

2008-02-20 Thread Larry Bates
like a good time to learn ElementTree (included in Python 2.5 but available for earlier versions). -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Python seems to be ignoring my except clause...

2008-02-20 Thread Larry Bates
trying to catch here. Example: try: self.data.append(string.encode()) except UnicodeEncodeError: self.data.append('No habla la Unicode') You can spend a lot of time trying to figure out what is going on when your blank except catches all the exceptions. This lets the other exceptions do what they should do. Hope this helps. Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling locked db tables...

2008-02-20 Thread Larry Bates
t and do some stuff until finished with > port > > PART II: > LOCK TABLE port_usage READ > UPDATE port_usage SET in_use = 0 WHERE port = available_port; > UNLOCK TABLES; > > Several of these *may* be happening simultaneously so when a second > request comes in, and the first one has the table locked, I want to > have the PART I sql still work. Any suggestions here? > I think you want to use SELECT for UPDATE or SELECT LOCK IN SHARE MODE. Here is a link that might help: http://dev.mysql.com/doc/refman/5.1/en/innodb-locking-reads.html -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
actor of 3-4x in personal productivity (over Java). Improvements in runtime performance wouldn't hurt, but for many applications that's not an issue. (If optional data typing were offered, Python's penetration in the enterprise space would be even higher, and I suspect there would be pe

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
PS: And tools like ShedSkin and Pyrex benefit. -- http://mail.python.org/mailman/listinfo/python-list

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
nd as I suggested earlier, I think the byte code interpreter could be made a lot smarter and faster. ...and corporate acceptance would follow. Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for web...

2008-02-25 Thread Larry Bates
it done in Python? You don't really need regular expressions for this simple transformation: na="Abc | def | ghi | jkl [gugu]" na=" ".join([x.strip() for x in na.replace("[","|").replace("]","").split("|")]) -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: convert string number to real number - ValueError: invalid literal for int() with base 10: '"2"'

2008-02-28 Thread Larry Bates
#talktime = talktime + int(a) > #return talktime , num_of_calls > x=0 > #print "this" + str(number) + str(num_mins) > for a in num_mins: > b=int(a) > x=x+b > print str(number), str(x), str(type(x)) > > output should look like this (parts of script are not included) > 555-555- replaced the innocent :P): > 555-555- 19 > 555-555- 6 > 555-555- 3 > 555-555- 3 > 555-555- 2 > 555-555- 52 If the file is quote and comma delimited, you should be using the csv module to do your reading and stripping of the quotes. Should make things MUCH easier. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Python app at startup!

2008-02-28 Thread Larry Bates
n i use console instead od window in py2exe i get > console opend but it closes. > > Help please! > > There is a single quote at the end of your string but no matching quote at the beginning. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: How to configure Python in Windows

2008-02-28 Thread Larry Bates
full tracebacks on this newsgroup so we can help. It is more likely that you actually have a syntax error in foo.py. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: how to remove suffix from filename

2008-03-19 Thread Larry Bates
re a function in python to do this or do i have tosplit it ..? > thanks > RG import os fname='F:/mydir/two.jpg' filenameonly=os.path.splitext(os.path.basename(fname))[0] -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Larry Bates
with Assembler so they could understand what was actually going on. I see so may on this forum that have the wrong ideas about variable names/ storage. Good Luck, Larry Bates -- http://mail.python.org/mailman/listinfo/python-list

Re: Outlook 2003 and Python

2008-03-25 Thread Larry Bates
the second bulleted item, click the options you want. To choose a folder, click the arrow next to the Into list. Click Create. Note To create more complex rules for organizing items, you can also use the Rules and Alerts dialog box on the Tools menu. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading new mail from outlook

2008-03-25 Thread Larry Bates
I can think of is to get a copy of SpamBayes source code and see how it is done there. Much easier to look at something that already looks at new messages as they arrive in the Inbox than to try to figure it out. http://spambayes.sourceforge.net/windows.html -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Py2exe embed my modules to libary.zip

2008-03-27 Thread Larry Bates
Create your py2exe distribution without a zipfile and all the modules will just be put into the installation directory. Use Inno Setup to make a proper installer for your application. -Larry On Thu, 2008-03-27 at 06:44 -0700, [EMAIL PROTECTED] wrote: > On 27 ožu, 10:44, "Gabriel G

Re: simple web-server

2008-03-28 Thread Larry Bates
ood answer, could you point me to a good > (nontrivial) example? > > thank you, muro Take a look at twisted web, it fits in between. -Larry -- http://mail.python.org/mailman/listinfo/python-list

newbie OOP question (what's the analogue to java interfaces in Python?)

2009-01-15 Thread Larry Caruso
I'm an old time C programmer, but a newbie to OOP and Python. One OOP book I'm reading, "Holub on Patterns," discusses Java Interfaces in some detail (see http://en.wikipedia.org/wiki/Interface_(Java) for example) but with limited time, I'm hoping to avoid learning Java just to understand some key

Re: Finding the instance reference of an object

2008-10-16 Thread Larry Bates
instances[name] and/or you can pass the name in as an argument to the __init__ method of objectname so that it can "hold" the name of the dictionary key that references it (good for debugging/logging). -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-10-16 Thread Larry Bates
Joe Strout wrote: On Oct 16, 2008, at 10:59 AM, Larry Bates wrote: how do i find that the name is 'bob' Short answer is that you can't. This because Python's names (bob) are bound to objects (modulename.objectname()). They are NOT variables as they are in "oth

python-list@python.org

2008-10-19 Thread Larry Bird
http://militarybodyarmor.blogspot.com/2008/10/law-enforcement-certifications.html - Here it is don't miss out! -- http://mail.python.org/mailman/listinfo/python-list

Re: windows / unix path

2008-10-20 Thread Larry Bates
rd slashes work fine on Windows also (undocumented feature of Windows). -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating single .exe file without py2exe and pyinstaller

2008-10-20 Thread Larry Bates
plications: http://shed-skin.blogspot.com/ Regards Tino 3) Stop worrying about the size of the distribution. In today's world 4Mb is trivial to download. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: quick newbie syntax question

2008-10-20 Thread Larry Bates
ose objects that passed the filtering function: def myFilter(obj): return (obj.date >= '2008-09-01' and obj.date <= '2008-09-30') class objects(object): def __init__(self): self.objects = [] def filter(filterFunc): return [x for x in self.object

Re: Need some advice

2008-10-22 Thread Larry Bates
from O'Reilly. It is an excellent starting place for you. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: socket programming (client-server)

2008-10-22 Thread Larry Bates
uess its a firewall problem... How do i go abt it? any help? Yes it is a firewall problem. To make sure, turn off the firewall on a machine that doesn't work and try the application again. If that works, put an exception in the firewall for your application's port. -Larry -- ht

Re: which program I need for sftp using pramiko??

2008-10-22 Thread Larry Bates
ortant between two machines on the same LAN? If it really is that important, just use scp between the two machines. You don't really have to reinvent the wheel to copy files between to machines. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Need some advice

2008-10-24 Thread Larry Bates
alex23 wrote: On Oct 23, 3:15 pm, Larry Bates <[EMAIL PROTECTED]> wrote: Bruno is correct, the protocol IS https, you don't type shttp into your browser get secure http connection. https[1] and shttp[2] are two entirely different protocols. [1] http://en.wikipedia.org/wiki/Htt

Module python-magic on/for Windows - UPDATE: WORKING & HowTo!!!

2008-10-26 Thread Larry Hale
once that one's working... :) But for now... Cheers, Larry REF: http://groups.google.com/group/comp.lang.python/browse_thread/thread/4c60ec1599056df8/3eff4049a7bfdfc0?hl=en%E3%AD%82a54360c4d26&lnk=gst&q=python-magic#3eff4049a7bfdfc0 -- http://mail.python.org/mailman/listinfo/python-list

Module python-magic on/for Windows - UPDATE: WORKING & HowTo!!!

2008-10-26 Thread Larry Hale
once that one's working... :) But for now... Cheers, Larry REF: http://groups.google.com/group/comp.lang.python/browse_thread/thread/4c60ec1599056df8/3eff4049a7bfdfc0?hl=en%E3%AD%82a54360c4d26&lnk=gst&q=python-magic#3eff4049a7bfdfc0 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get an object's name as a string?

2008-10-28 Thread Larry Bates
y logical. Example: objects = [] objects.append(myObject('a')) # # Find object with name == 'a' # obj = None for object in objects: if object.name == 'a': obj = object -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better/simpler way to filter blank lines?

2008-11-04 Thread Larry Bates
()) Bye, bearophile Of if you want to filter/loop at the same time, or if you don't want all the lines in memory at the same time: fp = open(filename, 'r') for line in fp: if not line.strip(): continue # # Do something with the non-blank like: # fp.

Re: More __init__ methods

2008-11-06 Thread Larry Bates
# else: # # Don't know what to do with unknown type # raise ValueError() -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Dispatch('Excel.Application') on Vista from Task Scheduler

2008-11-09 Thread Larry Bates
o run the application using the same credentials as the foreground user to see if that makes a difference. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a nitty-gritty Python Ajax middleware script to fire off a number of processors

2008-11-09 Thread Larry Bates
dispatches background processes and handles the callbacks from those processes. Twisted Web could then update the HTML pages that users are watching by refreshing them periodically. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python have Multiple Inheritance ?

2008-11-09 Thread Larry Bates
asses. wxPython, for instance, wouldn't be nearly so flexible without it. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Python COM: Automatic wrap/unwrap?

2008-11-09 Thread Larry Bates
rom, or a magic attribute I can set, or some registration process I can use, to get instances of my class automatically wrapped and unwrapped? You should post this on comp.python.windows as Mark and the other Windows/COM gurus hang around there a lot. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Ban Xah Lee

2009-03-09 Thread Larry Gates
rossposting with nothing relevant. I'm happy to hear that c.l.lisp is a cool place. How's that for five eyes? -- larry gates Perl will always provide the null. -- Larry Wall in <199801151818.kaa14...@wall.org> -- http://mail.python.org/mailman/listinfo/python-list

Re: Ban Xah Lee

2009-03-09 Thread Larry Gates
at Usenet is for. ☄ <--- what is that char? http://lomas-assault.net/usenet/z12.jpg I don't know how to answer the question. Is the zeroeth character also null? -- larry gates You have the irritating habit of asking good questions I don't have an easy answer for. Please don

Re: Ban Xah Lee

2009-03-09 Thread Larry Gates
On Tue, 10 Mar 2009 00:37:50 +, Dirk Bruere at NeoPax wrote: > Kenneth Tilton wrote: >> Dirk Bruere at NeoPax wrote: >>> Larry Gates wrote: >>>> On Sun, 08 Mar 2009 04:09:52 +, Dirk Bruere at NeoPax wrote: >>>> >>>>> Dirk Bruere a

Re: Ban Xah Lee

2009-03-10 Thread Larry Gates
On Tue, 10 Mar 2009 01:15:19 -0400, Lew wrote: > s...@netherlands.com wrote: >> On Mon, 09 Mar 2009 22:08:54 -0400, Lew wrote: >> >>> Larry Gates wrote: >>>> For me, the worst thing is when I'm programming, and a bug *actually* gets >>>> o

Re: dict view to list

2009-03-30 Thread Larry Riedel
ce. I am not saying this is the way things /should/ be, but if it was, it would make sense to me. Larry -- http://mail.python.org/mailman/listinfo/python-list

Would you support adding UNC support to os.path on Windows?

2009-04-21 Thread Larry Hastings
he supported it 1999 too.) /larry/ -- http://mail.python.org/mailman/listinfo/python-list

Cleaning out the cobwebs in the PEP cupboard

2009-04-23 Thread Larry Hastings
dwave handwave handwave) without needing opcode support. My quick perusal of these two PEPs doesn't qualify me to recommend their Rejection or Withdrawl. Nevertheless I suspect that both PEPs are dead, they just haven't noticed. I would welcome their authors' consideration of this idea. I hope you will be as gentle with your replies, /larry/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Would you support adding UNC support to os.path on Windows?

2009-04-29 Thread Larry Hastings
atch adds UNC path support to "ntpath"; it does not modify the other "path" implementations. And sorry for the late reply, /larry/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Module python-magic on/for Windows?

2008-05-11 Thread Larry Hale
ommunity.com/DevCenter/ EasyInstall]... I'll -see-... :) ) Ah, sometimes one CAN'T see the forest for the trees; a few hours hacking away at getting things going to THIS point will do it to ya... err, or at least "to me"! :D Thanks, again, Michael... -Larry On May 11, 11:34 am,

Re: Module python-magic on/for Windows?

2008-05-11 Thread Larry Hale
THONPATH and system PATH, to no avail.) Obviously, magic1.dll/magic.py (et al) can't FIND the needed file(s), but I'm not sure how to go about discerning WHERE it/they are looking - any thought(s)/suggestion(s), anyone?? Thanks in advance! -Larry P.S.: Thanks, again, Michael! ;) - L -- http://mail.python.org/mailman/listinfo/python-list

Re: Orlando Florida Python Tutor Needed

2008-05-11 Thread Larry Hale
other than explicitly DOING what they do, which would be [1] messier and/or [2] non-transparent/duplicative, I sadly have no alternative thought[s]... ;) ) Cheers, -Larry Hale -- http://mail.python.org/mailman/listinfo/python-list

Re: list object

2008-05-11 Thread Larry Hale
rpret this as if you're attempting to "call" the list object (["a", "b", ...]) as if it were a function/method Indeed, the "(1)" is what's causing the problem, but it's -because- the list *object* is, well, "not callable". :) As an aside, see what "li" contains if you do: li = ["a", "b", "mpilgrim", "z", "example"][1] ;) Cheers! -Larry Hale -- http://mail.python.org/mailman/listinfo/python-list

Re: Saving an audio file's waveform into an image

2008-05-11 Thread Larry Hale
or my Google search of http://www.google.com/search?hl=en&q=python+snack+module&btnG=Google+Search seemed to show the same thing.) The short answer is: Huh?/What?/Why? Why not put the picture + sound ==> video file. (Sure the image remains static, but there's the Soundtrack with it! ;) ) Cheers, -Larry Hale -- http://mail.python.org/mailman/listinfo/python-list

Re: Module python-magic on/for Windows?

2008-05-11 Thread Larry Hale
On May 10, 11:41 pm, Larry Hale <[EMAIL PROTECTED]> wrote: > I've heard tell of a Python binding for libmagic (file(1) *nixy > command; seehttp://darwinsys.com/file/). Generally, has anybody > built this and worked with it under Windows? > > The only thing I've

Re: Module python-magic on/for Windows?

2008-05-11 Thread Larry Hale
/working in computers (albeit 'Windows' until lately) for ~25 years; yeah, I'm a 'hacker'..." stuff. I -swear-! [EGG ON FACE] [SIGH] Well, I'd say "live and learn", but I'm still scratching my head. But, 'nough of that. Thanks for your r

Re: Module python-magic on/for Windows?

2008-05-11 Thread Larry Hale
On May 11, 11:42 pm, Larry Hale <[EMAIL PROTECTED]> wrote: > THANKS, AGAIN, for the reply! :) > > Okay, now I -really- feel silly... :> > > So, when I was going to try what you'd suggested, I noticed something > peculiar: I hadn't "changed" an

Re: Module python-magic on/for Windows?

2008-05-11 Thread Larry Hale
On May 11, 11:42 pm, Larry Hale <[EMAIL PROTECTED]> wrote: > THANKS, AGAIN, for the reply! :) > > Okay, now I -really- feel silly... :> > > So, when I was going to try what you'd suggested, I noticed something > peculiar: I hadn't "changed" an

Re: Module python-magic on/for Windows?

2008-05-12 Thread Larry Hale
On May 12, 1:34 am, Larry Hale <[EMAIL PROTECTED]> wrote: > The file source (previously linked from http://hupp.org/adam/hg/python-magic/) > has the man pages... Err... I meant "http://downloads.sourceforge.net/gnuwin32/file-4.21- bin.zip?modtime=1180175868&big_m

Re: Module python-magic on/for Windows?

2008-05-12 Thread Larry Hale
On May 12, 1:34 am, Larry Hale <[EMAIL PROTECTED]> wrote: > The file source (previously linked from http://hupp.org/adam/hg/python-magic/) > has the man pages... Err... I meant "http://downloads.sourceforge.net/gnuwin32/file-4.21- bin.zip?modtime=1180175868&big_m

Re: downloading a link with javascript in it..

2008-05-13 Thread Larry Bates
earch'),] data = urllib.urlencode(params) f = urllib2.urlopen("http://www.landrecords.jcc.ky.gov/records/ S3DataLKUP.jsp", data) s = f.read() f.close() open('jcolib.html','w').write(s) You may want to take a look at mechanize, I'm having pretty good luck with using it to do the types of things you describe. http://wwwsearch.sourceforge.net/mechanize/ -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Larry Bates
t as the last you do in the __init__ method of the modal dialog code. If this doesn't help, you will have better luck posting to wxpython newsgroup. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Is using range() in for loops really Pythonic?

2008-05-13 Thread Larry Bates
unications channel. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Dbase / foxpro files

2008-05-15 Thread Larry Bates
Johny wrote: Is there a module for reading/modifing db files from Python? Thanks for help B. Just create a ODBC DataSource (Control Panel/Administrative Tools/ DataSources) and use ODBC to read/write. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem creating a shorcut

2008-05-15 Thread Larry Bates
hand and using the shutil module? Thank you for any ideas. Mike Either you copied wrong or the problem is: "C:\"C:\Program Files... Note the C:\ is specified twice in the string. I think it should read: > "C:\Program Files\Mozilla Firefox\firefox.exe" https: > \www.myCompanyWebsite.com\auth\preauth.php" -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem creating a shorcut

2008-05-16 Thread Larry Bates
Mike Driscoll wrote: On May 15, 2:03 pm, Larry Bates <[EMAIL PROTECTED]> wrote: Mike Driscoll wrote: Hi, I've had this niggling issue from time to time. I want to create a shortcut on the user's desktop to a website that specifically loads Firefox even if Firefox is not the de

Re: Dbase / foxpro files

2008-05-16 Thread Larry Bates
nice thing about using ODBC is that: 1) Nothing to install, every Windows machine has ODBC 2) If you upgrade to some other ODBC compliant database you have little or no changes that are required to your application. Just my 2 cents. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: class problem, NoneType obj has no attribute

2008-05-16 Thread Larry Bates
list' object is not callable when class = class customer: def __init__(self, idnbr, movies): self.idnbr = idnbr self.movies = movies You really should back up and go through the Python tutorial. cust1.movies() tells Python to call the object pointed to by cust1.movies

Cookies and CookieJar

2008-05-16 Thread Larry Bates
>>> cj.set_cookie(c["Manageopen"]) Traceback (most recent call last): File "", line 1, in File "C:\Python25\lib\cookielib.py", line 1617, in set_cookie if cookie.domain not in c: c[cookie.domain] = {} AttributeError: 'Morsel' object has no attribute 'domain' I've looked at everything I can find via Google and nothing seems to help. Thanks in advance. Regards, Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: persistent deque

2008-05-20 Thread Larry Bates
reset to empty list. -Larry -- http://mail.python.org/mailman/listinfo/python-list

<    10   11   12   13   14   15   16   17   18   19   >