Re: Nested dictionaries trouble

2007-04-18 Thread Steven D'Aprano
On Wed, 18 Apr 2007 12:16:12 -0700, IamIan wrote: > I am using the suggested approach to make a years list: > > years = ["199%s" % x for x in range(0,10)] > years += ["200%s" % x for x in range(0,10)] > > I haven't had any luck doing this in one line though. Is it possible? years = ["199%s" % x

Re: Text Suffix to Prefix Conversion

2007-04-18 Thread 7stud
On Apr 18, 11:08 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > EMC ROY wrote: > > Original Sentence: An apple for you. > > Present: An apple for you .<.> > > Desire:An apple for you <.>. > >>> text = 'An apple for you .<.>' > >>> import re > >>> re.sub(r'(\S+)(<[^>]+>)(\s*)'

Re: How to communicate via USB "port"

2007-04-18 Thread Tim Roberts
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >Can someone explain how I would read the data from the USB "port"? I >don't know if it matters, but I am trying to read the data from a GPS >plugged in to the USB port. USB is a "protocol" bus. It isn't like a serial port, where you can just start

Re: comparison with None

2007-04-18 Thread Steven Howe
Alan Isaac wrote: "Terry Reedy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Should be in the reference manual section on comparisons. Only to this extent: http://www.python.org/doc/2.4/ref/comparisons.html objects of different types always compare unequal, and

Re: Beginner: Formatting text output (PyQt4)

2007-04-18 Thread Tina I
Glen wrote: >> Hello again, I don't blame anyone for not answering my last post, > since >> I obviously hadn't spent much time researching, but I've come a little >> ways and have another question. >> >> How can I better format text output to a QTextEdit object? I'm >> inserting 5 columns into

unicode and __repr__()

2007-04-18 Thread Martin Drautzburg
I am using repr() to pass arrays, dicts and combinations therof to javascript as it already returns a valid javascript expression (a string) right away. But for some reason it does not handle Umlaute correctly and those characters finally appear as two strange characters on the browser. I am using

Re: Third party script debugging on remote server ...

2007-04-18 Thread Graham Dumpleton
> Hi Graeme, > > Thanks for the suggestion. Unluckily for me, it doesn't seem to be > working though ... > > I've tried it a number of different ways. I guess if I put the code > after an exception, then the code won't be called. > So I ran an error in the python script and then I called the > sys

Re: What makes an iterator an iterator?

2007-04-18 Thread 7stud
Hi, Thanks for the responses. > 7stud <[EMAIL PROTECTED]> wrote: > > Can you explain some of the details of why this code fails: > --- > class Parrot(object): > def __iter__(self): > return self > def __init__(self): > self.next = self.next().next > def next(self): >

Re: Text Suffix to Prefix Conversion

2007-04-18 Thread Steven Bethard
EMC ROY wrote: > Original Sentence: An apple for you. > Present: An apple for you .<.> > Desire:An apple for you <.>. >>> text = 'An apple for you .<.>' >>> import re >>> re.sub(r'(\S+)(<[^>]+>)(\s*)', r'\2\1\3', text) 'An apple for you <.>.' -- http://mail.python.org/mailma

Text Suffix to Prefix Conversion

2007-04-18 Thread EMC ROY
Dear all, I'm a postgraduate student in Hong Kong, studying english language. I wanna seek help from all of you about some plain text manipulation. I have already add part-of-speech (POS) tags with angle bracket by software tagger, right after every word in my file, as attribute. How could I chan

Weekly Python Patch/Bug Summary

2007-04-18 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 357 open ( +8) / 3745 closed ( +8) / 4102 total (+16) Bugs: 958 open (+19) / 6657 closed ( +9) / 7615 total (+28) RFE : 251 open ( +2) / 280 closed ( +2) / 531 total ( +4) New / Reopened Patches __ Help with

Re: Beginner: Formatting text output (PyQt4)

2007-04-18 Thread Glen
On Wed, 18 Apr 2007 22:50:14 +, Glen wrote: Ok, obviously, my post didn't come out the way I wanted it to. In the first example from my text file below, the dictionary pairs, constructed from sorted tuples were in straight columns. When I write them to my QTextEdit, however, the columns are

Question about Tkinter MenuOption variable

2007-04-18 Thread Chad
Is there anyway to set the individual options in Tkinter to a particular variable. For example, I have a menu option(code is below) which has January, February, March and so on, which I would like to have corresponding values of 01, 02, 03 and so on. Can someone please tell me how to do that with

Re: Python Threads -

2007-04-18 Thread Alex Martelli
S.Mohideen <[EMAIL PROTECTED]> wrote: > Hi All, > > Can you please suggest a technique in Python where we can spawn few number > of worker threads and later map them to a function/s to execute individual > Jobs. > > Any references would be helpful.. I believe I give some examples in the Nutshel

Re: Python COM iterator

2007-04-18 Thread Carsten Haese
>[...] > > On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: > >> Does anyone know if there is a way to make a Python COM object > >> act like a proper iterator in VB/Delphi? >[...] After more googling, staring at win32com's code, and a fair bit of trial and error, I've come up with the follow

Re: Future Python Gui?

2007-04-18 Thread [EMAIL PROTECTED]
> The wrapper I maintain works differently, and includes the notebook widget. I've seen the page. You can get to it via Google's cache; just put the url in the box and the one search result returned usually has a "cached" link. However, that file is completely useless without instructions on how

Re: comparison with None

2007-04-18 Thread Alan Isaac
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Should be in the reference manual section on comparisons. Only to this extent: http://www.python.org/doc/2.4/ref/comparisons.html objects of different types always compare unequal, and are ordered consiste

Re: What makes an iterator an iterator?

2007-04-18 Thread Alex Martelli
7stud <[EMAIL PROTECTED]> wrote: ... > Can you explain some of the details of why this code fails: ... > def next(self): > for word in "Norwegian Blue's have beautiful > plumage!".split(): > yield word Sure, easily: a loop like "for x in y:" binds an unnamed temporary

Re: python - dll access (ctypes or swig)

2007-04-18 Thread Alex Martelli
Thomas Heller <[EMAIL PROTECTED]> wrote: ... > > and some technical issues such as threading (if COM client and server ... > I think that the latter problem (incompatible threading models in the same > process) are solved by COM apartments - aren't they? "apartment" is one threading model, b

Re: Strange terminal behavior after quitting Tkinter application

2007-04-18 Thread Charles Sanders
Chris wrote: > > But does anyone know why the Tkinter program is doing this to the > terminal in the first place? I don't want to have to tell users of my > program that they must recover their terminal's sanity each time after > running my program. > I don't know about Tkinter, but my g

Re: Compiling python from soruce vs RPM ?

2007-04-18 Thread howa
On Apr 19, 6:10 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > > Since /usr/bin/python isn't found, it doesn't look like there's an > existing version of Python that you might overwrite, but it's > important to verify such things when installing software. That's where > your distribution's packages h

Re: What makes an iterator an iterator?

2007-04-18 Thread Terry Reedy
An iterator is an object with a .__iter__ method that returns self and a .next method that either returns an object or raises StopIteration. One very good way to get an iterator from an iterable is for .__iter__ to be a generator function. When called, it returns an generator with .__iter__ a

Re: indexing web pages - in python?

2007-04-18 Thread Kevin T. Ryan
On Apr 18, 8:55 pm, Dan Stromberg <[EMAIL PROTECTED]> wrote: > Are there any open source search engines written in python for indexing a > given collection of (internal only) html pages? Right now I'm talking > about dozens, but hopefully it'll be hundreds or thousands at some point. > > I'm think

Re: Third party script debugging on remote server ...

2007-04-18 Thread dbee
On Apr 19, 1:52 am, dbee <[EMAIL PROTECTED]> wrote: > On Apr 19, 12:31 am, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > After calling whatever it is that is writing to standard output/error, > > do: > > > import sys > > sys.stdout.flush() > > sys.stderr.flush() > > > This should ca

Re: Using the Python interpreter

2007-04-18 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > Instead of starting IDLE as I normally do, I started the Python > interpreter and tried to run a program. I got a Python prompt (>>>), > and then tried unsuccessfully to run a Python script named Script1.py > that runs perfectly well in IDLE. Here's what I did: > Sc

Re: Spawn/Exec with asterisk in argument

2007-04-18 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > The spawn* and exec* functions appear to escape asterisks, I'm > guessing all shell characters too, before the spawn/exec'ed process > sees them. No. It is the shell that ordinarily processes these characters and gives them a special meaning. On most systems, ls does no

Re: comparison with None

2007-04-18 Thread Alan Isaac
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Should be in the reference manual section on comparisons. Only to this extent: http://www.python.org/doc/2.4/ref/comparisons.html objects of different types always compare unequal, and are ordered consiste

indexing web pages - in python?

2007-04-18 Thread Dan Stromberg
Are there any open source search engines written in python for indexing a given collection of (internal only) html pages? Right now I'm talking about dozens, but hopefully it'll be hundreds or thousands at some point. I'm thinking some sort of CGI script, with perhaps a cron job that updates the

Re: Using the Python interpreter

2007-04-18 Thread Stevie
On Thu, 19 Apr 2007 01:32:36 +0100, [EMAIL PROTECTED] wrote (in article <[EMAIL PROTECTED]>): > Instead of starting IDLE as I normally do, I started the Python > interpreter and tried to run a program. I got a Python prompt (>>>), > and then tried unsuccessfully to run a Python script named Script

Re: Third party script debugging on remote server ...

2007-04-18 Thread dbee
On Apr 19, 12:31 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > After calling whatever it is that is writing to standard output/error, > do: > > import sys > sys.stdout.flush() > sys.stderr.flush() > > This should cause any buffered data to be immediately flushed to the > main Apache error

Using the Python interpreter

2007-04-18 Thread tkpmep
Instead of starting IDLE as I normally do, I started the Python interpreter and tried to run a program. I got a Python prompt (>>>), and then tried unsuccessfully to run a Python script named Script1.py that runs perfectly well in IDLE. Here's what I did: >>>Script1.py Traceback (most recent call

Re: Future Python Gui?

2007-04-18 Thread Kevin Walzer
This should be saved as "Tile.py." Sorry. ### November 2006: Posted by Kevin Walzer, [EMAIL PROTECTED] Based on Tile wrapper by Martin Franklin. This version updates the wrapper to reflect changes in Tile commands, and adds support for Tile-based frames (ttk::frame). Freely reusable.

Spawn/Exec with asterisk in argument

2007-04-18 Thread jeremyfee
The spawn* and exec* functions appear to escape asterisks, I'm guessing all shell characters too, before the spawn/exec'ed process sees them. Is there a way around this? Not sure if this is a bug or a "feature". user$ touch test.txt user$ ls -l * -rw-r--r-- 1 user user 0 Apr 18 18:30 test.tx

Re: Future Python Gui?

2007-04-18 Thread Kevin Walzer
Since the Tkinter wiki is still down, here is the Tile wrapper I maintain: ### November 2006: Posted by Kevin Walzer, [EMAIL PROTECTED] Based on Tile wrapper by Martin Franklin. This version updates the wrapper to reflect changes in Tile commands, and adds support for Tile-based frames

Re: Future Python Gui?

2007-04-18 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: >> On Windows, the easiest way to install Tile is to grab it from >> ActiveState's Tcl distribution >> (http://www.activestate.com/products/activetcl/) and then place it with >> the Tcl/Tk bits that come with Python. The Tcl/Tk build for Windows that >> python.org provides

Re: Future Python Gui?

2007-04-18 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: >> "Tile" has already been mentioned in this thread, and I know >> there'll be at least one more follow-up on the subject. Tile >> includes a ("native"!) notebook, as well as a combobox, tree- >> view, ... http://wiki.tcl.tk/11075>. > > It seems that Tile does include a "

Re: Future Python Gui?

2007-04-18 Thread [EMAIL PROTECTED]
> As I've said often enough on the topic of Web frameworks, picking > winners gives only a temporary victory to those who want to avoid > making decisions. It's better to provide people with a means of making > an informed choice, and it should be realised that people will > approach this choice fr

Re: Future Python Gui?

2007-04-18 Thread [EMAIL PROTECTED]
> "Tile" has already been mentioned in this thread, and I know > there'll be at least one more follow-up on the subject. Tile > includes a ("native"!) notebook, as well as a combobox, tree- > view, ... http://wiki.tcl.tk/11075>. It seems that Tile does include a "notebook" widget but it's pure Tc

Re: Future Python Gui?

2007-04-18 Thread [EMAIL PROTECTED]
> On Windows, the easiest way to install Tile is to grab it from > ActiveState's Tcl distribution > (http://www.activestate.com/products/activetcl/) and then place it with > the Tcl/Tk bits that come with Python. The Tcl/Tk build for Windows that > python.org provides doesn't ship with Tile. You'l

Re: converting currency using locals

2007-04-18 Thread Gabriel Genellina
En Wed, 18 Apr 2007 15:08:24 -0300, Grzegorz Ślusarek <[EMAIL PROTECTED]> escribió: > Hi all. I have situation that I have value that holds price and I must > show > this price using national specification(e.g. thousands_sep). Any idea how > this can be done under python 2.4.4? I saw that func

Re: Python COM iterator

2007-04-18 Thread Larry Bates
Carsten Haese wrote: > On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: >> Does anyone know if there is a way to make a Python COM object >> act like a proper iterator in VB/Delphi? > > I don't use COM, VB, or Delphi, but Google turned up these two > references: > http://msdn.microsoft.com/li

Re: Newbie: import

2007-04-18 Thread 7stud
Here's an example where you are trying to import a function in one of your .py files--when that .py file is not in the current directory: import sys sys.path.append("/Users/me/2testing/dir1/") #directory that contains the file import test1 #name of file without .py extension test1.greet() --

Re: Third party script debugging on remote server ...

2007-04-18 Thread Graham Dumpleton
After calling whatever it is that is writing to standard output/error, do: import sys sys.stdout.flush() sys.stderr.flush() This should cause any buffered data to be immediately flushed to the main Apache error log, ie., don't look in any virtual host logs, check the main one. Graham On A

Re: Installing Python on NT

2007-04-18 Thread Gabriel Genellina
En Wed, 18 Apr 2007 18:09:03 -0300, Schwartz, Hillary <[EMAIL PROTECTED]> escribió: ? -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Beginner: Formatting text output (PyQt4)

2007-04-18 Thread Glen
Hello again, I don't blame anyone for not answering my last post, since I obviously hadn't spent much time researching, but I've come a little ways and have another question. How can I better format text output to a QTextEdit object? I'm inserting 5 columns into each row. When I write the info

Third party script debugging on remote server ...

2007-04-18 Thread dbee
Right. I've got a really, really annoying/difficult/time consuming problem with my development environment. I'm using django to build a web app with paypal integration. My server is hosted remotely, and it is receiving IPN (payment notifications) POST requests from Paypal. I've checked on google an

Re: Newbie: import

2007-04-18 Thread 7stud
On Apr 18, 10:34 am, [EMAIL PROTECTED] wrote: > I thought import used relative paths from either the python executable > or the script being executed. I have a script pulling in code from an > arbitrary directory. How is this happening? > > It's a RHEL 4 environment by the way. I couldn't find a

Re: comparison with None

2007-04-18 Thread Robert Kern
Steven Howe wrote: > Alan G Isaac wrote: >> >>> None >= 0 >> False >> >>> None <= 0 >> True >> >> Explanation appreciated. >> >> Thanks, >> Alan Isaac >> > I've read and found that 'None' comparisons is not always a good idea. > Better to: > from types import NoneType > > x = None > if type(

python-list@python.org

2007-04-18 Thread Anton Vredegoor
[EMAIL PROTECTED] wrote: > Try it with > > def test(): > L = 'a', 1, 2, 'a' > it1, it2 = xsplitter(L, lambda x: x == 'a') > print it1.next() > print it2.next() > print it1.next() > print it2.next() > > > The last print statement raises StopIteration... > We, however, exp

Re: comparison with None

2007-04-18 Thread Gary Herron
[EMAIL PROTECTED] wrote: > On Apr 18, 3:19 pm, Steven Howe <[EMAIL PROTECTED]> wrote: > >> I've read and found that 'None' comparisons is not always a good idea. >> Better to: >> from types import NoneType >> >> x = None >> if type( x ) == NoneType: >> # true >> < code > >> else: >>

Re: comparison with None

2007-04-18 Thread Gary Herron
Alan G Isaac wrote: > >>> None >= 0 > False > >>> None <= 0 > True > > Explanation appreciated. > > Thanks, > Alan Isaac > So that we can sort lists of objects, even when the objects of are different types, Python guarantees to supply a unique and consistent ordering of any two objects. The

Re: comparison with None

2007-04-18 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > On Apr 18, 3:19 pm, Steven Howe <[EMAIL PROTECTED]> wrote: >> I've read and found that 'None' comparisons is not always a good idea. >> Better to: >> from types import NoneType >> >> x = None >> if type( x ) == NoneType: >> # true >> < code > >> else: >> # fal

Re: What makes an iterator an iterator?

2007-04-18 Thread 7stud
On Apr 18, 8:50 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > The special methods need to be on the type -- having attributes of those > names on the instance doesn't help (applies to all special methods in > the normal, aka newstyle, object model; legacy, aka classic, classes, > work by slightly

using the sysloghandler class

2007-04-18 Thread Nicholas Milkovits
Hello all, I have a small script which attempts to write to the user.log syslog import logging, logging.handlers logger = logging.getLogger('bender') handler = logging.handlers.SysLogHandler(('localhost', logging.handlers.SYSLOG_UDP_PORT), logging.handlers.SysLogHandler.LOG_USER) formatter = log

Re: Future Python Gui?

2007-04-18 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > > If Python doesn't declare an official Gui system, then it'll be > fragmented, inconsistent, and unsupportable. I don't agree. GUI frameworks are somewhat like Web frameworks, object- relational mappers, and all the other things that work in different ways, work better

Re: comparison with None

2007-04-18 Thread brzrkr0
On Apr 18, 3:19 pm, Steven Howe <[EMAIL PROTECTED]> wrote: > I've read and found that 'None' comparisons is not always a good idea. > Better to: > from types import NoneType > > x = None > if type( x ) == NoneType: > # true > < code > > else: > # false; do something else. > < more c

Re: comparison with None

2007-04-18 Thread Paul McGuire
On Apr 18, 5:19 pm, Steven Howe <[EMAIL PROTECTED]> wrote: > Alan G Isaac wrote: > > >>> None >= 0 > > False > > >>> None <= 0 > > True > > > Explanation appreciated. > > > Thanks, > > Alan Isaac > > I've read and found that 'None' comparisons is not always a good idea. > Better to: > from types

Re: pycurl problem

2007-04-18 Thread Gabriel Genellina
En Wed, 18 Apr 2007 11:48:06 -0300, pabloski <[EMAIL PROTECTED]> escribió: > I noted that if I define c.proxy and c.url as costants e.g. c.url = > "http://www.google.com/search?blah blah" and c.proxy = > "127.0.0.1:8080" it works > > However if I define them as described before pycurl raises t

Re: comparison with None

2007-04-18 Thread Steven Howe
Alan G Isaac wrote: > >>> None >= 0 > False > >>> None <= 0 > True > > Explanation appreciated. > > Thanks, > Alan Isaac > I've read and found that 'None' comparisons is not always a good idea. Better to: from types import NoneType x = None if type( x ) == NoneType: # true < code > el

Re: comparison with None

2007-04-18 Thread Terry Reedy
"Alan G Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | >>> None >= 0 | False | >>> None <= 0 | True | | Explanation appreciated. Should be in the reference manual section on comparisons. -- http://mail.python.org/mailman/listinfo/python-list

Re: Do other Python GUI toolkits require this?

2007-04-18 Thread Kevin Walzer
James Stroud wrote: > This appears more or less unique to Objective C. It looks that with > PyObjC, you have to interact with the Objective C runtime to manage > memory. This is not required, thankfully, with any other GUI tookits > I've seen. > > I think the main difference is that PyObjC is

Re: Python Threads -

2007-04-18 Thread Aahz
In article <[EMAIL PROTECTED]>, S.Mohideen <[EMAIL PROTECTED]> wrote: > >Can you please suggest a technique in Python where we can spawn few number >of worker threads and later map them to a function/s to execute individual >Jobs. You can see an example for a web spider on my Python website. --

Re: Compiling python from soruce vs RPM ?

2007-04-18 Thread Paul Boddie
howa wrote: > I have compiled python 2.5 from source > > i.e. > > ./configure > make > make install By default, configure uses /usr/local as the "prefix", not /usr... > but when i try to install another package require python, seems it > can't regonize python... > > e.g.. > > > /usr/bin/python is

comparison with None

2007-04-18 Thread Alan G Isaac
>>> None >= 0 False >>> None <= 0 True Explanation appreciated. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Do other Python GUI toolkits require this?

2007-04-18 Thread James Stroud
Kevin Walzer wrote: > From the introduction to PyObjC, the Python-Objective-C bridge on Mac > OS X: > > "As described in Objective-C for PyObjC users the creation of > Objective-C objects is a two-stage process. To initialize objects, first > call a class method to allocate the memory (typical

Re: ??? POLICE AND CITY/UNIVERSITY OFFICIALS INCOMPETENCE LEADS TO 33 KILLED BY KOREAN-ALQAEDA TERRORIST ???

2007-04-18 Thread mathedman
On 17 Apr 2007 06:56:05 -0700, [EMAIL PROTECTED] wrote: So many of the talking-head rants about VPI are idiotic. 1) bomb scares should have ak\lerted officials --blah blah blah The fact is that on a large university campus bomb threats are almost as common as exams! (there is a

Do other Python GUI toolkits require this?

2007-04-18 Thread Kevin Walzer
From the introduction to PyObjC, the Python-Objective-C bridge on Mac OS X: "As described in Objective-C for PyObjC users the creation of Objective-C objects is a two-stage process. To initialize objects, first call a class method to allocate the memory (typically alloc), and then call an init

Re: tkinter canvas

2007-04-18 Thread kyosohma
On Apr 18, 3:43 pm, Gigs_ <[EMAIL PROTECTED]> wrote: > how to write text on canvas. i know that i need to use canvas.create_text, but > how to write text than when i create_text? > or how to access object ID in canvas and change some options? > > thanks in advance! All you need to do is canvas.cre

Antigen Notification: Antigen found a message matching a filter

2007-04-18 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 299" Filter name: "KEYWORD= spam: xxx " Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrativ

Python Threads -

2007-04-18 Thread S.Mohideen
Hi All, Can you please suggest a technique in Python where we can spawn few number of worker threads and later map them to a function/s to execute individual Jobs. Any references would be helpful.. Thanks Moin -- http://mail.python.org/mailman/listinfo/python-list

Installing Python on NT

2007-04-18 Thread Schwartz, Hillary
___ Hillary Schwartz Applications Specialist, IT - Development Lerner, Sampson & Rothfuss, LPA Phone: (513) 241-3100 x3138 [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Future Python Gui?

2007-04-18 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: . . . >I wouldn't mind using just Tkinter, despite it's primative look, >except that it doesn't support more advanced widgets like "notebook".

Re: Future Python Gui?

2007-04-18 Thread Kevin Walzer
>> I wouldn't mind using just Tkinter, despite it's primative look, >> except that it doesn't support more advanced widgets like "notebook". When Tile becomes part of the core Tk library, it should be accessible from Tkinter as well. Tile has a nice notebook widget. See http://tktable.sourcefor

Re: PY shutil on win xp home version

2007-04-18 Thread Tim Golden
jim-on-linux wrote: > python help, > > A client is using win xp home. > > my program contains; >shutil.copyfile(n, 'prn') > > This runs fine on win xp pro but they are getting > the following traceback. > > File "LOP_PRT_10.pyc", line 170, in __init__ > File "LOP_PRT_10.pyc", line 188,

Re: unicode data - accessing codepoints > FFFF on narrow python builts

2007-04-18 Thread vbr
Hi, thanks for your answer, I'll try to check the source of unicodedata; Using the wide Unicode build seems to be a kind of overkill for now, as for the vast majority of my uses, the BMP is enough. I was rather looking for some "lower-cost" alternatives for those rare cases, when I need higher mu

Re: Future Python Gui?

2007-04-18 Thread kirkjobsluder
On Apr 18, 11:24 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I'd say that the best bet is to learn swig and similar > > bridging, expanding, and embedding mechanisms. > > Python GUI programming is likely to involve either > > python hooking into frameworks like Cocoa, Qt, or > > wxWidget

tkinter canvas

2007-04-18 Thread Gigs_
how to write text on canvas. i know that i need to use canvas.create_text, but how to write text than when i create_text? or how to access object ID in canvas and change some options? thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list

Re: Martel Package from Biopython

2007-04-18 Thread Paul McGuire
On Apr 18, 12:28 pm, elventear <[EMAIL PROTECTED]> wrote: > Hello, > > I know this is not the best place to ask this but I haven't had luck > in the Biopython forums with my questions, so I'll just try here. > > I want to use the Martel package to do some parsing. I've found it to > be very powerfu

Re: image sequence to Quicktime movie

2007-04-18 Thread half . italian
I haven't experimented with it myself, but you'll probably find what you need here. (Only works on original mac python distribution) [sean:~] sean% python Python 2.3.5 (#1, Aug 12 2006, 00:08:11) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "licens

Re: Help Understanding mx.ODBC Error

2007-04-18 Thread Steve Holden
Greg Corradini wrote: [actually, her wrote it here but I moved it to the bottom] > Steve Holden wrote: >> Greg Corradini wrote: >>> Hello All, >>> A few weeks ago, I wrote two scripts using mx.ODBC on an Access DB. Among >>> other things, both scripts create new tables, perform a query and then >>>

Re: Python crash after using weave inline

2007-04-18 Thread Soren
On Apr 18, 10:07 pm, Peter Wang <[EMAIL PROTECTED]> wrote: > Soren, > > For future reference, you might want to direct weave-related questions > to the [EMAIL PROTECTED] mailing list. > > > def cartPolFast(xlen, ylen, x_c, y_c): > > > res = zeros((xlen,ylen)) > > > code = """ > > { > >

Re: Future Python Gui?

2007-04-18 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: >> Tile is available right now in Tk as an extension package, and a Tkinter >> wrapper for it can be found here: >> >> http://tkinter.unpythonic.net/wiki/TileWrapper > > That site seems to be down (500 Internal Server Error). > > >> Tile will be integrated into Tk's core

Re: Future Python Gui?

2007-04-18 Thread Stef Mientki
> The rumours on "problems installing GUI toolkits" are greatly exagerated Not at all !! As an experienced computer user, I yesterday installed a well known Python package on a clean winXP machine, and it costed me be about 1.5 .. 2 hours !! There are always unexpected situations, I think softwa

Re: Python crash after using weave inline

2007-04-18 Thread Peter Wang
Soren, For future reference, you might want to direct weave-related questions to the [EMAIL PROTECTED] mailing list. > def cartPolFast(xlen, ylen, x_c, y_c): > > res = zeros((xlen,ylen)) > > code = """ > { > int xlen, ylen, x_c, y_c; This line is unnecessary, because weave expose

Re: converting currency using locals

2007-04-18 Thread Grzegorz Ślusarek
Dnia Wed, 18 Apr 2007 19:38:26 +0100, Michael Hoffman napisał(a): > Grzegorz Ślusarek wrote: >> Hi all. I have situation that I have value that holds price and I must show >> this price using national specification(e.g. thousands_sep). Any idea how >> this can be done under python 2.4.4? I saw tha

Re: Future Python Gui?

2007-04-18 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): > If this were just a tool for me, it wouldn't matter. My concern is > distribution. If anybody who wants to run my software then they also > have to go through all the trouble to install these extensions, none > of which seem to have decent instructions. I'm an ol

Re: unicode data - accessing codepoints > FFFF on narrow python builts

2007-04-18 Thread vbr
Hi, thanks for the answer, > From: Gabriel Genellina <[EMAIL PROTECTED]> > Subj: Re: unicode data - accessing codepoints > on narrow python builts > Datum: 18.4.2007 21:33:11 > > > py> x=u"\N{GOTHIC LETTER AHSA}" > py> ord(x) > Traceback (most recent

python-list@python.org

2007-04-18 Thread attn . steven . kuo
On Apr 18, 12:23 pm, Anton Vredegoor <[EMAIL PROTECTED]> wrote: (snipped) > But still, the 'while True:' loop and the 'try-except' clause and the > explicit StopIteration are not necessary ... > > from collections import deque > > def xsplitter(seq, pred): > Q = deque(),deque() > it = i

PY shutil on win xp home version

2007-04-18 Thread jim-on-linux
python help, A client is using win xp home. my program contains; shutil.copyfile(n, 'prn') This runs fine on win xp pro but they are getting the following traceback. File "LOP_PRT_10.pyc", line 170, in __init__   File "LOP_PRT_10.pyc", line 188, in Fprint1   File "shutil.pyc", line 47, in

Re: Help Understanding mx.ODBC Error

2007-04-18 Thread Greg Corradini
Steve, As always, thanks for your consistent help on matters big and small. I've managed to solve the problem, although I'm scared b/c the bug is still elusive. I dumped and deleted my seperate Access DBs, created new ones and tried running the scripts on old data (that these scripts were able to

Re: Future Python Gui?

2007-04-18 Thread hlubenow
[EMAIL PROTECTED] wrote: > If this were just a tool for me, it wouldn't matter. My concern is > distribution. If anybody who wants to run my software then they also > have to go through all the trouble to install these extensions, none > of which seem to have decent instructions. I'm an old-tim

Re: Compiling python from soruce vs RPM ?

2007-04-18 Thread hlubenow
howa wrote: > I have compiled python 2.5 from source > > i.e. > > ./configure > make > make install > > > but when i try to install another package require python, seems it > can't regonize python... > > e.g.. > > > /usr/bin/python is needed by xyz Does "/usr/bin/python" exist ? Why haven

Re: Nested dictionaries trouble

2007-04-18 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, IamIan wrote: > years = ["199%s" % x for x in range(0,10)] > years += ["200%s" % x for x in range(0,10)] > > I haven't had any luck doing this in one line though. Is it possible? In [48]: years = map(str, xrange(1999, 2011)) In [49]: years Out[49]: ['1999', '2000', '20

ANN: PNG image CAPTCHA with PNG canvas available (SkimpyGimpy)

2007-04-18 Thread aaronwmail-usenet
Announcing SkimpyGimpy Support for PNG image CAPTCHA generation and PNG canvases. You can now use SkimpyGimpy to generate CAPTCHA text representations as PNG image files in addition to preformatted text ASCII art, and WAVE format audio streams, either from command lines or within Python programs.

Re: scipy 0.52 det crashes python

2007-04-18 Thread Peter Maas
Robert Kern schrieb: > Most likely your build of scipy was built with an ATLAS library that uses SSE2 > instructions (IIRC) while your processor doesn't support those instructions. > The > solution is to rebuild scipy with an ATLAS library built for your platform. Thanks, Robert. -- Peter Maas,

Re: unicode data - accessing codepoints > FFFF on narrow python builts

2007-04-18 Thread Martin v. Löwis
> Is it a bug in unicodedata, or is this the expected behaviour on a > narrow build? It's a bug. It should either raise an exception, or return the correct result. If you know feel like submitting a bug report: please try to come up with a patch instead. > Another problem I have is to access the

Re: Nested dictionaries trouble

2007-04-18 Thread Steven W. Orr
On Wednesday, Apr 18th 2007 at 12:16 -0700, quoth IamIan: =>I am using the suggested approach to make a years list: => =>years = ["199%s" % x for x in range(0,10)] =>years += ["200%s" % x for x in range(0,10)] => =>I haven't had any luck doing this in one line though. Is it possible? I'm so green

Re: unicode data - accessing codepoints > FFFF on narrow python builts

2007-04-18 Thread Gabriel Genellina
En Wed, 18 Apr 2007 06:37:56 -0300, <[EMAIL PROTECTED]> escribió: > Hi all, > I'd like to ask about the usage of unicode data on a narrow python build. > Unicode string literals \N{name} work even without the (explicit) import > of unicodedata and it correctly handles also the "wider" unicodes

Re: subprocess "handle is invalid" error

2007-04-18 Thread Grant Edwards
On 2007-04-18, Thomas Heller <[EMAIL PROTECTED]> wrote: > I think this is a subprocess bug. It is often attributed to > py2exe because usually developers do never run the script in > pythonW.exe instead of python.exe, and later build a *windows* > program with py2exe (the *windows* program has no

python-list@python.org

2007-04-18 Thread Anton Vredegoor
[EMAIL PROTECTED] wrote: > > If you don't wish to use objects, you can replace them with > a closure: > > import collections > > def xsplitter(iseq, pred): > queue = [ collections.deque(), collections.deque() ] > def it(parity): > while True: > if queue[parity]: >

  1   2   3   >