Re: Easy "here documents" ??

2004-12-21 Thread Jim Sizelove
/moinmoin/Python3.0 Oh, but it does work: >>> variable1 = 1 >>> variable2 = 2 >>> s = """ ...v1 = %(variable1)s ...v2's value is: %(variable2)s ... """ >>> print s % vars() v1 = 1 v2's value is: 2 --Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: When was extended call syntax introduced?

2004-12-21 Thread Jim Sizelove
edreamleo/front.html It looks like the extended call syntax was added in Python 2.0. See "What's New in Python 2.0, 9.1 Minor Langage Changes" at http://www.amk.ca/python/2.0/new-python.html Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy "here documents" ??

2004-12-22 Thread Jim Hill
Fredrik Lundh wrote: >Jim Hill wrote: > >> I'm trying to write a script that writes a script for a rather specialized >> task. I know that seems weird, but the original version was written in >> Korn shell and most of my team are familiar with the way it does things &

Re: Tkinter vs wxPython

2004-12-29 Thread Jim Smith
Steve Holden wrote: > I've tried a number of these tools, including BlackAdder, wxDesigner, > wxGlade and BoaConstructor. I even paid money for some of them. I have also tried each of these and paid money for the first two. My personal favorite is wxDesigner. It is very polished and worth every

Python plug-in Frameworks like Eclipse RCP...

2005-03-30 Thread Jim Hargrave
Eclipse provides a very nice application framework which supports plug-ins. It's easy to dynamically add new functionality, menu items, property editors, options etc.. using a combination of XML and Java code. Is there a similar framework for Python? If not any hints on how such a framework wou

Re: Python plug-in Frameworks like Eclipse RCP...

2005-04-01 Thread Jim Hargrave
to the mean or adding a tab. Again this is much like Eclipse RCP - but forget that part :-) J Jim Hargrave wrote: Eclipse provides a very nice application framework which supports plug-ins. It's easy to dynamically add new functionality, menu items, property editors, options etc.. us

Re: Name of IDLE on Linux

2005-04-02 Thread Jim Benson
is called. I lloked in the Python web pages to try to find > a list of the files in the various installations, but was unable to find > the information. > Try idle (all lower case). On my RH-9 system it is in /usr/local/bin HTH. Jim -- http://mail.python.org/mailman/listinfo/python-list

[JIM_SPAM] Microsoft supporting a .NET version of Python...

2005-04-07 Thread Jim Hargrave
http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 -- http://mail.python.org/mailman/listinfo/python-list

Re: [JIM_SPAM] Microsoft supporting a .NET version of Python...

2005-04-08 Thread Jim Hargrave
oops - Sorry for the posting. This wasn't meant for the newsgroup :-) J Steve Holden wrote: Jim Hargrave wrote: http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 You really shoud try and get out more: http://www.pycon.org/dc2005/talks/keynote re

Re: Python / Win32 extensions compatibility with Windows XP

2005-04-12 Thread Jim Sizelove
than Python 2.4? Thank You Matthew Harelick There were some memory issues that caused makepy on Python 2.4 to crash for some large type libraries (including Excel). This problem has been fixed in build 204 of pywin32, released just today. Regards, Jim -- http://mail.python.org/mailman/listinfo

Re: recording data between [ and ]

2005-04-21 Thread Jim Sizelove
: >>> def between2(data, start, end): ... pattern = re.escape(start) + ' # start tag \n' +\ ... r'([^' + re.escape(end) + r']*)' + " # anything except end tag \n" +\ ... re.escape(end) + ' # end tag \n' ... return re.findall(pattern, data, re.VERBOSE) ... >>> print between2(foo, '[', ']') ['lsass.exe', 'System', 'firefox.exe'] >>> print between2(foo, '<', '>') ['stuff', 'more', 'qqq'] Regards, Jim Sizelove -- http://mail.python.org/mailman/listinfo/python-list

Re: Utah Python Users Group

2005-04-24 Thread Jim Hargrave
I'm a Computational Linguist just starting with Python. I personally would be very interested in a UT Python group. Jim lugal wrote: Is anyone aware if there's a Utah-based Python User Group? If not, does any else from Utah have any interest in forming a Utah-based Python User Grou

Re: key binding with mac

