Re: Speaking Text

2008-03-19 Thread Bill Scherer
David C. Ullrich wrote: > Mac OS X has text-to-speech built into the interface. > So there must be a way to access that from the command > line as well - in fact the first thing I tried worked: > > os.system('say hello') > > says 'hello'. > > Is there something similar in Windows and/or Linux? > (I

Re: Break lines?

2008-02-26 Thread Bill Scherer
saneman wrote: > I have made this string: > > > TITLE = 'Efficiency of set operations: sort model, >(cphstl::set::insert(p,e)^n cphstl::set::insert(e)), integer' > > But I am not allowed to break the line like that: > > IndentationError: unexpected indent > > How do I break

Re: sentance containg the string or symbol Ω

2007-08-23 Thread Bill Scherer
yadin wrote: > how can i print a sentance containg the string or symbol Ω in python > and also lambda? > > >>> "Ω" '\xce\xa9' >>> print '\xce\xa9' Ω >>> ...works on my terminal anyway. -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzled by "is"

2007-08-09 Thread Bill Scherer
Dick Moores wrote: > >>> () is () > True > >>> (1,) is (1,) > False > > Why? > >>> a = () >>> b = () >>> c = (1,) >>> d = (1,) >>> a is b True >>> c is d False >>> id(a) 3086553132 >>> id(b) 3086553132 >>> id(c) 3086411340 >>> id(d) 3086390892 There is only one empty tuple. Does that clear

Re: This bit of code hangs Python Indefinitely

2007-08-08 Thread Bill Scherer
brad wrote: > url_queue = Queue.Queue(256) > for subnet in subnets: > url_queue.put(subnet) > > The problem is that I have 512 things to add to the queue, but my limit > is half that... whoops. Shouldn't the interpreter tell me that I'm an > idiot for trying to do this instead of just hangin

Re: Tabbed windows Support in Python

2007-06-27 Thread Bill Scherer
senthil arasu wrote: > Hi, > Currently iam implementing GUI Framework for supporting Tabbed > windows to render different HTML Pages. > A row of tabs facilitated for navigation of pages. > > Iam expecting some classes like "QTabWidget" whick provided by Qt > Libarary. > After starting my implem

Re: installing cx_Oracle.

2007-05-24 Thread Bill Scherer
Carl K wrote: > Getting closer, thanks Bill and Diez. > > $ export ORACLE_HOME > $ ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client > $ python setup.py build > $ sudo python setup.py install > > $ python -c "import cx_Oracle" > Traceback (most recent call last): >File "", line 1,

Re: installing cx_Oracle.

2007-05-24 Thread Bill Scherer
Bill Scherer wrote: > Carl K wrote: > >> I am trying to use this: >> http://python.net/crew/atuining/cx_Oracle/html/cx_Oracle.html >> it is a real module, right? >> >> > It is indeed. > >> sudo easy_install cx_Oracle did not easy_ins

Re: installing cx_Oracle.

2007-05-24 Thread Bill Scherer
Carl K wrote: > I am trying to use this: > http://python.net/crew/atuining/cx_Oracle/html/cx_Oracle.html > it is a real module, right? > It is indeed. > sudo easy_install cx_Oracle did not easy_install cx_Oracle. > > http://www.python.org/pypi/cx_Oracle/4.3.1 doesn't give me any clue. > > I got

Re: How do you escape % when formatting a string?

2007-04-02 Thread Bill Scherer
erikcw wrote: > Hi, > > I'm trying to format a string like so: > > string = "You have a 75% chance of success with %s, don't use %s" %(a, > b) > > This gives me: > TypeError: not enough arguments for format string > > I've tried 75\%, but that doesn't seem to help. What am I missing? > > Thanks! >

Re: electronics and python

2007-02-06 Thread Bill Scherer
lee wrote: >Hi guys.Is there any software written using python for >electronics.i mean any simulation software or something?? > > Here's 'something': http://home.tiscali.be/be052320/Unum.html I find it useful for basic electronics math (Ohm's law, filters, etc). It keeps track of the u

Re: Search Queue

