473,513 Members | 3,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

a module.pth question

My py24 is installed in h:\python24
I installed pyglet(http://pyglet.org/) in
H:\pure_pylib\Multimedia\pyglet-1.0\, if I do
Expand|Select|Wrap|Line Numbers
  1.         
  2.                         
  3.                         
  4.                 >>import sys
  5. sys.path.append(r'H:\pure_pylib\Multimedia\pyglet-1.0')
  6. import pyglet
  7.  
  8.  
it is ok.

but if I created h:\pure_pylib\pyglet.pth file, which containts
Expand|Select|Wrap|Line Numbers
  1. Multimedia\pyglet-1.0
  2.  
then
Expand|Select|Wrap|Line Numbers
  1.         
  2.                         
  3.                         
  4.                 >>import sys
  5. sys.path.append(r'h:\pure_pylib')
  6. import pyglet
  7.  
  8. Traceback (most recent call last):
  9. File "<stdin>", line 1, in ?
  10. ImportError: No module named pyglet
  11.         
  12.                         
  13.                         
  14.                 >>>
  15.  
  16.  
what is wrong with it? and How to fix it? thanks in advance
Jul 14 '08 #1
1 1147
On Jul 14, 6:26*am, oyster <lepto.pyt...@gmail.comwrote:
My py24 is installed in h:\python24
I installed pyglet(http://pyglet.org/) in
H:\pure_pylib\Multimedia\pyglet-1.0\, if I do
Expand|Select|Wrap|Line Numbers
  1. >>import sys
  2.         
  3.                         
  4.                 >sys.path.append(r'H:\pure_pylib\Multimedia\pyglet-1.0')
  5. import pyglet
  •  
  •  
  • it is ok.

    but if I created h:\pure_pylib\pyglet.pth file, which containts
    Expand|Select|Wrap|Line Numbers
    1. Multimedia\pyglet-1.0
    2.  

    then
    Expand|Select|Wrap|Line Numbers
    1. >>import sys
    2.         
    3.                         
    4.                 >sys.path.append(r'h:\pure_pylib')
    5. import pyglet
    6.  
    7. Traceback (most recent call last):
    8. * File "<stdin>", line 1, in ?
    9. ImportError: No module named pyglet
    10.  

    what is wrong with it? and How to fix it? thanks in advance I looked in my easy_install.pth and it looks like it should be:

    .\Multimedia\pyglet-1.0

    But I don't really see any reason not to do it the way you were
    earlier with the full path name. Besides, you should be able to
    install pyglet to your site-packages folder. Or you could use buildout
    if you're just testing modules and you don't want to screw up your
    namespace.

    Mike
    Jul 14 '08 #2

    This thread has been closed and replies have been disabled. Please start a new discussion.

    Similar topics

    7
    4310
    by: N.K | last post by:
    Hi , Python's existing cookie module doesnt supports new cookie headers SetCookie2 , How to submit a patch for that ? I tried emailing person who owns that module.But no response. Thanks, Nirmal
    0
    1309
    by: mg | last post by:
    Hi everybody... I am using Python API in order to create bindings. So, in the init function of my module, I create constants : PyMODINIT_FUNC initMyModule( void ) { PyObject* module = Py_InitModule3( "MyModule", 0, "this is my module" ) ; if( ! module ) return ;
    10
    5471
    by: Bonzol | last post by:
    vb.net Hey there, could someone just tell me what the differnce is between classes and modules and when each one would be used compared to the other? Any help would be great Thanx in advance
    9
    2331
    by: Rudy | last post by:
    Hello All! I'm a little confused on Public Class or Modules. Say I have a this on form "A" Public Sub Subtract() Dim Invoice As Decimal Dim Wage As Decimal Static PO As Decimal Invoice = CDec(txbInv.Text) Wage = CDec(txbTotWage.Text)
    6
    4004
    by: JonathanOrlev | last post by:
    Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new types of objects (classes) can only be defined in Class modules.
    0
    25483
    ADezii
    by: ADezii | last post by:
    The motivation for this Tip was a question asked by one of our Resident Experts, FishVal. The question was: How to Declare Default Method/Property in a Class Module? My response to the question was inadequate to say the least, but I was determined to come up with the correct answer, especially since my primary background is Visual Basic, and I...
    4
    1650
    by: Peter J. Bismuti | last post by:
    I'm having trouble understanding how namespaces work in modules. I want to execute a module within the interpreter and then have values that are calculated persist so that other modules that get executed can retrieve them. For example, consider the two simple modules below. The first method fails and I'm not sure exactly why. (Note: ...
    3
    1428
    by: james | last post by:
    Hi all, I did some quick searching but I haven't found anything like I want. It probably has to do with the terms I am searching for so if I describe what I want then I hope someone can point me to a good module. I want to take input from the user at the command line. e.g.) Would you like to continue : y What is your favorite color:...
    22
    2554
    by: ben mitch | last post by:
    Hi I hope you'll see this cross-post (c/c++) as appropriate. I also admit immediately that the question *may* turn out to be compiler-/os-specific, in which case I apologize. But I wonder if there's an underlying truth. We are writing a (cross-platform) 'framework' application (in C++, as it happens) that allows users to author 'plugins'...
    2
    1830
    by: Joe Strout | last post by:
    Some corrections, to highlight the depth of my confusion... On Nov 11, 2008, at 9:10 PM, Joe Strout wrote: Actually, it does not. And no, it isn't; it's the NAME of the module the function is in. I'm not sure what good that does me. docstring.testmod does take an
    0
    7178
    by: Hystou | last post by:
    Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
    0
    7397
    Oralloy
    by: Oralloy | last post by:
    Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
    0
    7563
    jinu1996
    by: jinu1996 | last post by:
    In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
    1
    7125
    by: Hystou | last post by:
    Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
    0
    7543
    tracyyun
    by: tracyyun | last post by:
    Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
    0
    3239
    by: adsilva | last post by:
    A Windows Forms form does not have the event Unload, like VB6. What one acts like?
    0
    1612
    by: 6302768590 | last post by:
    Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
    1
    813
    muto222
    by: muto222 | last post by:
    How can i add a mobile payment intergratation into php mysql website.
    0
    470
    bsmnconsultancy
    by: bsmnconsultancy | last post by:
    In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

    By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

    To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.