Re: automate minesweeper with python

2010-06-30 Thread Jay
On Jun 30, 6:01 pm, Justin Ezequiel wrote: > On Jul 1, 7:39 am, Jay wrote: > > > I would like to create a python script that plays the Windows game > > minesweeper. > > > The python code logic and running minesweeper are not problems. > > However, "seei

Re: automate minesweeper with python

2010-07-01 Thread Jay
pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on, or that I just hit a mine. On Jun 30, 6:51 pm, Paul McGuire wrote: > On Jun 30, 6:39 pm, Jay wrote: > > > I would like to create a python script that plays

Re: automate minesweeper with python

2010-07-02 Thread Jay
On Jul 2, 2:13 pm, Terry Reedy wrote: > On 7/1/2010 10:18 PM, Emile van Sebille wrote: > > > > > > > On 7/1/2010 6:17 PM Terry Reedy said... > >> On 7/1/2010 6:42 PM, Emile van Sebille wrote: > >>> On 7/1/2010 2:52 PM Jay said... > >>>>

Problems Compiling Python 2.6.7 for Win7

2011-06-08 Thread Jay Osako
I have been trying to get PyODBC to work with Python 2.6 (the latest version it is known to be compatible with) and Django, but have run into a problem which, according to the information I've got elsewhere, probably stems from a DLL incompatibility - apparently, the standard CPython distribution f

Re: Problems Compiling Python 2.6.7 for Win7

2011-06-09 Thread Jay Osako
On Jun 8, 6:56 pm, "Gabriel Genellina" wrote: > En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako   > escribi : > > > I have been trying to get PyODBC to work with Python 2.6 (the latest > > version it is known to be compatible with) and Django, but have run > &g

Re: Convert '165.0' to int

2011-07-21 Thread Leo Jay
s of them!) ? I > know I can write a function to do this, but is there anything built-in? > > Thanks > > Frank Millman > How about int(x[:-2])? -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

SQL CE Database (.sdf) file connection with python

2017-01-31 Thread Jay Desai
Hello, I came across a post from Nikhil Joshi at https://mail.python.org/pipermail/python-list/2014-November/681568.html. *.sdf database access - mail.python.org mail.python.org On Saturday, April 21, 2012 6:55:55 AM UTC-

Re: the best online course

2016-07-06 Thread Jay Thompson
There are a ton of great resources on https://wiki.python.org/moin/BeginnersGuide . The resource I generally recommend to people first is "Learn Python The Hard Way" @ http://learnpythonthehardway.org/ . The course is $29.95 and worth every penny but if you can't afford it the author has made the c

Solaris 11 GUI framework

2020-11-02 Thread Jay Braun
Looking for a GUI framework supported on Solaris 11. -- https://mail.python.org/mailman/listinfo/python-list

Re: Solaris 11 GUI framework

2020-11-02 Thread Jay Braun
Thank you. I should have mentioned that I am looking for a Python GUI framework. I neglected to mention that since this is a Python group. Sorry. -- https://mail.python.org/mailman/listinfo/python-list

How to decompile an exe file compiled by py2exe?

2005-09-23 Thread Leo Jay
Dear All, I lost my source code because of my incaution. so anyone can tell me how to decompile the exe file compiled by py2exe? Thanks. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How to decompile an exe file compiled by py2exe?

