Reusable (local) Modules

Discussion in 'Python' started by Travis Griggs, Sep 7, 2012.

  1. I'm relatively new to Python (coming from strong C and Smalltalk backgrounds). I've written a couple of relatively small apps (one or two ..py files). I'm using PyCharm (I love it).

    I'm curious what the pythonic approach is to creating your own reusable modules. Any tutorials or high level explanations, or detailed, much appreciated.

    For example, I have a small module called valvenumbers.py. It's a family of functions that we use to do a variety of things with the serial numbers we attach to some of our products. Now I'm making a little desktop app using wxpython, and I want to use (import) that module. Using PyCharm, I have two separate projects in sibling directories. And there's another separate command line tool that wants to do the same. Currently, I just place a symlink to the valvenumbers.py, local to the directory of these apps. This seems like "the quickest thing that could possibly work", but I'm assuming there's a more pythonic way to approach this general problem.

    TIA!

    Travis Griggs
    "Simplicity is the ultimate sophistication." -- Leonardo Da Vinci
     
    Travis Griggs, Sep 7, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nikki
    Replies:
    3
    Views:
    650
    Nikki
    Jul 2, 2003
  2. Richard K Bethell

    datagrid as reusable datasource?

    Richard K Bethell, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    441
    Jacob Yang [MSFT]
    Dec 1, 2003
  3. Danny

    Reusable functions

    Danny, Jan 15, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    723
    Danny
    Jan 15, 2004
  4. Bijoy Naick

    Reusable Components

    Bijoy Naick, Nov 9, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    556
    Steve C. Orr [MVP, MCSD]
    Nov 11, 2004
  5. Amil
    Replies:
    0
    Views:
    447
  6. TB
    Replies:
    12
    Views:
    1,047
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Oct 27, 2005
  7. =?Utf-8?B?R3VlbnRlcg==?=

    Reusable UserControl Library in ASP.NET 2.0 RC1

    =?Utf-8?B?R3VlbnRlcg==?=, Oct 19, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    2,876
    skwirelmunkee
    Jul 26, 2006
  8. Replies:
    2
    Views:
    387
Loading...