Re: How can I know the name of "caller"

2007-06-19 Thread Jay Loden
uestion recently, it might put you on the right track also: http://groups.google.com/group/comp.lang.python/browse_thread/thread/723d4ce3e6703a26/ce2bb076ec4a8059?lnk=st&q=&rnum=2#ce2bb076ec4a8059 -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I know the name of "caller"

2007-06-19 Thread Jay Loden
uestion recently, it might put you on the right track also: http://groups.google.com/group/comp.lang.python/browse_thread/thread/723d4ce3e6703a26/ce2bb076ec4a8059?lnk=st&q=&rnum=2#ce2bb076ec4a8059 -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question: parsing street name from address

2007-06-21 Thread jay graves
t, I used the data cleansing routines from Febrl to do this with some success. http://www.google.com/search?q=febrl HTH. ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

Re: How to code dynamically created methods?

2007-06-21 Thread Jay Loden
estClass: def __init__(self): pass def __getattr__(self, name): try: return getattr(self.__class__, name) except AttributeError: return functools.partial(self.foo, name) def foo(self, name, **args): print name for i in args: print " %s=%s" %

Re: How to hide a program?

2007-06-21 Thread jay graves
On Jun 20, 10:43 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * jvdb (Wed, 20 Jun 2007 08:22:01 -0700) > http://www.ntwind.com/software/utilities/hstart.html I'm not the OP but this looks very useful to me. Thanks. ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in following code

2007-06-21 Thread Jay Loden
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] root]# python t4.py > enter number: 6 > [EMAIL PROTECTED] root]# > > i.e it takes the input but doesn't print anything. If anybody can > help... Thanx! You're creating a function called "f" in the first line, but the script never does anything with i

high performance/threaded applications in Python - your experiences?

2007-06-22 Thread Jay Loden
with relevant experiences. Thanks! -Jay -- http://mail.python.org/mailman/listinfo/python-list

server wide variables

2007-06-25 Thread Jay Sonmez
I want to be able to save some server variables as long as Apache runs on the server (mod_python). How is that possible in Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: listing all property variables of a class instance

2007-06-25 Thread Jay Loden
Neil Cerutti wrote: >> Is there a way to write a method that would list automatically >> all the variables defined as a property (say by printing their >> docstring and/ or their value), and only those variables? > > This is off the cuff. There's likely a better way. > > for k, v in MyClass.__di

Re: Help needed with translating perl to python

2007-06-26 Thread Jay Loden
ts. So: sub printMe { my $arg = shift; print $arg; } would print the first argument passed to it, e.g. printMe("foo"); would output foo. > > 2. What does shift do above? http://perldoc.perl.org/functions/shift.html See above, it's used for accessing the fir

Re: Return name of caller function?

2007-06-26 Thread Jay Loden
TestClass() test.someMethod() test.anotherMethod() Otherwise the inspect module may be the way to go, as Stephen already pointed out (though I must admit it seems a very inelegant route, especially compared to Python's usually clean and clear style). -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Reversing a string

2007-07-01 Thread Jay Loden
' 10 loops, best of 3: 3.94 usec per loop Note that in the second version, I changed the code a little bit so that it no longer iterates over every char in the string and instead just calls lis() to convert it to a list of chars in order to call list.reverse() on it. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Reversing a string

2007-07-01 Thread Jay Loden
Alex Martelli wrote: > since what you're doing is...: > s = "onomatopoeia" s = s.join(s[::-1]) s > 'aonomatopoeiaionomatopoeiaeonomatopoeiaoonomatopoeiaponomatopoeiaoonoma > topoeiatonomatopoeiaaonomatopoeiamonomatopoeiaoonomatopoeianonomatopoeia > o' > > ...which isn't really jus

Re: How to Machine A python script execute Machine B python script?

2007-07-08 Thread Jay Loden
on on Windows using the win32api extensions, but I haven't any idea how you'd go about that. Perhaps others can chime in with detailed information if you let us know what kind of platform you're on and what you're trying to accomplish. -Jay johnny wrote: > Anyone k

Re: pattern match !

2007-07-11 Thread Jay Loden
ttern.search(pkg) if matchObj: print matchObj.group(1) Still assumes it will end in RPM (all caps), but if you add the flag "re.I" to the re.compile() call, it will match case-insensitive. Hope that helps, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Right tool and method to strip off html files (python, sed, awk?)

2007-07-13 Thread Jay Loden
t always help you with feeling overwhelmed. The best thing to do is break a big problem into little problems and work on those so they don't seem so insurmountable. (You may be detecting a pattern to the advice I'm giving by now). HTH, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Access Denied while trying to delete file from python script