2005-04-26 Thread Jim Sizelove
support. You can get it through http://pythonmac.org/packages or via fink. You will find the Pythonmac-SIG mailing list very helpful for questions about Python on the Macintosh. You can learn more at: http://www.python.org/sigs/pythonmac-sig/ HTH, Jim Sizelove -- http://mail.python.org/mailman

Re: [OT] Usage of U+00B6 PILCROW SIGN

2014-02-04 Thread Jim Gibson
In article , Michael Torrie wrote: > On 02/04/2014 08:21 AM, wxjmfa...@gmail.com wrote: > > > > Useless and really ugly. > > How do you recommend we discover the anchor links for linking to? Use the Table Of Contents panel on the left? -- Jim Gibson -- https://ma

libre office

2016-01-20 Thread jim-pc
How do I get data from libre office using python? -- https://mail.python.org/mailman/listinfo/python-list

Re: querry on queue ( thread safe ) multithreading

2014-03-11 Thread Jim Gibson
ate of other people's resources and a better web citizen. It is also much easier to program. -- Jim Gibson -- https://mail.python.org/mailman/listinfo/python-list

Re: finding data from two different files.

2013-10-18 Thread Jim Gibson
c 85 > x ef 123 > w de 33 > > Regards../ omps Interestingly, somebody named "Om Prakash Singh" asked the identical question on the perl beginners list, except with the word "perl" substituted for "python". Is this a homework problem? Are you unsure about which language to use? Are you comparison shopping? -- Jim Gibson -- https://mail.python.org/mailman/listinfo/python-list

Re: Python on a MacBook Pro (not my machine)

2013-10-28 Thread Jim Gibson
/products/bbedit/> <http://www.barebones.com/products/textwrangler/> <http://code.google.com/p/macvim/> -- Jim Gibson -- https://mail.python.org/mailman/listinfo/python-list

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread Jim Gibson
done this in the past, but not recently. This should work for Python (os.system("gnuplot gnuplot.cmd") or Perl (system("gnuplot gnuplot.cmd") with suitable commands to execute external programs. -- Jim Gibson -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Wing IDE 5.1.2 released

2015-02-26 Thread Jim Mooney
Hey, can I run Py 2.7 and 3.4 side by side without a lot of hassle, using Wing? I run both since I'm migranting and so far the free IDEs just seem to choke on that. -- https://mail.python.org/mailman/listinfo/python-list

[ANN] OpenStack Collective Conference in Austin, TX, Aug 13-14, 2015

2015-05-12 Thread Jim Freeze
your OpenStack community. Proposals are being accepted now https://openstackcollective.com/proposals/new Super Early Bird Tickets are avaialble now https://openstackcollective.com/register Stay tuned by following us @oscconf on twitter Contact us at organiz...@openstackcollective.com -- Dr. Jim

Re: python newbie

2014-06-18 Thread Jim Gibson
ython code here or provide a link to code posted elsewhere for additional help. Good luck. -- Jim Gibson -- https://mail.python.org/mailman/listinfo/python-list

Re: [TIP] Anyone still using Python 2.5?

2011-12-21 Thread Jim Fulton
ntinuous integration set up for my packages and > it's highlighting some 2.5 compatibility issues. I'm wondering whether to > fix those (lots of ugly "from __future__ import with_statement" everywhere) > or just to drop Python 2.5 support. > > What do people feel

Faking TCP Sessions with Scapy

2013-03-22 Thread Jim Mellander
Hi all: For various reasons, I want to take apache logs, and create actual pcap packets that could plausibly have created those logs. Obviously, a lot of the info would need to be faked, such as the actual page contents that were served (we have a byte count), the ports, and a few other details.

Newbie - BigInt

2005-12-12 Thread Jim Steil
iable that it should be a big integer instead of int?     -Jim -- Jim Steil VP of Application Development CustomCall Data Systems (608) 274-3009 x286 -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie - BigInt

2005-12-12 Thread Jim Steil
SOAPpy     -Jim Jim Steil VP of Application Development CustomCall Data Systems (608) 274-3009 x286 Fredrik Lundh wrote: Jim Steil wrote I am trying to call a SOAP web service with python and I having success unless I need to pass a BigInteger parameter. Since python is

Re: Newbie - BigInt

2005-12-12 Thread Jim Steil
Found my answer. x = 1L sets x to 1 and makes it a type of Long.  I tested with my web service and it works.     -Jim Jim Steil VP of Application Development CustomCall Data Systems (608) 274-3009 x286 Fredrik Lundh wrote: Jim Steil wrote I am trying to call a SOAP

Re: Guido at Google

2005-12-21 Thread Jim Benson
dbook of Chemistry and Physics > (c) 1955. > Maybe things have changed since then ;-) > Actually they did change...My 54th edition lists the change that as of July 1 1959, by definition, 1 inch is exactly 25.4 mm. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Detecting problems in a forked process

2005-12-29 Thread Jim Segrave
the same thing at the same time. Thanks in advance :) options: Have the child set it's exit code to indicate success or failure and use one of the various os.wait functions in the parent to retrieve it. or create a pipe before forking and you can pass data back and forth between the parent