2005-09-24 Thread Leo Jay
et/crew/theller/moin.cgi/Py2Exe correctly). > Bytecode files extracted should be decompilable to something resembling > original python code by a python decompiler (quick Googling finds > "decompyle": http://www.crazy-compilers.com/). > -- > http://mail.python.org/mailman/listinfo/python-list > -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing an HTML a tag

2005-09-24 Thread Leo Jay
> connect = urllib.urlopen(url) > data = connect.read() > connect.close() > return data > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Plotting points to screen

2005-09-26 Thread jay graves
used a regular image viewer to pan and shrink/zoom. I had the drawing portions of my script well separated from the data parsing and manipulation so tweaking the script was simple. YMMV, but PIL was the best way for me. ... jay graves -- http://mail.python.org/mailman/listinfo/python-list

Re: Parametric Polymorphism

2005-09-27 Thread Jay Parlar
(IIRC) based it off of LISP's system of multi-method dispatch. Instructions for installing can be found here: http://peak.telecommunity.com/ I've used this package quite a bit in the past, and have been very happy with it. It allows for dynamic type AND value based function dis

about install wxPython in Redhat Linux AS 4

2005-09-28 Thread Leo Jay
i do now? i tried to import wx in python, but python just returned an error: Traceback (most recent call last): File "", line 1, in ? ImportError: No module named wx Anyone can help me, please? Thanks -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: about install wxPython in Redhat Linux AS 4

2005-09-28 Thread Leo Jay
wxwindow correctly, i encountered dozens of errors when installing wxpython. i'm just a rookie that i have no idea about how to handle these errors. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Mantain IDE colors and paste them in an HTML page

2005-10-04 Thread jay graves
before. http://webcpp.sourceforge.net/ ... jay -- http://mail.python.org/mailman/listinfo/python-list

Re: setuptools, ez_setup over http proxy

2005-10-13 Thread Jay Parlar
ps. I'm not sure that this is the right forum for this question. If it > isn't feel free to point me to the right place. The distutils list would be the more appropriate place for setuptools questions in general. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: How best to reference parameters.

2005-10-25 Thread Jay Parlar
r property to work, your class has to be newstyle, ie. inheriting from object: class test(object): ... stuff... The thing is, if you use property() with an old style class, no error will be raised, so you have to be careful. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 25, Issue 522

2005-10-28 Thread Jay Parlar
does come with a MIB parser though, not sure if pysnmp has one working yet. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: python gc performance in large apps

2005-11-05 Thread Jay Parlar
ibrary for measuring memory use of Python code" Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: can i tar and untar using python

2005-11-07 Thread Jay Parlar
On Nov 7, 2005, at 3:00 AM, sumi wrote: > can i tar and untar using python The standard library does it again: http://docs.python.org/lib/module-tarfile.html Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: [ x for x in xrange(10) when p(x) ]

2005-11-09 Thread Jay Parlar
On Nov 9, 2005, at 7:30 PM, Alex Martelli wrote: > No way -- the itertools module is and remains a PRECIOUS resource. If > you want an iterator rather than a list, itertools.ifilter is quite > appropriate here. Or if you're on 2.4 and want an iterator: (x for x in xrange(10) i

Re: xpath support in python 2.4

2005-11-29 Thread jay graves
Fredrik Lundh wrote: > sounds like you've installed > http://pyxml.sourceforge.net/ > on one of your machines, but not on the other. or ActiveState Python on one and python.org Python on the other??? Just a guess. No STFWing was done before posting this message. ;-) -- http://mail.python.or

reddit.com rewritten in Python

2005-12-05 Thread Jay Parlar
etty easy to miss one or two, here or there. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: subset permutations

2005-12-08 Thread Jay Parlar
7;C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','V' ,'W','Y'], 4) ) or, if you want my second output case: list ( perm( ['A','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','V' ,'W','Y'], 4, choose=False)) Please note that I put this together in about five minutes, so don't blame me if it horribly dies and causes your computer to blow up. Anyone have any better solutions? Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-31 Thread Jay Parlar
seful examples) on interfaces and adaption would probably be eye-opening to a lot of people. It took a lot of experimenting to figure out the PyProtocols package, and to just get my head around the usefulness/point of PEP 246, but now that I have, wow, I don't know how I lived without

Re: Central New Jersey PIG Meeting -- Python Interest Group In Princeton PIG/IP

2005-01-17 Thread Jay Loden
Are visitors welcome? I just happen to be in NJ, and I would like to attend my first PIG/IP Also, are you related in any way to LUG/IP? -Jay On Monday 17 January 2005 10:36, [EMAIL PROTECTED] wrote: > Central New Jersey PIG Meeting -- Python Interest Group In Princeton > PIG/IP > >

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Jay Tilton
"Xah Lee" <[EMAIL PROTECTED]> wrote: : # the syntax of keyed list in Perl is too complex : # to be covered in a short message. You've got to be joking. You couldn't even muster enough skill to provide Perl equivalents for the four simple Python statements you showed? : # see "perldoc perldata"