2007-07-14 Thread Jay Loden
-name-in-python/57/ * scheduling files for removal on reboot using MoveFileEx (you'd have to use win32 extensions to access the MoveFileEx function) http://msdn2.microsoft.com/En-US/library/aa365240.aspx Hope that helps, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: pattern match !

2007-07-14 Thread Jay Loden
will end in RPM (all caps), but if you add the flag "re.I" >> to the re.compile() call, it will match case-insensitive. >> >> Hope that helps, >> >> -Jay > > How about if i had something like 1-3 words in the application name: > websphere-pk543-1.1.4.2-1-RHE

Re: Can a low-level programmer learn OOP?

2007-07-17 Thread Jay Loden
, so I had to look it up after your post ;) -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: NTLM APS python version 0.98

2007-07-20 Thread Jay Loden
t if you're looking to implement an NTLM client in C (I think that's what you were asking?). -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: [2.5] Regex doesn't support MULTILINE?

2007-07-21 Thread Jay Loden
f re.findall() to a variable in order to iterate over it, you might as well just use re.finditer() instead: for item in p.finditer(response): print item At least then it can start printing as soon as it hits a match instead of needing to find all the matches first. -Jay -- http://mail.python.org/mailman/listinfo/python-list

anyone has experience on cross-compile python 2.5.1?

2007-04-30 Thread Leo Jay
push("world\n") asyncore.loop() s.join() but the weirdest thing is, if i run python test_asynchat.py directly, everything is ok. anybody could help me? thanks in advance. ps, my linux box is an ubuntu 6.10. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How to replace the last (and only last) character in a string?

2007-05-03 Thread jay graves
27;. > But it doesn't work. > Can anyone explain why? Instead of doing it that way, you should use slicing. >>> s='12345 4343 454' >>> s = s[:-1] + 'r' >>> print s 12345 4343 45r >>> See http://docs.python.org/tut/node5.html#strings HTH. Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

default config has no md5 module?

2007-05-04 Thread Leo Jay
i want to compile a python by myself, but after configure and make, it seems that md5 is not built by default. what should i do to compile md5 as an module? -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: anyone has experience on cross-compile python 2.5.1?

2007-05-04 Thread Leo Jay
On 4/30/07, Leo Jay <[EMAIL PROTECTED]> wrote: > i have a development board based on s3c2410 arm cpu. and i want to > port python on it. > after googling some threads, i successfully cross compiled python. > but i still encountered a weird issue that when i ran > /lib/pyth

Re: Tix not properly installed on OS X?

2007-07-24 Thread Jay Loden
are not promising: http://www.thescripts.com/forum/thread653175.html http://aspn.activestate.com/ASPN/Mail/Message/ActivePython/3525325 I tried installing Tix from the binary TclAqua package, and when I run root=Tix.Tk() I still get the same error (though, interestingly, a Tk window does open).

Re: first, second, etc line of text file

2007-07-25 Thread Jay Loden
t are often many times that, including some that have been well over a GB or more. Trust me, you don't want to read in the entire file when it's a 1.5GB text file. It's true that many times readlines() will work fine, but there are also certainly cases where it

Re: How to tell when a socket is closed on the other end?

2007-07-26 Thread Jay Loden
exceptional condition flag actually indicate whether or not the root cause of the condition was a socket closed by the remote peer? I've read through the select's manpage and I can't seem to find a reference that indicates what the possible values are for the I/O descriptor sets returned by select. Is there another man page, or a place in the header file for select I can look? Thanks for your help, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: datetime.time() class - How to pass it a time string?

