Differences between revisions 27 and 66 (spanning 39 versions)
Revision 27 as of 2005-09-25 22:23:03
Size: 9611
Editor: ppp-70-229-36-76
Comment:
Revision 66 as of 2014-04-19 09:07:19
Size: 8619
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[lwickjr]] <<DateTime(2011-09-15T18:23:10Z)>>: I`ve just reviewed the site.py bug mentioned below, and it still exists in Python 3.1.2. Will someone please fix it?

[[lwickjr]] <<DateTime(2011-09-15T18:20:53Z)>>: Trivial edit to get the comment into the log. :)

Quote: "Editor: PaulBoddie Comment: Suspicious edit resembling spam. Apologies if casino stuff is now actually lwickjr's focus." Nope; you`re right. Thanks!

[[lwickjr]] <<DateTime(2010-09-06T19:25:09Z)>>: Gah! I`ve lost my edits TWICE now, once to not being logged in [I haven't been around so long that I forgot I had never logged in from this particular machine; it's newish], and once to failing to answer the question that I presume protects the site from unauthorized editing.

Trying a *third* time... Ok, that worked; re-entering the actual information...

Hmm, I note that the DateTime tags below failed to stamp the time when I last edited this page YEARS ago. Odd. I guess I didn't know how to use them then. ::shrug::

Having recently installed Python 2.7.0, I was browsing through the installation, specifically the `site` module [there wasn't a `usercustomize` module last time I checked, and the new mechinism was interesting; I had been keeping my personal code in the `site-packages` directory on my personal Windoze machine] when I noticed an error in the definition of the `addpackage` function.

To whit, if `addpackage` is ever called with `None` as the value of `known_paths` [which it never is], `addpackage` makes a totaly useless call to `_init_pathinfo` without saving the results, which I infer should be stored into `known_paths` [as is done in `addsitedir`], as `addpackage` will then go on to throw a `KeyError` exception by attempting to use the `None` value still in `known_paths` as a dictionary-type container. The indicated fix is to copy the `known_paths = _init_pathinfo()` line in `addsitedir` over the `_init_pathinfo()` line in `addpackage`. I also recommend that the `known_paths` argument be made to default to `None` as it does in `addsitedir`, and appears [from the body of the fuction] to have been intended.

As this bug was discovered through visual inspection and I am not registered at any of the usual Python development sites, would someone please verify this bug and bring it to the attention of the appropriate individuals and/or groups? Thanks!

Whew! Third time`s the charm, I hope! Also, each time brought forth a somewhat-improved version of the above text ['least I think so ;) ].
----

Attention, please: I am interested in the possibility of de-linting some of the documentation. How do I go about signing up?

FredDrake sez: See the [[http://www.python.org/dev/doc/|Documentation Development]] page.

[[lwickjr]] <<DateTime>>: Done, which I noted on your page some time ago. :) [I find myself wondering if anyone found the delinted pages.]

[[lwickjr]] <<DateTime>>: LionKimbro: "Parnassus". ;)
----
Line 7: Line 36:
This is the ID I use exclusively online, it is derived from my "RL" name, and it is the ID under which I recieve my e-mail. This is the ID I use exclusively online, it is derived from my "RL" name, and it is the ID under which I receive my e-mail.
Line 21: Line 50:
Further, I have found the documentation on distributing Python modules to be strong on the mechanicals of how to PACKAGE modules [somewhat over-kill, I think, for simple drop-in single-file modules], and nearly non-existant on how to PUBLISH them. Further, I have found the documentation on distributing Python modules to be strong on the mechanics of how to PACKAGE modules [somewhat over-kill, I think, for simple drop-in single-file modules], and nearly nonexistent on how to PUBLISH them.
Line 23: Line 52:
Could someone __please__ write a page on ["How to publish Python modules"] that is understandable by someone with significant *computer* experience but minimal *internet* experience? Could someone __please__ write a page on PublishingPythonModules that is understandable by someone with significant *computer* experience but minimal *Internet* experience?
Line 27: Line 56:
SkipMontanaro PublishingPythonModules SkipMontanaro [[/Modules| Some of my more publishable modules]] [[http://py.vaults.ca/apyllo.py|Vaults of Parnassus]]
Line 37: Line 66:
["lwickjr"]: Possibly. I've written a few useful-to-me modules that I think others might also find useful. I'd like to share them, but I am NOT on-line 24/7, and would like someone to host them for downloading. As for ["WikiName"]s, would LWickJr do? If so, how do I change it? [[lwickjr]]: Possibly. I've written a few useful-to-me modules that I think others might also find useful. I'd like to share them, but I am NOT on-line 24/7, and would like someone to host them for downloading. As for [[WikiName]]s, would LWickJr do? If so, how do I change it?
Line 41: Line 70:
["lwickjr"]: Don't have a passport. As for my "nick", the L is my first inital, the Wick is my family name, and the Jr is because I've got the same name as my father. Isn't this "real" enough? [[lwickjr]]: Don't have a passport. As for my "nick", the L is my first initial, the Wick is my family name, and the Jr is because I've got the same name as my father. Isn't this "real" enough?
Line 44: Line 73:
  Having read Wiki:RealNamesPlease, Wiki:RealNamesPleaseDiscussion, and Wiki:OneNamePlease, I choose to continue using ["lwickjr"] as my login name. It is a persistant on-line identity. It is directly related to my given name. It is the *only* ID I use online. I doubt that anyone here would like to call me "the Hungry Hacker", with which I sign all my e-mail.
Having read Wiki:RealNamesPlease, Wiki:RealNamesPleaseDiscussion, and Wiki:OneNamePlease, I choose to continue using [[lwickjr]] as my login name. It is a persistent on-line identity. It is directly related to my given name. It is the *only* ID I use online. I doubt that anyone here would like to call me "the Hungry Hacker", with which I sign all my e-mail.
Line 50: Line 80:
----
BTW, what do you think of the modules I describe [[/Modules| here]]?
Line 51: Line 83:
BTW, what do you think of the modules I describe below?
----

My more-interesting modules [by the way, how do I link to a Wiki page with text that doesn't match the destination page's name?] include "Alias", "Edit", and "UT". I'll add others to this page as I have opportunity [the machine I'm typing this on isn't my home system].

General outlines:

 * Alias
   * Provides a mechanism whereby arbitrary callables are *effectively* converted to commands in interactive Python, but not in modules. To do this, Alias splits off the first word of the command line, attempts to evaluate it, and iff it is callable, the tail of the command is also evaluated and passed to the callable as an argument tuple. This allows the manual use of "dir", "reload", et al, as statements without requiring that parentheses be typed. Parentheses are still required in module source, however, and in any function calls in the tail of the command line.
   * Provides a mechanism whereby arbitrary one-word names may be assigned to callable objects for use with the preceding mechanism. This allows one to dispense with the requirement to type fully-qualified long.nested.module.names for selected callables, and is where the module gets its name.
   * Provides a mechanism for allowing modules to be imported through a bare reference to the module name.
   * Provides a mechanism whereby modules imported by the preceding mechanism may auto-register aliases of their own choosing. Entering the name of a module that has already been imported does not re-import the module; rather it re-updates whatever auto-alias associations might exist in that module at the time the name is re-entered.
   * Provides its own list of aliases, available via the preceding mechanism, for managing the alias dictionary.
   * Does not function under IDLE without disabling the default sub-process. Probably does not function correctly, or even at all, without IDLE.
 * Edit
   * Provides an Alias that attempts to open for editing the source for the module where the argument was defined, positioned, if possible, on the line where the definition starts.
   * Provides a mechanism for recording the current size and position of the active IDLE window such that subsequent attempts to open the window open it with the remembered geometry.
   * Provides an IDLE menu item to trigger the preceding mechanism.
   * Functions only under IDLE. Does not function correctly without disabling the default sub-process.
 * UT
   * Provides several "utility" functions that I've found useful:
   * A "smart" reload substitute that can automatically re-load other modules in dependancy-order, if the module being reloaded registers its dependancies.
   * A convenience wrapper for cPickle that allows [un-]pickling single objects from/to a specified file with a single function call.
   * Others that I don't recall at the moment.
----

I have a hard time understanding what the modules are for; There's a lot of focus on ''how'' these things work, but I have difficulty figuring out what they are for.

It seems to me that Edit is something that makes it so that you can jump straight to where a variable is defined, in IDLE. (Not really sure.) If so, that's awesome! I've often times wished IDLE were more powerful; This is the kind of thing I'd like to see more of. :)

As for publishing modules, it seems to me that we in the Python community are not yet [http://rubyforge.org/softwaremap/trove_list.php as organized as the Ruby community.]
As for publishing modules, it seems to me that we in the Python community are not yet [[http://rubyforge.org/softwaremap/trove_list.php|as organized as the Ruby community.]]
Line 87: Line 89:
-- LionKimbro [[DateTime(2005-04-01T21:16:29Z)]] -- LionKimbro <<DateTime(2005-04-01T21:16:29Z)>>
Line 89: Line 91:
["lwickjr"]: Um, sorry about that. The descriptions are heavy on *what* the modules do, but totally void of either of how they work or why one would want to use them. [[lwickjr]]: Um, sorry about that. The descriptions are heavy on *what* the modules do, but totally void of either of how they work or why one would want to use them.
Line 91: Line 93:
Alias is a convenience module for I.D.L.E. PyShell usage, intended to save typing.

UT is a convenience module for miscelaneous support functions that I`ve found useful.

As for Edit, you have the right idea, but variables are too simple for Edit to deal with. When you type "edit thing", "thing" *MUST* evaluate to an object for which one of the standard modules, "inspect", I believe, is capable of locating the information required to open the source module. For the module to open for editing at the line where the object is defined, it is required for perfect positioning that inspect be capable of determining the line number. In the absence of reliable information, Edit makes an educated guess, and positions the editor there. When the educated guess fails, the editor is positioned wherever I.D.L.E. would have positioned it had you opened the file for editing via another method. Basically, Edit is given a class, instance, module, etc., and attempts to display the Python source for the definition. Edit will work, however, for anything that Inspect can retrieve the required information from. Edit also provides a hook for invoking custom editors in place of I.D.L.E.`s built-in editor. This would be useful, for example, for having edit invoke a G.U.I. editor instead when invoked on objects created by the G.U.I. editor.

As for that WIKIPage you mention, ["How to publish Python modules"], I created it in hopes that someone would populate it with useful information. I'm thinking of doing just that. Ok, people, just how big is "small enough"? Does Edit interest you? Don't forget: it *does* require that the default subprocess be turned off, as it REQUIRES interaction between the user dataspace and the I.D.L.E. dataspace, and I don`t [currently] know how to use the IPC [Inter-Process Communication] that I.D.L.E. uses for the purpose. Alias has the same requirement, and for the same reason.
As for that WIKIPage you mention, [[PublishingPythonModules| How to publish Python modules]], I created it in hopes that someone would populate it with useful information. I'm thinking of doing just that. Ok, people, just how big is "small enough"?
Line 101: Line 97:
["lwickjr"]: Yes; I've seen that. [[lwickjr]]: Yes; I've seen that.

[[lwickjr]]: Please note: "[[PublishingPythonModules| How to publish Python modules]]" has been superceeded by PublishingPythonModules.

I'm uploading some of my more publishable modules as attachments to [[/Modules| this page]]. "Alias" is in [[attachment:lwickjr/Modules/Alias.py|lwickjr/Modules:Alias.py]], "Edit" is in [[attachment:lwickjr/Modules/Edit.py|lwickjr/Modules:Edit.py]], and "UT" is in [[attachment:lwickjr/Modules/UT.py|lwickjr/Modules:UT.py]] - I *hope* they're not to big.

Does Edit interest you? Don't forget: it *does* require that the default subprocess be turned off, as it REQUIRES interaction between the user dataspace and the I.D.L.E. dataspace, and I don`t [currently] know how to use the IPC [Inter-Process Communication] that I.D.L.E. uses for the purpose. Alias has the same requirement, and for the same reason.

----
CategoryHomepage

lwickjr 2011-09-15 18:23:10: I`ve just reviewed the site.py bug mentioned below, and it still exists in Python 3.1.2. Will someone please fix it?

lwickjr 2011-09-15 18:20:53: Trivial edit to get the comment into the log. :)

Quote: "Editor: PaulBoddie Comment: Suspicious edit resembling spam. Apologies if casino stuff is now actually lwickjr's focus." Nope; you`re right. Thanks!

lwickjr 2010-09-06 19:25:09: Gah! I`ve lost my edits TWICE now, once to not being logged in [I haven't been around so long that I forgot I had never logged in from this particular machine; it's newish], and once to failing to answer the question that I presume protects the site from unauthorized editing.

Trying a *third* time... Ok, that worked; re-entering the actual information...

Hmm, I note that the DateTime tags below failed to stamp the time when I last edited this page YEARS ago. Odd. I guess I didn't know how to use them then. ::shrug::

Having recently installed Python 2.7.0, I was browsing through the installation, specifically the site module [there wasn't a usercustomize module last time I checked, and the new mechinism was interesting; I had been keeping my personal code in the site-packages directory on my personal Windoze machine] when I noticed an error in the definition of the addpackage function.

To whit, if addpackage is ever called with None as the value of known_paths [which it never is], addpackage makes a totaly useless call to _init_pathinfo without saving the results, which I infer should be stored into known_paths [as is done in addsitedir], as addpackage will then go on to throw a KeyError exception by attempting to use the None value still in known_paths as a dictionary-type container. The indicated fix is to copy the known_paths = _init_pathinfo() line in addsitedir over the _init_pathinfo() line in addpackage. I also recommend that the known_paths argument be made to default to None as it does in addsitedir, and appears [from the body of the fuction] to have been intended.

As this bug was discovered through visual inspection and I am not registered at any of the usual Python development sites, would someone please verify this bug and bring it to the attention of the appropriate individuals and/or groups? Thanks!

Whew! Third time`s the charm, I hope! Also, each time brought forth a somewhat-improved version of the above text ['least I think so ;) ].


Attention, please: I am interested in the possibility of de-linting some of the documentation. How do I go about signing up?

FredDrake sez: See the Documentation Development page.

lwickjr 2024-04-27 18:08:58: Done, which I noted on your page some time ago. :) [I find myself wondering if anyone found the delinted pages.]

lwickjr 2024-04-27 18:08:58: LionKimbro: "Parnassus". ;)


Welcome to my page.


After reading RealNamesPlease, RealNamesPleaseDiscussion, and OneNamePlease,

I respectfully decline to change my login ID.

This is the ID I use exclusively online, it is derived from my "RL" name, and it is the ID under which I receive my e-mail.

In accordance with OneNamePlease and RealNamesPleaseDiscussion, I conclude that while "lwickjr" is not "exactly" in accordance with RealNamesPlease, it IS "close enough".

Please, no flames; no offense intended.


If anyone with GOOD American-English spelling skills would care to proofread this page and correct any spelling errors that I can't find, feel free. I've been adding known-correctly-spelled words to the online spelling checker, but I'm a tad unsure of a few of my spellings.


I have a few questions that I've been unable to find answer for.

All the documentation I've seen seems to assume that someone wanting to publish Python modules has -- and knows how to use -- a 24/7 file server available to use.

This is not always the case.

Further, I have found the documentation on distributing Python modules to be strong on the mechanics of how to PACKAGE modules [somewhat over-kill, I think, for simple drop-in single-file modules], and nearly nonexistent on how to PUBLISH them.

Could someone please write a page on PublishingPythonModules that is understandable by someone with significant *computer* experience but minimal *Internet* experience?

PublishingPythonModules SkipMontanaro Some of my more publishable modules Vaults of Parnassus


Hi lwick, before I answer some of your questions, I'd like you to consider RealNamesPlease. It is one of our WikiGuidelines, and it has worked well for us so far.

I'm not completely sure what you mean by publishing Python modules. If you need a space to upload your Python modules, you might want to consider StarshipPython. It used to be free for PSA members, but the PSA has ceased to exist, so I guess a small donation to the PythonSoftwareFoundation will do now. Would that solve your problem?

-- JohannesGijsbers

lwickjr: Possibly. I've written a few useful-to-me modules that I think others might also find useful. I'd like to share them, but I am NOT on-line 24/7, and would like someone to host them for downloading. As for WikiNames, would LWickJr do? If so, how do I change it?

With a real name I meant the one in your passport, not capitalizing your nick into a WikiName. Changing it is easy: just create the new page and cut all content from this page into it. Then delete this page and log in using your new name. -- JohannesGijsbers

lwickjr: Don't have a passport. As for my "nick", the L is my first initial, the Wick is my family name, and the Jr is because I've got the same name as my father. Isn't this "real" enough?

  • /--- later the same day ---
    • Having read RealNamesPlease, RealNamesPleaseDiscussion, and OneNamePlease, I choose to continue using lwickjr as my login name. It is a persistent on-line identity. It is directly related to my given name. It is the *only* ID I use online. I doubt that anyone here would like to call me "the Hungry Hacker", with which I sign all my e-mail. Having stated my position, I simply shall ignore the issue and contribute as best I can. After all, isn't that why we're here? No offense taken; none intended.

    \---


BTW, what do you think of the modules I describe here?

As for publishing modules, it seems to me that we in the Python community are not yet as organized as the Ruby community.

For the most part, people set up their own website, maybe something on SourceForge, get a listing on PyPi or the vaults (of what-I-cant-spell,) and mention it on the python-announce usenet forum.

It would be a good subject for a new wiki page. I think there's already one that's started somewhere, that it would be worthwhile to revisit.

-- LionKimbro 2005-04-01 21:16:29

lwickjr: Um, sorry about that. The descriptions are heavy on *what* the modules do, but totally void of either of how they work or why one would want to use them.

As for that WIKIPage you mention, How to publish Python modules, I created it in hopes that someone would populate it with useful information. I'm thinking of doing just that. Ok, people, just how big is "small enough"?

Sombody else (Who?): You`re right, it *is* worth revisiting, in case someone _has_ done just that. Someone suggested that small modules can be posted here.

lwickjr: Yes; I've seen that.

lwickjr: Please note: "How to publish Python modules" has been superceeded by PublishingPythonModules.

I'm uploading some of my more publishable modules as attachments to this page. "Alias" is in lwickjr/Modules:Alias.py, "Edit" is in lwickjr/Modules:Edit.py, and "UT" is in lwickjr/Modules:UT.py - I *hope* they're not to big.

Does Edit interest you? Don't forget: it *does* require that the default subprocess be turned off, as it REQUIRES interaction between the user dataspace and the I.D.L.E. dataspace, and I don`t [currently] know how to use the IPC [Inter-Process Communication] that I.D.L.E. uses for the purpose. Alias has the same requirement, and for the same reason.


CategoryHomepage

lwickjr (last edited 2014-04-19 09:07:19 by DaleAthanasias)

Unable to edit the page? See the FrontPage for instructions.