Re: What's the best python web-developer's editor

2005-01-20 Thread Jay Loden
ows editor for those times when I'm stuck on Windows - Crimson Editor, http://www.crimsoneditor.com Has syntax highlights, and just about every feature I could possibly ask for in an editor. I actually missed this app the most when moving to Linux. -Jay On Thursday 20 January 2005 1:47, a

Re: What's the best python web-developer's editor

2005-01-20 Thread Jay Loden
ows editor for those times when I'm stuck on Windows - Crimson Editor, http://www.crimsoneditor.com Has syntax highlights, and just about every feature I could possibly ask for in an editor.  I actually missed this app the most when moving to Linux. -Jay On Thursday 20 January 2005 1:47, a

why am I getting a segmentation fault?

2005-01-21 Thread Jay donnell
ython code so here is a link to it. http://kracomp.com/~jay/py.txt This is the output of the script. [EMAIL PROTECTED] scripts]$ ./py.py update item set goodImage = 'yes' where productId='12603' update item set goodImage = 'yes' where productId='18272' upda

Re: why am I getting a segmentation fault?

2005-01-21 Thread Jay donnell
Thank you. I made all the changes you recommended and everything seems to be working. -- http://mail.python.org/mailman/listinfo/python-list

Re: why am I getting a segmentation fault?

2005-01-21 Thread Jay donnell
>### Have you looked in your database to see if the >script has actually >updated item.goodImage? Do you have a test plan? Thank you for the help. Sorry for the messy code. I was under time constraints. I had class, and I was rushing to get this working before class. I should waited a day and read

a quick question about namespaces

2005-02-01 Thread Jay donnell
in the code below 'print locals()' shows mc2. What is the equivalent way to see the namespace that mc resides in? class myClass: --def func1(self): self.mc = 1 mc2 = 3 print 'in myClass.func1' print 'printing locals' print locals() print Google mungs up the spacing so I p

Re: Frankenstring

2005-07-12 Thread jay graves
see StringIO or cStringIO in the standard library. -- http://mail.python.org/mailman/listinfo/python-list

how to get rate of pop3 receiving progress?

2005-07-14 Thread Leo Jay
when i use POP3.retr() in poplib module, the retr() function will not return until the receiving progress is finished so, is there any way to get the rate of receiving progress? Thanks -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question about lists

2005-07-20 Thread Leo Jay
you may use the decimal module which was introduced in Python2.4 >>> from decimal import * >>> li = [Decimal(".25"), Decimal(".10"), Decimal(".05"), Decimal(".01")] >>> print li [Decimal("0.25"), Decimal("0.10"), Decimal("0.05"), Decimal("0.01")] >>> -- http://mail.python.org/mailman/listinfo/p

Re: Newbie question about lists

2005-07-20 Thread Leo Jay
IMO, python should use the decimal for default. .25 is right for Decimal(".25"). isn't that better? -- http://mail.python.org/mailman/listinfo/python-list

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread jay graves
d import the module the speed difference disappears and it actually gets about two times faster. YMMV. I don't have a solution but I admire the problem. [1] ... jay [1] Google tells me that this is probably attributable to Ashleigh Brilliant. -- http://mail.python.org/mailman/listinfo/python-list

how to get the return value of a thread?

2005-09-09 Thread Leo Jay
est Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Import a module without executing it?

2004-12-07 Thread Jay O'Connor
or example: -- def test(var): print var #main test(3) -- I want to be able to import this module so I can see "ah ha, this module defines a function called 'test'", but I don't want the code at the bottom executed during the imp

Re: Import a module without executing it?

2004-12-07 Thread Jay O'Connor
d in classes or functions caused a bit of a problem because loading the module would execute that code and that's not what I wanted. So therefore, my original question. The real question, I suppose, is "what is a good technique to find what modules and classes implement or refer to particular names" Take care, Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Import a module without executing it?