2007-07-26 Thread Jay Loden
't yet a > solution for the OP. How about something like this? >>> import time >>> import datetime >>> >>> time_fmt = "%H:%M:%S" >>> timestamp = "00:00:25.886411" >>> stamp,msec = timestamp.split('.') >>> dtime = datetime.datetime(*(time.strptime(stamp, time_fmt)[0:6] + >>> (int(msec),))) >>> dtime datetime.datetime(1900, 1, 1, 0, 0, 25, 886411) -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 can't find win32file?

2007-07-28 Thread Jay Loden
n win32file.pyd is loaded. > > Anyone have any ideas? If you just want to update your PATH, you can do that from My Computer -> Properties -> Advanced -> Environment Variables and just update PATH for your user (or all users if you prefer). -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write a warning to my log file?

2007-07-28 Thread Jay Loden
showwarning = mywarn #now test it warnings.warn('test warn message') -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a two-column file into an array?

2007-07-30 Thread Jay Loden
of lists, and came up with this (which does not use the csv module). Nagarajan's code is more concise and just as readable IMO, but here's my take anyway: a = [] b = [] handle = open(filename, 'r') for line in handle.xreadlines(): col1,col2 = line.split('\t') a.append(col1) b.append(col2) columns = [a, b] -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration over strings

2007-07-31 Thread Jay Loden
newstr = "" for char in str: if char == "\\": char = "/" newstr = newstr + char str = newstr Note that for this particular example, there are also better ways of acheiving your goal: str = "C:/somepath/folder/file.txt" str = str.replace("\\", "/") HTH, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration over strings

2007-07-31 Thread Jay Loden
for. I'm sure there are other great books, those just happen to be the ones I'm familiar with :-) -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration over strings

2007-07-31 Thread Jay Loden
Hexamorph wrote: > Hexamorph schrieb: >> Jay Loden schrieb: >>> I have to agree with you WRT to the Python documentation, it does tend >>> to be lacking and difficult to find things at times. > > Hmm, I find the Python documentation just excellent. You are &

Re: Finding documentation (WAS: Iteration over strings)

2007-07-31 Thread Jay Loden
hat where I should generally be looking? Are there other documentation resources you all have found useful as well? I'm curious to see if there are useful resources I'm just missing due to lack of knowledge or experience. Thanks, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Any way to monitor windows network connection?

2007-07-31 Thread Jay Loden
momobear wrote: > hi, Is there any way to show me detailed listings of all TCP and UDP > endpoints in my microsoft windows XP in python way? > thanks. Not sure if it's exactly what you're looking for, but this might be of use as a starting point at least: http://aspn.activestate.com/ASPN/Cookboo

Re: access the name of my method inside it

2007-08-01 Thread Jay Loden
james_027 wrote: > Hi, > > On Aug 1, 5:18 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Wed, 01 Aug 2007 09:06:42 +, james_027 wrote: >>> for example I have this method >>> def my_method(): >>> # do something >>> # how do I get the name of this method which is my_method

Re: Filemaker interactions

2007-08-01 Thread Jay Loden
rateful for any advice and a nudge in the right direction. > > Ian. I don't know if this helps, but there is a PyFileMaker module for Python for interacting with FileMaker: http://www.sourcefiles.org/Programming/Development/Modules/Python/PyFileMaker-1.2a4.zip That seems to be the on

Re: Bug in Time module, or in my understanding?

2007-08-01 Thread Jay Loden
Joshua J. Kugler wrote: > I am getting results like these with the time module: > import time int(time.mktime(time.strptime('2007-03-11 02:00:00', '%Y-%m-%d %H:%M > %S'))) > 1173610800 int(time.mktime(time.strptime('2007-03-11 03:00:00', '%Y-%m-%d %H:%M > %S'))) > 1173610800 ti

Re: XML Processing

