Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'importing': 0.04; 'subject:Python': 0.05; 'attribute': 0.05; 'subject:trying': 0.09; '"test"': 0.16; 'subject:embed': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'feb': 0.19; 'module': 0.19; 'errors': 0.23; 'header:In- Reply-To:1': 0.25; 'am,': 0.27; 'guess': 0.27; 'library.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; 'function': 0.30; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'test': 0.36; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'your': 0.60; '2013': 0.84; 'confusion.': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=ZN4D2OULDSyQglfTz3RpzkyN16UXjYech1uOdC0fvbk=; b=pGJ12xErdJo/8GRRC96/7cB9DJ9i8p2zXWosD6PtdzBptABvaFZi6JwawhrMgxUb7m WDtKCj6a27nK1hoybLKZTxpveqTWgf5RaVVuHJJ9SWZQO+3cj8adXIEmfCTT0WCm6d+Q SJBe3Qtv4ScqM8HUA7Nz8XrmHJRlPiMqM/zz0RYzp0QJ+vH/G8QG1Tb62hyIrPMs+QiX 1//B6W4ARN9H4EoVEApDYsYwhUYGO7aLGRE0m7pwV/CoSPgF64DfBrED5imeX9U1Sh2o SjKIWczDOOlHEcVsE8JzA5wcBXpzwVHYejgUFHap0i6bS1DISKL1itqlpEDyMHyd4N9K KVBQ== X-Received: by 10.220.239.71 with SMTP id kv7mr597303vcb.46.1361957225449; Wed, 27 Feb 2013 01:27:05 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Wed, 27 Feb 2013 02:26:25 -0700 Subject: Re: Python newbie trying to embed in C++ To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361957234 news.xs4all.nl 6904 [2001:888:2000:d::a6]:37657 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40041 On Wed, Feb 27, 2013 at 1:51 AM, Marwan wrote: > When I run the generated exe, I get errors about the functions not > existing... > > TestPython.exe test Hello > AttributeError: 'module' object has no attribute 'Hello' > Cannot find function "Hello" "test" is the name of a module in the standard library. My guess would be that for some reason it's importing that module rather than your test.py. Make sure that test.py can be found on your sys.path, and perhaps change the name of your module to reduce confusion.