2004-12-07 Thread Jay O'Connor
ittle scripts for testing specific things that did'nt follow convension in that manner Thanks Take care, Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: changing colors in python

2005-04-14 Thread jay graves
AFAIK, the cmd.exe program on Win2K/XP doesn't support ANSI escape sequences. There are various other options on windows but they probably won't work on Linux. http://newcenturycomputers.net/projects/wconio.html http://effbot.org/zone/console-handbook.htm -- http://mail.python.org/mailman/listi

Re: recording data between [ and ]

2005-04-21 Thread jay graves
http://kodos.sourceforge.net/home.html http://weitz.de/regex-coach/ HTH, jay graves -- http://mail.python.org/mailman/listinfo/python-list

Re: recording data between [ and ]

2005-04-21 Thread jay graves
Paul McGuire wrote: > Jay - > Thanks for the pyparsing plug. NP. pyparsing is on my list of stuff to play around with. I'm just waiting for the proper problem to present itself. > Here is how the OP's program would look using pyparsing: And the exact reason that I could

Re: recording data between [ and ]

2005-04-21 Thread jay graves
[EMAIL PROTECTED] wrote: > Beside rxb15, there is also redict, in the standard lib (Jay Graves > shows the HD path): > http://home.earthlink.net/~jasonrandharper/reverb.py I knew there was a newer one out there but my google skills failed me. Thanks for the link. -- http://mail.p

Re: Setting win32 console title from Python

2005-04-28 Thread jay graves
Hmm. >From an interactive interpreter this works for me. import os os.system('title Jay') but the title returns to its previous value when I Ctrl-Z out of the process. If I save this as a file and run it, it seems to work without spawning a new window but resets it the title afte

Re: Setting win32 console title from Python

2005-04-28 Thread jay graves
Cool. Let me know if you want a copy of p.py (in all of it's hard-coded glory). I can easily put it under Public Domain and you can copy whatever you want out of it. ... jay -- http://mail.python.org/mailman/listinfo/python-list

python 351x64

2015-12-11 Thread Jay Hamm
os.makedirs(path) File "C:\Program Files\Python35\lib\os.py", line 241, in makedirs mkdir(name, mode) PermissionError: [WinError 5] Access is denied: 'C:\\Program Files\\Python35\\Lib\\site-packages\\requests' Once I gave myself control it started working. This is pretty

RE: python 351x64

2015-12-11 Thread Jay Hamm
ary.w...@gmail.com] On Behalf Of Zachary Ware Sent: Friday, December 11, 2015 10:17 AM To: python-list@python.org Cc: Jay Hamm Subject: Re: python 351x64 On Fri, Dec 11, 2015 at 10:30 AM, Jay Hamm wrote: > Hi > > I was trying to use your windows version of python 3.5.1 x64. > > It has a con

Python - parsing nested information and provide it in proper format from log file

2015-02-19 Thread Jay T
have some log file which has nested data which i want to filter and provide specific for student with total counts Here is my log file sample: Student name is ABC Student age is 12 student was late student was late student was late Student name is DEF student age is 13 student was late

can't install Python 3.5 on windows

2015-10-09 Thread Jay Brown
Dear Python: I have been trying to install Python on my Windows computer. I tried both Python 2.7 and 3.5. No luck with either one. If I try to run Python I get a message asking me if I want to repair Python. The program never runs. Can you help? -Jay Brown Jay C. Brown Department of

Re: Distributing python applications as a zip file

2014-07-23 Thread Leo Jay
as a single file that users can just copy and run. > But if you use windows and you happen to use multiprocessing, please be aware of this bug I encountered several years ago. https://mail.python.org/pipermail/python-dev/2011-December/115071.html -- Best Regards, Leo Jay -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting a list of all modules

2014-07-30 Thread Leo Jay
understanding of cross- > platform issues, fails to include built-in modules that don't live in the > file system, and probably more). > > Is this problem already solved? Can anyone make any suggestions? > > > > -- > Steven > -- > https://mail.python.org/mailman/listinfo/python-list -- Best Regards, Leo Jay -- https://mail.python.org/mailman/listinfo/python-list

Cannot use multiprocessing and zip together on windows

