RE: Very dumb question

2005-10-12 Thread David Stockwell
Indeed,Are you writing a new book?

http://www.amazon.com/exec/obidos/ASIN/1563052857/wildwierdmathpro


David
---
Surf a wave to the future with a free tracfone 
http://cellphone.duneram.com/index.html




>From: Laszlo Zsolt Nagy <[EMAIL PROTECTED]>
>To: python-list@python.org
>Subject: Very dumb question
>Date: Wed, 12 Oct 2005 15:39:29 +0200
>I have a program with this code fragment:
>
> print len(data)
> print data[:50]
> raise SystemExit
>
>This prints:
>
>20381
>
>But if I change 50 to 51
>
> print len(data)
> print data[:51]
> raise SystemExit
>
>then it prints
>
>20381
>  !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
>
>After all, only the last 50 bytes are printed. The string is the same
>(length 20381) in both cases.
>Surprisingly, I can print more than 50 characters, this works:
>
>print "012345678901234567890123456789012345678901234567890123456789A"
>
>I'm sure it is my mistake, but I don't know what am I doing wrong. Do
>you have an idea?
>Thanks,
>
>Les
>
>--
>http://mail.python.org/mailman/listinfo/python-list


-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Help with win32 com_error exception

2007-06-02 Thread David Stockwell

Hi Rich,

I've seen errors like this before.  first off it will help you better if you 
represent your error in hex.  Doing so yields this


80020009   <==> -2147352567

0x 0x80020009


Anyways, its probably the result of something not being either 
registered/installed correctly (COM issue) or something else.


Under COM I believe thats a standard issue just telling you that something 
unexpected occurred.  I'd take a look at http://msdn.microsoft.com.


Good Luck

David Stockwell
Lanham, MD



From: "Richard Gordon" <[EMAIL PROTECTED]>
To: python-list@python.org
Subject: Help with win32 com_error exception
Date: Sat, 02 Jun 2007 20:28:56 GMT
MIME-Version: 1.0
Received: from smtp-vbr6.xs4all.nl ([194.109.24.26]) by 
bay0-mc10-f17.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 
2 Jun 2007 13:31:22 -0700
Received: from bag.python.org (bag.python.org [194.109.207.14])by 
smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id l52KVLxg031447for 
<[EMAIL PROTECTED]>; Sat, 2 Jun 2007 22:31:21 +0200 
(CEST)(envelope-from [EMAIL PROTECTED])
Received: from bag.python.org (bag [127.0.0.1])by bag.python.org (Postfix) 
with ESMTP id 6421A1E4012for <[EMAIL PROTECTED]>; Sat,  2 Jun 2007 
22:31:21 +0200 (CEST)
X-Message-Info: 
oG9qAjD2BNEKOO/ojloMHZY07EZB5Us4bOLWVGLHXVIL+amzV6Z4QzwmLaq+zJlt
Path: 
news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!xs4all!transit1.news.tiscali.nl!tiscali!newsfeed1.ip.tiscali.net!news.tiscali.de!newsfeed.freenet.de!newspeer1.nwr.nac.net!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc08.POSTED!0775c1e7!not-for-mail

Newsgroups: comp.lang.python
Lines: 47
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 70.17.187.153
X-Complaints-To: [EMAIL PROTECTED]
X-Trace: trnddc08 1180816136 70.17.187.153 (Sat, 02 Jun 2007 16:28:56 EDT)
NNTP-Posting-Date: Sat, 02 Jun 2007 16:28:56 EDT
Xref: news.xs4all.nl comp.lang.python:497807
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: General discussion list for the Python programming 
language
List-Unsubscribe: 
<http://mail.python.org/mailman/listinfo/python-list>,<mailto:[EMAIL PROTECTED]>

List-Archive: <http://mail.python.org/pipermail/python-list>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Subscribe: 
<http://mail.python.org/mailman/listinfo/python-list>,<mailto:[EMAIL PROTECTED]>

Errors-To: [EMAIL PROTECTED]
X-Virus-Scanned: by XS4ALL Virus Scanner
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 02 Jun 2007 20:31:22.0646 (UTC) 
FILETIME=[FBF71B60:01C7A554]


Sorry if this is sent twice, but I didn't see it get posted the first time.

I've got a fatal bug using Parente's pyTTS with Python 2.3 on Windoze 32
using MS SAPI 5.1 and Hammond's win32 module. The test program is
  import pyTTS
  tts = pyTTS.Create()
  tts.Speak('Hello world.')

The resulting debug trace is:

  PythonWin 2.3.5 (#62, Feb  8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)]
on win32.
  Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' 
for

further copyright information.
  Traceback (most recent call last):
File
"C:\PROGRA~1\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
line 307, in RunScript
  debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File
"C:\PROGRA~1\Python23\Lib\site-packages\pythonwin\pywin\debugger\__init__.py",
line 60, in run
  _GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File
"C:\PROGRA~1\Python23\Lib\site-packages\pythonwin\pywin\debugger\debugger.py",
line 631, in run
  exec cmd in globals, locals
File "C:\yakitome\test\examples\ex1.py", line 4, in ?
  tts.Speak('Hello world.')
File "C:\PROGRA~1\Python23\Lib\site-packages\pyTTS\sapi.py", line 213,
in Speak
  self.speech.Speak(text, flagsum)
File "C:\Program
Files\Python23\lib\site-packages\win32com\gen_py\C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x0.py",
line 2637, in Speak
  , Flags)
  com_error: (-2147352567, 'Exception occurred.', (0, None, None, None,
0, -2147201015), None)
  >>>

The system does not have a sound card --- could that be an issue?

My head is about to explode trying to solve this problem, so your help and
suggestions will be much appreciated.



--
http://mail.python.org/mailman/listinfo/python-list


_
Don’t miss your chance to WIN $10,000 and other great prizes from Microsoft 
Office Live http://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/


-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Strange behavior in Windows

2007-06-04 Thread David Stockwell wxp
my guess its your path.  I'm not familiar with IDLE but if you try getting 
the properties of IDLE, chances are its got the patch set up correctly.

in DOS you can try this to see what your path is:

echo "My path is %PATH%"

- Original Message - 
From: "Jakob Svavar Bjarnason" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, June 02, 2007 2:31 PM
Subject: Strange behavior in Windows




Greetings.

I have been trying to switch to Python from other languages such as Perl and 
now I have a newbie question.

I have been trying to run a setup script to install a python library. To do 
that I need to run "c:> python setup.py install" but the strange thing is is 
that when it runs the command:

>>> from distutils import log

I get the error ONLY while in cmd. If I run this from the interactive shell 
that comes with IDLE it works. But if I go into the interactive shell in the 
Windows shell cmd then I get:

ImportError: cannot import log

Any ideas on how I can fix this

Vinsamlega athugið að upplýsingar í tölvupósti þessum og viðhengi eru 
eingöngu ætlaðar þeim sem póstinum er beint til og gætu innihaldið 
upplýsingar sem eru trúnaðarmál. Sjá nánar: http://www.ru.is/trunadur

Please note that this e-mail and attachments are intended for the named 
addresses only and may contain information that is confidential and 
privileged. Further information: http://www.ru.is/trunadur


-- 
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list