Re: stderr, stdout, and errno 24

2006-07-12 Thread Jim Segrave
that they are all properly closed (or, in the case of Python, if you don't explicitly close them, that any references to the files cease to exist after the script runs). I'd personally recommend explicit closing here. -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Getting focused window of another app

2006-07-14 Thread Jim Lewis
Anyone know how to get the caption of the window currently in focus in whatever app is in use? If I am using Excel, for example, I want my python app to know that Excel is currently being used. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting focused window of another app

2006-07-15 Thread Jim Lewis
Never mind ... wHnd = win32gui.GetForegroundWindow() Caption = win32gui.GetWindowText (wHnd) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to lock files (the easiest/best way)?

2006-07-16 Thread Jim Segrave
quot; % (lockfile, max_wait, pid)) # it's not been locked too long, wait a while and retry f.close() time.sleep(1) # if we get here. we have the lockfile. Convert the os.open file # descriptor into a Python file object and record our PID

Re: How to lock files (the easiest/best way)?

2006-07-16 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Jim Segrave <[EMAIL PROTECTED]> wrote: >except OSError, e: >if e.errno != errno.EEXIST: this should read: if e.errno != errno.ENOENT: (it was left with EEXIST from testing this code by forcing an error, as

Text Summarization

2006-07-19 Thread Jim Jones
Is there a Python library that would allow me to take a paragraph of text, and generate a one or two sentence summary of that paragraph? -- http://mail.python.org/mailman/listinfo/python-list

Easy to use distributed system?

2006-08-13 Thread Jim Jones
or process, and then have the results returned in some sort of callback fashion. Any insight is greatly appreciated. -- Jim http://www.runfatboy.net - Exercise for the rest of us. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: SimpleJSONRPCServer

2006-10-09 Thread Jim Washington
MAIL PROTECTED] -Jim Washington -- http://mail.python.org/mailman/listinfo/python-list

Re: iterator? way of generating all possible combinations?

2006-05-31 Thread Jim Segrave
er the file object, as follows, works - it now generates a a ... a z b a ... z z class FileReIterable2(object): def __init__(self, file): self.file = open(file, 'rU') def __iter__(self): self.file.seek(0) while True: line = self.f

Re: An oddity in list comparison and element assignment

2006-06-01 Thread Jim Segrave
f analysiing nested structures - if you have a tuple, containing tuples which contain lists, then are those top level tuples 'equal' if there are aliases in the lists? How many levels deep should an equality test go? Does the more common test, to see if the elements of a sequence a

Re: An oddity in list comparison and element assignment

2006-06-01 Thread Jim Segrave
which works at the moment of comaprision is already there - that's what == does. If you really think there's a need for a comparision which includes dealing with aliasing, then it seems to me a python module with a set of functions for comparisions would make more sense. --

Re: grouping a flat list of number by range

2006-06-01 Thread Jim Segrave
tinue if __name__ == '__main__': for l in [[3, 6, 7, 8, 12, 13, 15], [2], []]: print l, "=>", [lst for lst in IterInterval(l)] /usr/home/jes% python interval.py [3, 6, 7, 8, 12, 13, 15] => [[3, 4], [6, 9], [12, 14], [15, 16]] [3] => [[3, 4]] [] => [] -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: grouping a flat list of number by range

2006-06-01 Thread Jim Segrave
t now works, but returns [0, 0] when passed an empty list, when it should return nothing at all -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: grouping a flat list of number by range

2006-06-01 Thread Jim Segrave
tmp, valinc]; >tmp = val >valinc = val+1 >yield [tmp, valinc] Still fails when passed an empty list, the initial assignment to tmp is an IndexError -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: grouping a flat list of number by range

2006-06-01 Thread Jim Segrave
, 9], [12, 14], [15, 16]] Fails on an empty list, as tmp is not defined when it hits the yield -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: grouping a flat list of number by range