2011-12-11 Thread Leo Jay
ta) File "C:\python27\lib\multiprocessing\forking.py", line 454, in prepare assert main_name not in sys.modules, main_name AssertionError: __main__ It seems that the situation described here is similar: http://bugs.python.org/issue10128 But the patch doesn't work for me.

Re: Guido at Google

2005-12-22 Thread Jay Parlar
> working on Python. (much more than his previous "one day a week" jobs > have given him) > > Cheers, > -g > Do you actually mean "working on Python", or did you mean "working WITH Python"? Jay P -- http://mail.python.org/mailman/listinfo/python-list

is there any lib can split string in this way?

2006-01-08 Thread Leo Jay
I want to split a string like this: 'abc def "this is a test" ok' into: ['abc', 'def', 'this is a test', 'ok'] is there any lib meet my need? thanks -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading long lines doesn't work in Python

2006-07-19 Thread jay graves
> f.write("x"*11000 + '\n') >>> f.close() >>> f = file('longline.txt','r') >>> for l in f: ... print len(l) ... 11001 11001 11001 >>> f.close() Could the file have embedded nulls? Are you on Windows? If the file is small enough, open it in binary mode and do a split on '\n to verify your data. ... jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Warning when new attributes are added to classes at run time

2006-07-19 Thread jay graves
d? Am I the only > one that makes this mistake? It's never been much a problem for me but you could look into __slots__ http://docs.python.org/ref/slots.html ... jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Fastest Way To Loop Through Every Pixel

2006-07-28 Thread jay graves
gt; > I want speeds less than 10 milliseconds > > I have tried using SWIG, and pypy but they all are unsuccessfull in > compiling my files. I think you are using PIL but I don't know what version. Check out this page. http://effbot.org/zone/image-histogram-optimization.htm HTH..

Re: Running queries on large data structure

2006-08-03 Thread jay graves
f about 4 seconds on my dev box) and almost every other page is sub second. > Thanks for any enlightenment. Just my 2 cents. ... jay graves -- http://mail.python.org/mailman/listinfo/python-list

Re: Running queries on large data structure

2006-08-03 Thread jay graves
Christoph Haas wrote: > On Thursday 03 August 2006 17:40, jay graves wrote: > > How hard would it be to create this nested structure? > Not hard. Instead of doing "INSERT INTO" I would add values to a dictionary > or list. That's even simpler. > > I

Re: "running" code on client side with cherrypy?

2006-08-10 Thread jay graves
st that you could do would be to give a link to a zip file and let the user choose the path they want to unzip to once they have downloaded the file. As for working with SVN, I really like TortoiseSVN but you would have to install it on all machines which is what you are trying to avoi

Re: Rendering Vector Graphics

2006-08-11 Thread jay graves
under win32 > and can't find a pycairo package for it. Suggestions? AGG (Anti-Grain Geometry) is one such engine that a couple of people have interfaced to Python. http://www.antigrain.com/ ... jay graves -- http://mail.python.org/mailman/listinfo/python-list

Re: Read Picasa metadata using Python?

2006-08-17 Thread jay graves
ion Data\Google\Picasa (probably not exactly right)) Also there is a Google Groups for Picasa and it might have some pointers in the archives. http://groups.google.com/group/Picasa?lnk=gschg&hl=en Have fun! ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

how to use python com server in c++?

2006-08-19 Thread Leo Jay
ing this com server in viusal c++? a detailed sample of early binding would be better, thanks. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I set timeout for the sys.stdin.readline() ?

2006-06-10 Thread Jay Parlar
, I mean they pressed Enter/Return. The select will not exit if they just enter other text. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: re.compile() doesn't work under Windows?

2006-08-31 Thread jay graves
it ran OK on Linux. Maybe your script is named differently on Linux or the sys.path order is different between Windows and Linux. HTH. ... jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python provide "Struct" data structure?

2006-09-22 Thread jay graves
verb = 'Verbose', > filedir = 'C:/temp', > ) > > print mystruct.filedir > # Does 'Bunch' fit the bill? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308 ... jay graves -- http://mail.python.org/mailman/listinfo/python-list