2007-08-02 Thread Jay Loden
sponding character so you're not seeing the plain text version of what the OP posted. He's asking for code to convert XML entities like '&' into their escaped strings. I believe xml.sax.saxutils.encode() is what the OP is looking for: >>> import xml.sax.saxu

Re: XML Processing

2007-08-02 Thread Jay Loden
x.saxutils also is extensible, should you run into any entities that it fails to escape in the current implementation. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to find zip codes/rest example

2007-08-03 Thread Jay Loden
finite Which matches the description above perfectly, so I assume it's what you were after :-) -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Website data-mining.

2007-08-03 Thread Jay Loden
Miki wrote: > Hello, > >> I'm using Python for the first time to make a plug-in for Firefox. >> The goal of this plug-in is to take the source code from a website >> and use the metadata and body text for different kinds of analysis. >> My question is: How can I retrieve data from a website? I'm n

Re: Client-side HTML form processing with Python?

2007-08-04 Thread Jay Loden
le on Windows: http://www.python.org/doc/1.5.2p2/lib/module-CGIHTTPServer.html - but you could possibly use it as a starting point. Other than the above the only suggestion I can give would be to search for another way to approach your problem. For instance, using an hta http://msdn2.microsoft.c

Re: Submit web form only client-side with Python? COM?

2007-08-04 Thread Jay Loden
ications like what you're describing. CGIHTTPServer is not available on Windows (OP said they are on Win XP) due to use of fork and exec to execute the CGI. I suggested a few other options in my reply, but unfortunately CGIHTTPServer is not an option for this task. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Submit web form only client-side with Python? COM?

2007-08-05 Thread Jay Loden
Gabriel Genellina wrote: > En Sat, 04 Aug 2007 19:17:35 -0300, Jay Loden <[EMAIL PROTECTED]> > escribió: > >> Paul Rubin wrote: >>> goldtech <[EMAIL PROTECTED]> writes: >>>> So I can present the user with an HTML form in it - but how can I >

Re: parsing a dbIII file

2007-08-07 Thread Jay Loden
ta is always in the format | data | with no pipe symbols in between the ones used as separators. HTH, -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Web based Reporting tool for Python

2007-08-07 Thread Jay Loden
//www.reportlab.org/downloads.html - http://www.ibm.com/developerworks/linux/library/l-sc6.html?loc=dwmain For XSLT: 4Suite, libxml - http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt For CSV and XML: csv module, libxml, lxml, ElemenTree modules -Jay -- http://mail

Re: How can I programmatically find the name of a method from within that method?

2007-08-07 Thread Jay Loden
ves for past threads, e.g: http://aspn.activestate.com/ASPN/Mail/Message/python-list/3542665 -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Seek the one billionth line in a file containing 3 billion lines.

2007-08-08 Thread Jay Loden
;s on that particular line, or is there some other reason? Perhaps if you can provide the use case the list can help you solve the problem itself rather than looking for a way to seek to the one billionth line in a file. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Issues of state

2007-08-09 Thread Jay Loden
AJAX technology, it's a lot harder than you'd like it to be to solve the problem, but in cases where the Back button is really an issue, it's worth the effort. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: tests

2007-08-09 Thread Jay Loden
ated content. If just duplicated content, perhaps this could be used as a starting point: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440661 and the actual data can be compared -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzled by "is"

2007-08-09 Thread Jay Loden
Dick Moores wrote: > >>> () is () > True > >>> (1,) is (1,) > False > > Why? > > Thanks, > > Dick Moores >From the docs for 'is': -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzled by "is"

2007-08-09 Thread Jay Loden
Jay Loden wrote: > Dick Moores wrote: >> >>> () is () >> True >> >>> (1,) is (1,) >> False >> >> Why? >> >> Thanks, >> >> Dick Moores > >From the docs for 'is': The operators is and is not

Re: Issues of state

2007-08-10 Thread Jay Loden
Steve Holden wrote: > greg wrote: >> Jay Loden wrote: >>> Like most things involving dynamic client side-javascript code and AJAX >>> technology, it's a lot harder than you'd like it to be to solve the >>> problem, but >>> in cases where th