2007-01-16 Thread Bill Scherer
abcd wrote: >I have a class such as... > >id = 0 >class Foo: >def __init__(self, data): >self.id = id >id += 1 >self.data = data > >And I am storing them in a Queue.Queue... > >import Queue >q = Queue.Queue() >q.put(Foo('blah')) >q.put(Foo('hello world')) >q.put(Foo('te

Re: Learning to program in Python

2007-01-05 Thread Bill Scherer
jbchua wrote: >Hello everybody. > >I am an Electrical Engineering major and have dabbled in several >languages such as Python, C, and Java in my spare time because of my >interest in programming. However, I have not done any practical >programming because I have no idea where to get started. I tau

Re: efficient text file search.

2006-09-11 Thread Bill Scherer
noro wrote: >Is there a more efficient method to find a string in a text file then: > >f=file('somefile') >for line in f: >if 'string' in line: > print 'FOUND' > >? > >BTW: >does "for line in f: " read a block of line to te memory or is it >simply calls f.readline() many times? > >than

Re: ImportError: libclntsh.so.10.1: cannot open shared object file: Permission denied

2006-07-20 Thread Bill Scherer
gmax2006 wrote: >Hi, > >I am using RedHat Linux 4. and I developed an oracle 10g based >application by using cx_Oracle (cx_Oracle-4.1-10g-py23-1.i386.rpm) and >Python 2.3.4. > >When I run the application through direct console connection, It works >perfect. > >But, when I schedule a crontab job to

Re: Python on RedHat AS 2.1?

2006-07-18 Thread Bill Scherer
Jeremy Winters wrote: > All the stuff I've found personally are security patches for python > 1.5.2... which seems to be baked into the OS. > > I don't choose to use this OS... it is mandated by our IT dept. I > have no complaints other than this... > > Is there nobody in pythonland who has ins

Re: Python password display

2006-07-06 Thread Bill Scherer
Johhny wrote: > Hello, > > I am currently writing some python code which requires the use of a > password. Currently I am using the raw_input function to take the users > input in and use it. One problem with that is the password is displayed > in clear text on the console of the server. I would l

Re: Oracle Data Access in Python

2006-05-31 Thread Bill Scherer
A.M wrote: > > "Bill Scherer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > A.M wrote: > > > >> Hi, > >> > >> > >> > >> I am familiar with Perl's DBI programming. > >> > >

Re: Oracle Data Access in Python

2006-05-31 Thread Bill Scherer
A.M wrote: > Hi, > > > > I am familiar with Perl's DBI programming. > > > > In Python, do we access to Oracle by using DBI? > No. > Is Oracle DBD driver included with Python distributions? > No. > What is the most common strategy for accessing to Oracle data through > Python? > cx_Oracle seems t

Re: forcing exceptions

2006-03-03 Thread Bill Scherer
Nikola Skoric wrote: > Is there a way to tell the interpreter to display exceptions, even those > which were captured with except? > I believe you are looking for "raise". For example: Try: some.code() except SomeError: do.whatever() raise - Bill -- http://mail.python.org/mailman/lis

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Bill Scherer
John Salerno wrote: >I use UltraEdit right now, and it is possible to convert spaces and tabs >back and forth, but it's just an extra step. I was thinking about trying >vim, as I've heard it's easier to learn than emacs. > > Absolutely. It's also easier to learn to ride a Huffy than a Schwinn,

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Bill Scherer
John Salerno wrote: > This is a real small point, but I'd like to hear what others do in this > case. It's more an 'administrative' type question than Python code > question, but it still involves a bit of syntax. > > One thing I like to do is use tabs for my indentation, because this > makes it e

Re: graph display(please help)

2006-02-22 Thread Bill Scherer
questions? wrote: > I heard from my friend who used to program in JAVA, it is really easy > to do graph display in JAVA. > > I wonder whether there are similiar packages in Python I can use. Since > I know a little bit Python syntax already, I can easily learn more in > Python. > > I want to disp

Re: Python Oracle Interace on Solaris

2006-02-20 Thread Bill Scherer
Kenny wrote: > Thanks... Im not sure if you would know how to solve this one, but when > I ran my setup python scripts I got the error: library -lclntsh not > found. In the instantclient folder the library exists... is this a > matter of just copying the libraries to a different spot or just > set

Re: Python Oracle Interace on Solaris

2006-02-17 Thread Bill Scherer
[EMAIL PROTECTED] wrote: > I am trying to use Python to do queries on a Oracle database using a > Solaris box. I have seen tools such as cx_Oracle which would be good > except that my Solaris box does not have an Oracle installation. Do I > need to have an Oracle installation on my Solaris box to

ANN: pyfuncgen

2006-02-06 Thread Bill Scherer
edit that for your particular hardware setup. I am also looking for some help from interested parties; see the NOTES file for more info. You can find it here:     http://pyfuncgen.sourceforge.net Thanks! Bill Scherer -- http://mail.python.org/mailman/listinfo/python-list