Re: Sort by domain name?

2006-10-02 Thread jay graves
gene tani wrote: > Plus, how do you order "https:", "ftp", URLs with "www.", "www2." , > named anchors etc? Now is a good time to point out the urlparse module in the standard library. It will help the OP with all of this stuff. jus

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread jay graves
BartlebyScrivener wrote: > Yup. Did that before. That's what I mean. The d:\\python is there and > it doesn't come from the PythonPath in my windows registry. Maybe it > scans for any directory with python in the name? Do you have any *.pth files in the C:\Python24 directory?

Re: append to the end of a dictionary

2006-01-24 Thread jay graves
to append 'b':'2' to it to have: mydict['b'] = '2' print mydict http://python.org/doc/2.4.2/tut/node7.html#SECTION00750 HTH. ... jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Mining strings from a HTML document.

2006-01-25 Thread jay graves
oup. http://www.crummy.com/software/BeautifulSoup/ ... jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs C for a mail server

2006-01-29 Thread Jay Parlar
vy against Python, when they're first around it. And that's fine, most people go through that. They are taught programming in C++ or Java, and that that *that* is the way you're supposed to program. Then they see that Python does things in different ways, and automatically assume that Python is doing it wrong. All I can say is that if you spend time with Python (and more importantly, read quality, well-established Python code that's already out there), you'll see and understand the Python way of doing things. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs C for a mail server

2006-01-29 Thread Jay Parlar
r a default retval). I even said you can do some "very powerful things" with getattr, by which I meant something exactly like you did. What did you think I meant by that? Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Language Semantics: @ symbol??

2006-01-29 Thread Jay Parlar
What does it mean and what does it do? > > Thanks! It's called a decorator, new in Python 2.4: http://python.org/doc/2.4.2/whatsnew/node6.html Not sure where it lives in the official documentation right now though... Maybe someone else can provide that. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs C for a mail server

2006-01-31 Thread Jay Parlar
rrors in my Python code, especially working with libraries I've used a lot. And if you *still* feel weary, then you can do some kind of adaption (see Alex Martelli's PEP 246 http://www.python.org/peps/pep-0246.html). There are two adaption packages out there, one from Zope (which is also used by Twisted), and one by PJE, called PyProtocols, http://peak.telecommunity.com/PyProtocols.html I have used PyProtocols extensively in the past, with great success. Adaption seems to work best in the areas of frameworks, where a large chunk of code written by someone else is expecting *you* to pass it objects of the right (duck) type. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Launch Windows command window....

2006-02-03 Thread jay graves
shell=True) You don't say what you are trying to do but if you are trying to drive telnet maybe you want the pexpect module. http://pexpect.sourceforge.net/ I've never had the need to use it myself so I can't offer any other advice. ... jay graves -- http://mail.python.org/mailman/listinfo/python-list

Twisted book opinions?