Re: Python script for mobile platforms -- suggested?

2007-08-13 Thread Jay Loden
ays to complete running. It might help if you give a concrete example (code is always welcome!) and explained exactly what the options are that you're considering and why. Then the folks on the list can try to give you a rough estimate or possibly suggest alternative methods you may not

Re: Python script for mobile platforms -- suggested?

2007-08-14 Thread Jay Loden
Robert Dailey wrote: > Hi Jay, > > I apologize for not having been detailed enough. Right now I'm using a > C++ library known as TinyXML to parse my XML files. When a menu is to be > displayed, the XML is parsed and the appropriate images, text, etc that > will display on t

Re: sub-classing the types in the builtin module datetime

2007-08-15 Thread Jay Loden
trying to do so that the list members can analyze the actual problem. Tracebacks etc are also welcome if applicable. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: replacement for string.printable

2007-08-15 Thread Jay Loden
t the above. (List members, please correct me if I'm wrong here!). -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: reading a line in file

2007-08-20 Thread Jay Loden
Shawn Milochik wrote: > Hopefully this will help (using your input file) > > #!/usr/bin/env python > import re > buildinfo = "input.txt" > input = open(buildinfo, 'r') > > regex = re.compile(r"^\s*build.number=(\d+)\s*$") > > for line in input: > if re.search(regex, line): > print li

Re: reading a line in file

2007-08-20 Thread Jay Loden
Brian McCann wrote: > Shawn, Tim ,Jay > > many thanks, > > It looks like there are many ways this problem can be approached > > either by using regex or a tokens > > Tim I'm not familiar with your solution, but will learn about that > method also > Jay

Re: reading a line in file

2007-08-20 Thread Jay Loden
x27;s sort of a language design and culture thing. -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse - required options

2007-08-20 Thread Jay Loden
f (in various languages) that needed at least some kind of user input to operate. At least the documentation points to some examples for helpful hints, example code is a lot better than nothing ;) -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: reading a line in file

2007-08-20 Thread Jay Loden
asing. I hope you don't feel I was picking on you - or on regular expressions for that matter! I was attempting only to offer another helpful solution that was possibly easier to read for someone not familiar with regular expressions, and a little bit faster in the event that multiple repet

Re: Putting #'s and variables together in 1 variable

2007-08-23 Thread Jay Loden
% (a,b,c,d,e) return random_name OR, using suggestion 2 above: import random def random_name(): num = random.randint(0,9) random_name = '%stemp.txt' % (num) return random_name -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python error on Mac

2007-08-27 Thread Jay Loden
Python directory exists, or even if /Library/Frameworks/Python.framework/Versions/2.5/ exists. Perhaps you are trying to execute Python 2.5 but don't actually have it installed? -Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 unfit for serious work?

2007-03-04 Thread Jay Tee
Hey, > Python 3.x. I believe your fear is just a knee jerk reaction to the notion > that there will be some stated incompatibilities between 2.x and 3.x without > having done any investigation of the transition process. Nobody is forcing > you to do anything right now or completely abandon your

Re: using python to query active directory

2007-03-06 Thread jay graves
; Any code samples would be great. Tim Golden is your man. http://tgolden.sc.sabren.com/python/active_directory.html HTH ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

Re: fetch html page via isa proxy

2007-03-26 Thread jay graves
search?q=firewall+client But a quick test of trying to get python.org with 'urllib' did not work. > Any advice? Or better working example? > Thanks a lot, Sorry I wasn't able to help more. I'll try to poke at it a bit more when I get a chance. ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

Re: exit to interpreter?

2007-03-27 Thread jay graves
the > string up the call stack. Maybe you are looking for the 'code' module. http://docs.python.org/lib/module-code.html ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find pywin32/win32all for Python 1.5.2?

2007-04-03 Thread jay graves
wnload links don't respond. Someone else has it stashed somewhere, hopefully having the filename will help. ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 or pygresql?

2007-09-19 Thread jay graves
rsor.description but each implementation varies on what it provides. Check out the PEP for more info. http://www.python.org/dev/peps/pep-0249/ HTH. Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for ocbc example