2006-06-02 Thread Jim Segrave
didn't see the right way to iterate over the supplied list inside the function, wheras he did. It's short, simple and correct. If you really wanted to return 'spam' or an exception in his solution, it's a simple if statement at the start of the function. -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Pyrex list/array

2006-06-03 Thread Jim Lewis
I'm trying to move a function into pyrex for speed. The python side needs to pass a list to the pyrex function. Do I need to convert to array or something so pyrex can generate tight code? I'm not clear how to do this. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython wxgrid question

2006-06-03 Thread Jim Segrave
xt = "Row: %d\nCol: %d" % (row, col), bg = "#%02x%02x%02x" % ((row * 4 + col) * 16, (row * 4 + col) * 16, (row * 4 + col) * 16), fg = "#ff" ).grid(row =

Re: Pyrex list/array

2006-06-04 Thread Jim Lewis
Thanks for your comments. > You probably didn't expect the Inquisition... Correct ;-) > 1. What is your speed requirement and how far short of that are you at the > moment? ~10 times faster. > 2. Are you sure there is no Python or third-party module that does what you > want? Yes. > 3. Is

Re: Pyrex list/array

2006-06-04 Thread Jim Lewis
> Is it substantially faster with psyco than without? If psyco is performing > its magic on the critical section of code already, you are going to lose > that when switching to Pyrex. Yes but from what I read Pyrex can be a lot faster than psyco under the right circumstances. -- http://mail.pyt

Re: Pyrex list/array

2006-06-04 Thread Jim Lewis
htforward loop approach but it's too slow. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Dictionaries

2006-06-05 Thread Jim Segrave
27;s quite immune to any existing order or lack thereof, whereas some other sorts, quicksort being a prime example, require great care to avoid pathological cases. -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Dictionaries

2006-06-05 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Tim Peters <[EMAIL PROTECTED]> wrote: >[Jim Segrave] >> Actually, presorted lists are not a bad case for heapsort - it's quite >> immune to any existing order or lack thereof, > >Write a heapsort and time it. It's not a d

Re: PythonPerl 0.9

2006-06-16 Thread Jim Fulton
Have you looked at PyPerl? http://wiki.python.org/moin/PyPerl I think it was further along. It might be good to build on. Jim On Jun 16, 2006, at 11:37 AM, Bruno Obsomer wrote: > You love Python, but think Perl can be useful anyway. You can now > mix the > two in a single pro

Re: locating strings approximately

2006-06-29 Thread Jim Segrave
Useless Python <http://www.uselesspython.com/download.php?script_id=108>. *Apse* An extension module (written in C): Apse <http://www.personal.psu.edu/staff/i/u/iua1/python/apse/>. Requires python, SWIG, and a C compiler *Java* SecondString <http://sourceforge.net/projects/secondstring/> is an open source package with Java implementations of a large number of string comparision algorithms. They should not be too difficult to port to Python. -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
: , integer # integer at end # Result: integer: %4d, integer %1d integer at end %1d Testing: float .## no decimals ###. no int .### at end ###. Result: float %7.2f no decimals %4.0f no int %4.3f at end %4.0f Testing: Left string <<<<<< short left string < Result: Left string %-6s short left string %-1s Testing: right string >>>>>> short right string > Result: right string %6s short right string %1s Testing: escaped chars \ \.## \<\<<<< \>\><<< Result: escaped chars \#%3d \#%6.2f \<\<%-3s \>\>%-3s -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: string replace

2006-06-30 Thread Jim Segrave
vowel uppercase: import string trans_table = string.maketrans('aeiou', 'AEIOU') "I don't know, but can be this feature included into".translate(trans_table) prints: "I dOn't knOw, bUt cAn bE thIs fEAtUrE InclUdEd IntO" That more than addresses y

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
e definition of the >formatters variable. > >Pyparsing's project wiki is at http://pyparsing.wikispaces.com. If fails for floats specified as ###. or .###, it outputs an integer format and the decimal point separately. It also ignores \# which should prevent the '#' from being inc

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Paul McGuire <[EMAIL PROTECTED]> wrote: >"Jim Segrave" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> In article <[EMAIL PROTECTED]>, >> Paul McGuire <[EMAIL PROTECTED]> wrote: >> &

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Paul McGuire <[EMAIL PROTECTED]> wrote: >"Jim Segrave" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > >I can see that the OP omitted the concept of "@|||" centering, since the >Python string int

Re: Regular Expression - old regex module vs. re module

2006-07-01 Thread Jim Segrave
either literals or lists > if type(item) == ListType: Might you be better off asking if item has a __getitem__? It would then work with tuples and Extending to dictionaries would then be easier >def isReportTemplate(obj): >"""Return 1 if obj is an instance of class ReportTemplate. >""" >if type(obj) == InstanceType and \ >string.find(`obj.__class__` , ' ReportTemplate ') > -1: >return 1 >else: >return 0 Why not just use isinstance(obj, classname)? >### ># ColumnReportTemplate # >### > >class ColumnReportTemplate: >"""This class allows one to specify column oriented output formats. > -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread Jim Segrave
p of a machine (OS installation or whatever), our solution was to have a post-install CD or floppy which fetched standard server configuration data. This included an ssh public key for our ssh-key distribution, so after running the post-install disc, we could push out staff ssh-keys and logins were

Re: socket buffer flush question

2006-07-05 Thread Jim Segrave
until the previous command has been processed. Once you transfer data to your machine's network stack, there's no way to stop it being sent to the remote end - in fact there's no practical way to determine if it's been put in a packet, sent to the remote end and lost or put in

Tkinter problem

2006-07-07 Thread Jim Anderson
look correct and the tcl/tk and python librarys are all still in place. There is a file '/usr/lib/python2.4/lib-dynload/_tkinter.so'. I'm not sure if this is the file not being found, but that is what is sounds like. I did a search on this on the web and got some hits, but none of t

Re: how can I avoid abusing lists?

2006-07-08 Thread Jim Segrave
eyz = counters.keys() keyz.sort() for k in keyz: print k, counters[k] Takes care of IndexError and ValueError. It does not report keys that don't get incremented. If that's important, then initalise counters as in the quoted posting. For Python 2.4 and later, you can replace the keyz =

Re: Detecting 64bit vs. 32bit Linux

2006-07-08 Thread Jim Segrave
on of Python, then you'll need to figure out how to build and incorporate a Python extension which can detect this situation -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

can't pickle instancemethod objects

2006-07-09 Thread Jim Lewis
Pickling an instance of a class, gives "can't pickle instancemethod objects". What does this mean? How do I find the class method creating the problem? -- http://mail.python.org/mailman/listinfo/python-list

Re: can't pickle instancemethod objects

2006-07-09 Thread Jim Lewis
> How about you post the complete stack trace of the exception? Exception in Tkinter callback Traceback (most recent call last): File "C:\program files\python\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) File "C:\Public\world.py", line 1832, in BtnGo DoBtnGo()

Re: can't pickle instancemethod objects

2006-07-09 Thread Jim Lewis
> I'd suggest that "pop" could be your culprit. ...What is pop? A function or > an instance method? Neither. pop is an instance of a class, like: class X: ... pop = X () pop surely is the culprit but it has arrays of objects, etc., and I don't know what to look for. -- http://mail.python.or

Re: can't pickle instancemethod objects

2006-07-09 Thread Jim Lewis
> Here's a thought: comment out every attribute in your class, and then try > pickling it. If it succeeds, uncomment just *one* attribute, and try > pickling again. Repeat until pickling fails. Was trying to avoid that but you motivated me to do so and now I found the probem. In a utility routine

Re: Augument assignment versus regular assignment

2006-07-10 Thread Jim Segrave
ugmented version. $ cat x.py def getindex(ind = 0): print 'getindex() called' return ind a = [0, 1, 2, 3, 4, 5] a[getindex(0)] = a[getindex(0)] + 17 print a a[getindex(1)] += 22 print a $ python x.py getindex() called getindex() called [17, 1, 2, 3, 4, 5] getindex() called [17

Re: re question

2006-07-10 Thread Jim Segrave
^^^ entire regular expression. This is useful if you wish to include ^ the flags as part of the regular expression, instead of passing a flag argument to the compile() function. Some regex packages, but not Python's, support (?-) and this allows turning the flag off and on for parts of the regex. -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-08-28 Thread Jim Gibson
7; is that the compare operation can be an expensive one, regardless of the whether the comparison uses multiple keys. Since in comparison sorts, the compare operation will be executed N(logN) times, it is more efficient to pre-compute a set of keys, one for each object to be sorted. That need be done on

[ANN] IronPython 1.0 released today!

2006-09-05 Thread Jim Hugunin
re also looking at the bigger picture to make all dynamic languages deeply integrated with the .NET platform and with technologies and products built on top of it. I'm excited about how far we've come, but even more excited by what the future holds! Thanks - Jim Hugunin (for the IronPython Team) -- http://mail.python.org/mailman/listinfo/python-list

string search and modification

2006-09-06 Thread Jim Britain
I know absolutely nothing about Python. My background is shell scripts assembly language and C programming. Currently I work network support. This is a portion of a Python script written by aaronsinclair. the full script can be found at: http://forums.ev1servers.net/printthread.php?t=50435&pa

Re: string search and modification

2006-09-07 Thread Jim Britain
On 06 Sep 2006 13:23:43 -0700, Paul Rubin <http://[EMAIL PROTECTED]> wrote: >Jim Britain <[EMAIL PROTECTED]> writes: >> I would like to match [123.123.123.123] (including the qualifying >> brackets), but be able to simply return the contents, without the >> b

Picture in Excel issue

2006-10-01 Thread Jim Chiang
th the same results. Any idea what the problem is or how I can insert the picture??   TIA, Jim   -- http://mail.python.org/mailman/listinfo/python-list

subversion revision number string within an application packaged with distutils?

2006-12-07 Thread Jim Tittsler
Is there a standard recipe for getting the subversion revision number into my Python-based application each time I package it up with distutils? (Not just the package name, but also a string that I will display in my app's "About" dialog.) -- http://mail.python.org/mailman/listinfo/python-list

Re: How Micro-pump will change the future of computer/ mobile chips.

2006-12-16 Thread Jim Granville
[EMAIL PROTECTED] wrote: > How Micro-pump will change the future of computer/ mobile chips. FAR more hype than practical solution Sorry guys, this will not "change the future of computer/ mobile chips." > Engineers at Purdue University have developed a tiny "micro-pump" > cooling device small

Re: Python vs C for a mail server

2006-01-28 Thread Jim Segrave
the mistaken belief that they actually have done it correctly. The number of software products which use eail and do so incorrectly is astounding and depressing. There's a reason that the source for sendmail is about 120K lines, exim is nearly 270K lines. Doing it right is _hard_. -- Ji

Re: Python vs C for a mail server

2006-01-29 Thread Jim Segrave
hich is ready to be used on the Internet for any but very limited applications. -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs C for a mail server

2006-01-29 Thread Jim Segrave
t these days. > >I'm on my second major mail system deployment built around Exim, and >would recommend it to anybody needing a robust, flexible mail server. There is an exim 4 book out, but not via O'Reilly - I gather sales were insufficient to persuade O'Rei

Re: MySQLdb question... using table name as arg

2006-02-03 Thread Jim Segrave
question but I just can't figure it out. How about interpolating the table name into the string: c.execute("update %s set col1 = %%s, col2 = %%s, col3=%%s" % (sometable), \ ['the', 'cat', 'in the hat']) Note the need to double the %'s for the parameters to be bound. -- Jim Segrave ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging overlapping spans/ranges

2005-05-10 Thread Jim Sizelove
start, end = s,e ... continue ... if s <= end: ... if end < e: ... end = e ... continue ... yield start, end ... start,end = s,e ... if start is not None: ... yield start, end ...

assignment, references and list comprehension

2005-05-26 Thread Jim O'D
yObjects2 = [ob for ob in myObjects if ob.argument == "pick me"] Then the following interrogation >>> myObjects2[0].argument 'pick me' >>> myObjects2[0].argument='juicy' >>> myObjects2[0].argument 'juicy' >>> myObjects[0].argument 'juicy' Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: assignment, references and list comprehension

2005-05-26 Thread Jim O'D
> trust me, it works the same way for all objects. > > Yes, it was lack of trust that led me on a 2 hour re-write to avoid creating subsets of object lists as I thought they were being copied. In fact it was another error... huh. I now know better. Jim -- http://mail.python.or

Re: assignment, references and list comprehension

2005-05-26 Thread Jim O'D
> reading this may help: > > http://effbot.org/zone/python-objects.htm > > > > > site bookmarked ;) -- http://mail.python.org/mailman/listinfo/python-list

running tkinter

2005-05-31 Thread Jim Anderson
, configure, make, install tcl and tk packages to get tkinter running? Thanks for any suggestions in advance. Jim Anderson -- http://mail.python.org/mailman/listinfo/python-list

Interfacing python program to C++ program instance

2007-07-05 Thread Jim Langston
Windows. Situation: Using a Python program called OpenRPG. I have a program that displays form data (a character sheet) in C++. I am able in the C++ program to build a string and copy it into the clipboard, then paste it into the input in the running Python program. I would like to somehow au

2**2**2**2**2 wrong? Bug?

2007-07-09 Thread Jim Langston
In Python 2.5 on intel, the statement 2**2**2**2**2 evaluates to >>> 2**2**2**2**2 20035299304068464649790723515602557504478254755697514192650169737108940595563114 53089506130880933348101038234342907263181822949382118812668869506364761547029165 041871916351587966347219442930927982084309104855990570

Re: 2**2**2**2**2 wrong? Bug?

2007-07-09 Thread Jim Langston
"Paul Rubin" <http://[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Jim Langston" <[EMAIL PROTECTED]> writes: >> In Python 2.5 on intel, the statement >> 2**2**2**2**2 >> evaluates to >> >>> 2**2**2**2**2 > &g

Re: 2**2**2**2**2 wrong? Bug?

2007-07-09 Thread Jim Langston
71089405955631145308950613088. The same as "2**2**2**2**2" -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Langston Sent: 2007Äê7ÔÂ10ÈÕ 12:47 To: python-list@python.org Subject: Re: 2**2**2**2**2 wrong? Bug?

Re: Python version changes, sys.executable does not

2007-07-19 Thread Jim Langston
"Jeffrey Froman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello All, > > I have two python versions installed, one in /usr/bin, and one in > /usr/local/bin. However, when invoking python without a full path, > I get the wrong executable with the right sys.executable string! >

Re: Python version changes, sys.executable does not

2007-07-19 Thread Jim Langston
"Jeffrey Froman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello All, > > I have two python versions installed, one in /usr/bin, and one in > /usr/local/bin. However, when invoking python without a full path, > I get the wrong executable with the right sys.executable string! >

Re: *** Dr G Polya BRILLIANTLY analyses the Virgina Shooting Incident ***

2007-04-22 Thread Jim Thompson
ANALYSIS: > >http://countercurrents.org/polya230407.htm <-- > >Dr Polya, we are incredibly proud of you. God Bless you for your >courage. ...Jim Thompson -- | James E.Thompson, P.E. |mens | | Analog Innovat

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Jim Ford
Bob Phillips wrote: > That is the oft-quoted, idiotic type of example. The reality is that if we > follow the thread, we know the question, we only want to see the answer, not > wade through a morass of stuff we have already seen. If we haven't seen it, > guess what, we can go and read it. !tuo

Win32: shortpathname to longpathname

2007-05-08 Thread Jim Tittsler
I wrap my cross platform application up with py2exe on Windows, and have the installer associate a particular file type with it. When a user double clicks on a document to launch my application, Windows appears to pass me the "short" Windows pathname. How can I convert to the long version of the

Cycle detection and object memory usage?

2007-05-20 Thread Jim Kleckner
cycles: I understand from the documentation that types with a finalizer method that participate in cycles can't be collected. What is the best way to go about finding these cycles? Googling gives a variety of methods none of which seem terribly mainstream for such a common problem. Object mem

Re: Cycle detection and object memory usage?

2007-05-21 Thread Jim Kleckner
Gabriel Genellina wrote: > En Sun, 20 May 2007 23:54:15 -0300, Jim Kleckner <[EMAIL PROTECTED]> > escribió: > >> I understand from the documentation that types with a finalizer method >> that participate in cycles can't be collected. > > Yes; older Python

Re: Formatting Results so that They Can be Nicely Imported into a Spreadsheet.

2007-08-04 Thread Jim Langston
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote: >> Hi All. >> Let's say I have some badly formatted text called doc: >> >> doc= >> """ >> friendid >> Female >> >> 23 years old >> >>

Re: How to use C enum in Python CTypes?

2007-08-07 Thread Jim Langston
"rozniy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Aug 7, 2:11 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Tue, 07 Aug 2007 04:57:19 +, rozniy wrote: >> > typedef enum olss_tag >> >{ >> >OLSS_AD, >> >OLSS_DA, >> >OLSS_DIN, >> >OLSS_D

<    1   2   3   4   5   6   7   8   >