2006-02-08 Thread Jay Parlar
I was hoping to get some c.l.p. opinions on O'Reilly's new Twisted book. I'm coming at Twisted as someone who's been programming mainly in Python for almost 6 years now, but who's never done any Twisted development. I've used some of its prepackaged libraries before (and did some custom tweaks

Re: AdaptionFailure: How to use Interfaces with PyProtocols ?

2006-02-10 Thread Jay Parlar
that just had 'instancesProvide', but would also have 'asAdapterFor' (at least, I think it's 'asAdapterFor', it's been a few months since I've touched my PyProtocols related code) Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: using an existing DLL file without having access to the source code?

2006-02-14 Thread jay graves
the > Filters-project (http://filters.sourceforge.net/) without having to > compile or build the DLL myself, which is according to the authors very > hard. I don't have any experience with this specific library but I've used ctypes in the past and it worked great. HTH. ... jay g

Re: Py2exe

2006-02-28 Thread jay graves
First google.com hit using your title. http://www.google.com/search?q=py2exe -- http://mail.python.org/mailman/listinfo/python-list

Papers on Dynamic Languages

2006-03-04 Thread Jay Parlar
first real research paper in grad school, so I'm starting out from scratch here. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Papers on Dynamic Languages

2006-03-05 Thread Jay Parlar
.google.co.uk/group/comp.lang.python/browse_thread/ > thread/cc98317bdf96efda > > I hope this is of use! > > Paul All that looks fantastic, and I'd forgotten there was a paper on Shedskin. Thanks a bunch, Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding method at runtime - problem with self

2006-03-05 Thread Jay Parlar
; > Marek > First off, it should be 'class kla(object)', but that's minor. Try this: import types class kla(object): x = 1 def foo(self): print self.x k = kla() k.foo = types.MethodType(foo,k) #Makes 'foo' an instancemethod k.foo() Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: How can i craft my own ip packets in python

2005-06-01 Thread jay graves
http://www.cartel-securite.fr/pbiondi/projects/scapy/ -- http://mail.python.org/mailman/listinfo/python-list

dynamically generated runtime methods & reflection

2007-06-13 Thread Jay Loden
me any suggestions, feedback, sample code, documentation, whitepapers etc. The only thing I don't want to have to do is go and define a separate method for every single one of the possible permutations of socket commands if I can avoid it! - Thanks in advance, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamically generated runtime methods & reflection

2007-06-14 Thread Jay Loden
'hello',) {'world': 1} > >>> Thanks, this is exactly what I was looking for! For some reason functools didn't even show up at all during Google searches...must have just had the wrong search terms. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with regular expressions

2007-06-14 Thread Jay Loden
;) return 1 print checkLogMsg('taskid:234') print checkLogMsg('doesnotmatch') - Outputs: $ python test_reg.py 0 El comentario tiene que contener el taskid: o el bugid:1 HTH, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: WebThumb

2007-06-17 Thread Jay Loden
t;> Thanks >> L. > Don't know if this really helps any but it does sort of reaffirm what John Lee said already: http://www.zubrag.com/articles/create-website-snapshot-thumbnail.php Seems like this is one are that could really use a nice open source library of some kind :-) -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing HTML, extracting text and changing attributes.

2007-06-18 Thread Jay Loden
k if it's valid XHTML that they're working with. Assuming it's not (since real-world HTML almost never is), perhaps BeautifulSoup will fare better. http://www.crummy.com/software/BeautifulSoup/documentation.html -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing HTML, extracting text and changing attributes.

2007-06-18 Thread Jay Loden
Stefan Behnel wrote: > Jay Loden wrote: >> Someone else mentioned lxml but as I understand it lxml will only work if >> it's valid XHTML that they're working with. > > No, it was meant as the OP requested. It even has a very good parser from > broken HTML.

Re: Parsing HTML, extracting text and changing attributes.

2007-06-18 Thread Jay Loden
Stefan Behnel wrote: > Jay Loden wrote: >> Someone else mentioned lxml but as I understand it lxml will only work if >> it's valid XHTML that they're working with. > > No, it was meant as the OP requested. It even has a very good parser from > broken HTML.

Re: copy locked files

2007-06-18 Thread Jay Loden
th a command line version of the tool that you can call from your Python script as necessary. Neither is an ideal solution but I can't find any other suggestions out there on dealing with this from Python. HTH, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: avoid script running twice

2007-06-18 Thread Jay Loden
than just using an empty file. Then if your file exists, you can compare against os.getpid() and decide what to do from there, like killing your existing script, check to see if that PID is still active on the system, etc. I've also seen this done by checking the age of the lock file and if it's too old, consider it 'stale' and delete it. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Does altering a private member decouple the property's value?

2007-06-18 Thread Jay Loden
27;t use them:-). Can you elaborate (or just point me to a good doc) on what you mean by an "old style" class versus the new style? I learned Python (well, am still learning) from an older book, and I just want to make sure that I'm using the preferred method. Thanks, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Does altering a private member decouple the property's value?

2007-06-18 Thread Jay Loden
Jay Loden wrote: > Can you elaborate (or just point me to a good doc) on what > you mean by an "old style" class versus the new style? I > learned Python (well, am still learning) from an older book, > and I just want to make sure that I'm using the preferred method.

<    1   2   3   4   >