2007-09-21 Thread jay graves
comer, but appears to work for everything I've thrown > at it (which is not much). mxOdbc has been around longer, and is sure > to be a more mature product. It may offer more features & functionality. There is also a brand new module 'ceODBC'. http://ceodbc.sourceforge.net/ I ha

Re: Command-line does work when scheduled

2007-09-30 Thread Jay Loden
le and try using that for your scheduled task, or using py2exe to compile your script to an exe which should eliminate the whole file association/PATH issue altogether ;) Hope that helps, -Jay Gabriel Genellina wrote: > No more ideas... I think the scheduler just executes the command line, and

how to use xmlrpc properly in windows xp

2007-01-16 Thread Leo Jay
"; % ('192.168.0.92', 31281)) start = datetime.now() print server.test() print server.test() print server.test() print server.test() print 'total: ', datetime.now() - start -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I write code using FP

2007-01-16 Thread Leo Jay
rint foo1(3) print foo2(3) -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

How to test if one dict is subset of another?

2007-02-19 Thread Jay Tee
Hi, I have some code that does, essentially, the following: - gather information on tens of thousands of items (in this case, jobs running on a compute cluster) - store the information as a list (one per job) of Job items (essentially wrapped dictionaries mapping attribute names to valu

Re: How to test if one dict is subset of another?

2007-02-19 Thread Jay Tee
On Feb 19, 11:07 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Use a RDBMS (a database), they tend to be good at this kind of operations. yeah, one of the options is metakit ... sqlite and buzhug both looked promising but the constraint of pythons 2.2 and 2.3 ruled that out. disadvantage of metaki

Python 3.0 unfit for serious work?

2007-02-20 Thread Jay Tee
Yo, On Feb 16, 6:07 am, Steven Bethard <[EMAIL PROTECTED]> wrote: > Python 3.0 is determined not to be hampered by backwards incompatibility > concerns. It's not even clear yet that your average 2.6 code will work Then Python is pretty much determined to remove itself from consideration from vari

Re: How to test if one dict is subset of another?

2007-02-20 Thread Jay Tee
On Feb 20, 9:12 am, Paul Rubin wrote: > do_something() > > you'd just write: > > for j in (index['user']['jeff'] & index['state']['running']): > do_something() Hi, it looks very cool, except that one of the constraints mentioned is that the solution h

Re: How to test if one dict is subset of another?

2007-02-20 Thread Jay Tee
Hi your post had the following construct: > for j in (index['user']['jeff'] & index['state']['running']): > do_something() but Python 2.3.4 (#1, Oct 11 2006, 06:18:43) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more informat

Re: How to test if one dict is subset of another?

2007-02-20 Thread Jay Tee
On Feb 20, 6:44 pm, Paul Rubin wrote: > They are sets, not lists. > >from sets import Set as set # use in 2.3 and earlier > >l1= set([3, 4, 7, 2]) >l2 = set([2, 3]) >l2 = set([2, 3, 99]) >print l1 & l2 Thanks Paul, but: bosui:~> python Python 2.2.3

Re: Python 3.0 unfit for serious work?

2007-02-20 Thread Jay Tee
Hi, On Feb 20, 8:59 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > You snipped the rest of that comment: > > "It's not even clear yet that your average 2.6 code will work on 3.0 -- > though there's a pretty large contingent trying to make this true." Thanks for pointing this out. I voted for th

Re: How to test if one dict is subset of another?

2007-02-20 Thread Jay Tee
, and leads to a less complex implementation. Rolling it into the next release is going to have to wait a few weeks, I hope I can remember it that long. Thanks!! JT On Feb 20, 8:54 pm, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > "Jay Tee" <[EMAIL PROTECTED]> writes

Re: Python 3.0 unfit for serious work?

2007-02-20 Thread Jay Tee
Hi, Paul, thanks for this, I didn't realize the scope of the situation. I agree with your assessment to the extent that I understand what the whole python 3.0 thing is about. Let's see if I can scare up something I wrote about ten years ago on a now-dead language that I really wanted to use (wou

Re: Python 3.0 unfit for serious work?

2007-02-20 Thread Jay Tee
On Feb 21, 1:41 am, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: [ citing me ] > "if 2.4 code doesn't run on 3.0, it's rather likely that strong > pressure will be applied to port *away* from Python into something > less capricious." > > Who are these people that are applying the strong pressure?

Re: Python 3.0 unfit for serious work?

2007-02-21 Thread Jay Tee
On Feb 21, 8:06 pm, [EMAIL PROTECTED] wrote: > I don't know the specifics of your app, but why does everyone insist > that they need to use the 'system' python? Hey Grant, don't worry it's not a rant. A completely valid question. Again it's a problem of dependency management ... one of the thing

Re: Pep 3105: the end of print?

2007-02-23 Thread Jay Tee
On Feb 23, 8:48 am, I V <[EMAIL PROTECTED]> wrote: > While that's true, C++ compiler vendors, for example, take backwards > compatibility significantly less seriously, it seems to me. A year or so > ago, I tried compiling something I'd written for g++ 2, using a > then-recent-ish g++ 3; it failed

Re: Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread jay graves
pporting libraries grow. But the OP specifically asked for composite keys, which Django's ORM does not support. ... Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Network Graph Library

2007-11-28 Thread jay graves
e unmaintained. > I've used GraphViz before but never any of the Python bindings. It's always been easy enough to just generate the .dot file that Graphviz expects. http://www.graphviz.org/ I've also book marked NetworkX but I've never used it. https://networkx.lanl.go

Re: Ironpython book?

2006-04-17 Thread Jay Parlar
, of > course...). > Q: "So Alex, what are you doing with your 20% time at Google right now?" A: "Working for Microsoft!" Worlds collide! Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: freakin out over C++ module in python

2006-04-18 Thread Jay Parlar
rceforge.net/ It has the same purpose as 'struct', but is MUCH more Pythonic. I've described Contstruct as "the replacement for 'struct' I've been looking for since I started coding in Python". Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Plug-Ins In A Python Application

2006-04-18 Thread Jay Parlar
you to jump into considering you're just starting out in Python. However, if you do learn it now, you won't have to learn it again later when everyone's using it :) Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.5 excitement

2006-04-19 Thread Jay Parlar
rned Python with oh so long ago(between 1.5.2 and the mysterious 1.6). I told people for a long time that Core was the best book with which to learn Python, but I stopped doing that as it's too out of date now. Glad to see Ruby isn't the only language getting a bunch of new good books. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: Mouse control in OS X

2006-04-20 Thread Jay Parlar
to try it myself, but if any package is going to let you control things like native mouse clicks (outside of a custom GUI environment like PyGame, wx, gtk, QT, etc.), it will probably be PyObjC. Jay P. -- http://mail.python.org/mailman/listinfo/python-list

Re: tail a file (win)

2006-04-20 Thread Jay Parlar
> to "tail" a file much like I would in Unix so I can just see the > latest entry and move from there?-- > http://mail.python.org/mailman/listinfo/python-list I've not tried it myself, but I found this via a Google search: http://mithrandr.moria.org/blog/147.html Jay

Re: Passing data attributes as method parameters

2006-04-23 Thread Jay Parlar
blem. And an even more illustrative example: >>> class M: ... x = 2 ... def my_method(self, param = M.x): ... pass ... Traceback (most recent call last): File "", line 1, in ? File "", line 3, in M NameError: name 'M' is not defined The class is still be

Re: Instruction at "0x00FC3D70" use memory address "0x00000000". Can't be "read".

2006-04-24 Thread Jay Parlar
d.exe could have crashed and caused that error. You have to tell us what program (I'm assuming Python, but who knows, maybe you sent the message to the wrong list), what your OS is, what you were doing, what *exactly* happened, etc. etc. Then maybe someone can provide some insight. Jay P. -- h

Re: print names of dictionaries

2006-04-26 Thread jay graves
an-my-code-discover-the-name-of-an-object ... Jay Graves -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   >