popen4 - get exit status

2012-08-27 Thread Tim Johnson
In bash I do the following: linus:journal tim$ /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl hiccup -bash: /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl: No such file or directory linus:journal tim$ echo $? 127 In python, use os.popen4 I do the following: >>> fin,fout = os.popen4('/home/AKM

Re: popen4 - get exit status

2012-08-27 Thread Tim Johnson
* Benjamin Kaplan [120827 15:20]: > The popen* functions are deprecated. You should use the subprocess module > instead. No, I'm stuck with py 2.4 on one of the servers I'm using and there will not be an upgrade for a few months. I'm really trying to set up something portable between linux->

Re: popen4 - get exit status

2012-08-27 Thread Tim Johnson
* Dave Angel [120827 15:20]: > On 08/27/2012 06:39 PM, Tim Johnson wrote: > > In bash I do the following: > > linus:journal tim$ /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl hiccup > > -bash: /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl: No such file or > >

Re: popen4 - get exit status

2012-08-28 Thread Tim Johnson
* Dennis Lee Bieber [120828 07:11]: > On Mon, 27 Aug 2012 15:43:59 -0800, Tim Johnson > declaimed the following in gmane.comp.python.general: > > > * Benjamin Kaplan [120827 15:20]: > > > The popen* functions are deprecated. You should use the subprocess module >

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-29 Thread Tim Johnson
* Grant Edwards [121229 10:02]: > On 2012-12-27, mogul wrote: > > > I'm new to python, got 10-20 years perl and C experience, all gained > > on unix alike machines hacking happily in vi, and later on in vim. > > > > Now it's python, and currently mainly on my kubuntu desktop. > > > > Do I really

Re: Good Python IDE

2013-01-06 Thread Tim Johnson
* Sourabh Mhaisekar [130106 07:11]: > Hello All, > I am recently started couple of projects in Python, one in Python GTK and one > in Python Qt. I want a good IDE (For Windows ) for Python which gives support > for Python as well as PyGtk and PyQt. > > Features I am looking for > * Support f

Re: Good Python IDE

2013-01-06 Thread Tim Johnson
* Tetsuya [130106 14:43]: > On 01/06/2013 11:13 PM, Tim Johnson wrote: > > Now I use vim for all of my work. I pretty-much hand-rolled my own > > IDE, which is typical of vimmers. > > I did like you, too. > I use vim for everything: coding in python, django, js, ht

Installing MySQLdb via FTP?

2012-06-07 Thread Tim Johnson
Is it possible to install MySQLdb via FTP? 1)I have a hostmonster account with SSH. I have been able to log in and install MySQLdb from the shell. Works fine. 2)Now I have a client who wants to have a hostmonster account and we will need MySQLdb. I *will not* have SSH access since (as I understan

Re: Python libraries portable?

2012-06-07 Thread Tim Johnson
* Corey Richardson [120607 14:19]: > On Thu, 07 Jun 2012 20:20:47 GMT > jkells wrote: > > > We are new to developing applications with Python. A question came > > up concerning Python libraries being portable between > > Architectures.More specifically, can we take a python library > > tha

Re: Python libraries portable?

2012-06-07 Thread Tim Johnson
* Corey Richardson [120607 15:20]: > On Thu, 7 Jun 2012 15:09:36 -0800 > Tim Johnson wrote: > > > Does this mean that I could copy my MySQLdb module directly from > > my workstation via ftp to a server, and have it work, given that > > sys.path conta

Re: Python libraries portable?

2012-06-07 Thread Tim Johnson
* Corey Richardson [120607 17:01]: > On Thu, 7 Jun 2012 16:43:26 -0800 > Tim Johnson wrote: > > > So what to do if I can't install from the command line? > > I could use python's external command tools like > > subprocess.call(), but am not sure what

Re: Installing MySQLdb via FTP?

2012-06-08 Thread Tim Johnson
* Prasad, Ramit [120608 09:38]: > > Is it possible to install MySQLdb via FTP? > > > > 1)I have a hostmonster account with SSH. I have been able to log in > > and install MySQLdb from the shell. Works fine. > > > > 2)Now I have a client who wants to have a hostmonster account and we > > will nee

Re: Installing MySQLdb via FTP?

2012-06-09 Thread Tim Johnson
* Corey Richardson [120608 11:39]: > On Fri, 8 Jun 2012 09:55:23 -0800 > Tim Johnson wrote: > > > See the thread titled "Python libraries portable?" you will note > > that Corey Richardson makes the statement that MySQLdb is a C > > extension. I acce

Re: Installing MySQLdb via FTP?

2012-06-09 Thread Tim Johnson
* Tim Johnson [120609 07:30]: > > > > http://mysql-python.hg.sourceforge.net/hgweb/mysql-python/MySQLdb-2.0/file/566baac88764/src > > > > It definitely is. The C extension part is the '_mysql' module, here it > > is /usr/lib64/python2.7/site-packages/_mys

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread Tim Johnson
* Yesterday Paid [120609 14:52]: > I'm planning to learn one more language with my python. > Someone recommended to do Lisp or Clojure, but I don't think it's a > good idea(do you?) > So, I consider C# with ironpython or Java with Jython. > It's a hard choice...I like Visual studio(because my firs

Re: which one do you prefer? python with C# or java?

2012-06-12 Thread Tim Johnson
* Tomasz Rola [120611 11:18]: > On Sat, 9 Jun 2012, Yesterday Paid wrote: > > > I'm planning to learn one more language with my python. > > Someone recommended to do Lisp or Clojure, but I don't think it's a > > good idea(do you?) > > So, I consider C# with ironpython or Java with Jython. > > It'

Re: Python Card alternatives?

2011-06-11 Thread Tim Johnson
* rzed [110611 05:14]: > Desktop apps don't seem to be the wave of the future, but they still > serve a useful purpose today. They can be ideal for a quick database > table management screen, or a data entry front end for a program with > a bunch of parameters. It's not easy enough to build a q

dummy, underscore and unused local variables

2011-06-13 Thread Tim Johnson
Consider the following code: for i in range(mylimit): foo() running pychecker gives me a """ Local variable (i) not used """ complaint. If I use for dummy in range(mylimit): ## or for _ in range(mylimit): I get no complaint from pychecker. I would welcome comments on

Re: dummy, underscore and unused local variables[thanks]

2011-06-13 Thread Tim Johnson
* Tim Johnson [110613 07:58]: > > :) I expect to be edified is so many ways, some > of them unexpected. Thanks for all of the responses and for those which might come later. I'm going to stick with the convention of using a variable beginning with `dummy' and stick

Trapping MySQLdb warnings

2011-06-15 Thread Tim Johnson
Using Python 2.6.5 on linux. When using MySQLdb I am getting warnings printed to stdout, but I would like to trap, display and log those warnings. In the past I have used _mysql_exceptions.Warning, but that approach is not working in this case. My cursor is created with the relevant following co

Re: Trapping MySQLdb warnings

2011-06-15 Thread Tim Johnson
* geremy condra [110615 18:03]: > On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnson wrote: > > Using Python 2.6.5 on linux. > > > > When using MySQLdb I am getting warnings printed to stdout, but I would > > like to trap, display and log those warnings. <..

Re: Trapping MySQLdb warnings

2011-06-16 Thread Tim Johnson
* Tim Johnson [110615 18:53]: > * geremy condra [110615 18:03]: > > On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnson wrote: > > > Using Python 2.6.5 on linux. > > > > > > When using MySQLdb I am getting warnings printed to stdout, but I would > > >

Re: Trapping MySQLdb warnings

2011-06-16 Thread Tim Johnson
* Terry Reedy [110616 10:50]: > On 6/16/2011 11:55 AM, Tim Johnson wrote: > >* Tim Johnson [110615 18:53]: > >>* geremy condra [110615 18:03]: > >>>On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnson wrote: > >>>>Using Python 2.6.5 on linux. > >

Re: Trapping MySQLdb warnings

2011-06-16 Thread Tim Johnson
* Terry Reedy [110616 10:50]: <...> > Substitute specific MySQLdb warning class, whatever it is, for Warning. Hmm! Consider the following code: try : self.__rdb.execute(S) raise MySQLdb.Warning('danger, danger Monte Python') ## just for grins except MySQLdb.Warning,e: std.debug("e",e,0,0,

Re: Trapping MySQLdb warnings

2011-06-16 Thread Tim Johnson
* srinivas hn [110616 11:06]: > Hi Tim, > > Use this method it will sort tour problem. > > def do_query(insert_query): >import warnings > > with warnings.catch_warnings(): > warnings.simplefilter('error', MySQLdb.Warning) > try: > cursor.execute(insert_query) > conn.comm

Re: Trapping MySQLdb warnings

2011-06-16 Thread Tim Johnson
* srinivas hn [110616 11:06]: > Hi Tim, > >import warnings > > with warnings.catch_warnings(): > warnings.simplefilter('error', MySQLdb.Warning) > try: > cursor.execute(insert_query) > conn.commit() > return 'Success' > except MySQLdb.Error, error: > loggi

Parsing a dictionary from a format string

2011-06-20 Thread Tim Johnson
Currently using python 2.6, but am serving some systems that have older versions of python (no earlier than. Question 1: With what version of python was str.format() first implemented? Question 2: Given the following string: S = 'Coordinates: {latitude}, {longitude}' Is there a python li

Re: Parsing a dictionary from a format string

2011-06-20 Thread Tim Johnson
* Tim Johnson [110620 10:28]: > Currently using python 2.6, but am serving some systems that have > older versions of python (no earlier than. > Question 1: > With what version of python was str.format() first implemented? > Question 2: > Given the following string: >

Re: Parsing a dictionary from a format string

2011-06-20 Thread Tim Johnson
* Hans Mulder [110620 12:15]: > On 20/06/11 20:14:46, Tim Johnson wrote: > >Currently using python 2.6, but am serving some systems that have > >older versions of python (no earlier than. > >Question 1: > > With what version of python was str.format() first implemen

Re: Parsing a dictionary from a format string

2011-06-20 Thread Tim Johnson
* Tim Johnson [110620 13:00]: > > I think later today, I will run some time tests using the `re' > module as well as your function and the one above. OK: Functions follow: def grabBetween(src,begin,end): """Grabs sections of text between `begin' and `end

Re: Handling import errors

2011-06-21 Thread Tim Johnson
* Guillaume Martel-Genest [110621 12:53]: > What is the pythonic way to handle imports error? What is bugging me > is that the imports can't be inside a function (because I use them in > different places in the script and thus they have to be in the global > scope). I would write something like:

Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
Using Python 2.6 on ubuntu 10.04. inspect module : I want to 'inspect' a module and get a list of all functions, classes and global variables in that module. ## A module has been imported, and we call `getmembers' members = inspect.getmembers(mod) ## While iterating thru `members', we test to see

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* rantingrick [110704 12:00]: > On Jul 4, 1:11 pm, Tim Johnson wrote: > > Well if you follow the python style guide (and most accepted styles > for global notation) then it's a trial exercise. You don't even have > to import anything!!! :) > > >>&g

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Chris Rebert [110704 13:16]: > > > > What else can I do here? > > Look at the names in the module's import statements using the `ast` > module, and exclude those from the set of names defined in the module. > Won't work for `from foo import *`, but that's bad practice and should > be refactored

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* rantingrick [110704 13:47]: > On Jul 4, 3:30 pm, Tim Johnson wrote: > > > >   Thanks for the reply: *but* > >   dir() will also show globals from other modules imported > >   by the target module. So I would need a way to distinguish between > >   those importe

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Steven D'Aprano [110704 15:18]: > > You are mistaken. TestAddresses is *not* a member of an imported module. It > is a member of the current module, which may or may not happen to point to > the same object as the other module as well. You are correct. I mispoke or misapplied. See my last post

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Steven D'Aprano [110704 15:48]: > Tim Johnson wrote: > > >> It seems to me that your approach here is unnecessarily complex and > >> fragile. I don't know what problem you are trying to solve, but trying to > >> solve it by intraspecting differences

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Chris Angelico [110704 16:19]: > On Tue, Jul 5, 2011 at 10:01 AM, Tim Johnson wrote: > >  Steven, I'm building a documentation system. I have my own MVC framework > >  and the goal is to have a documentation module for each project. > > > > Is there a reason

Re: Testing if a global is defined in a module

2011-07-05 Thread Tim Johnson
* Ian Kelly [110704 20:37]: > > It sounds like what you really want is to detect the names *exported* > by the module, then. i Yes! > Why not do it the same way Python does it? If > the module defines an "__all__" attribute, then it is taken to be a > sequence of strings which are the export

Function docstring as a local variable

2011-07-10 Thread Tim Johnson
Consider the following: ## code def test(): """This is my docstring""" print(??) ## can I print the docstring above? ## /code It possible for a function to print it's own docstring? thanks (pointers to docs could be sufficient) -- Tim tim at johnsons-web dot com or akwebsoft dot com htt

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* Andrew Berg [110710 09:59]: > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > On 2011.07.10 12:41 PM, Tim Johnson wrote: > > It possible for a function to print it's own docstring? > >>> def test(): > ... """Hi there.&qu

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* pyt...@bdurham.com [110710 14:17]: > I'm not sure how a function can get a generic handle to itself, but if > you're willing to hardcode the function name, then this technique works: > > def test(): > """This is my doc string""" > print test.__doc__ > > test() Works for me. Works for

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* Carl Banks [110710 15:18]: > On Sunday, July 10, 2011 3:50:18 PM UTC-7, Tim Johnson wrote: > > Here's a related question: > > I can get the docstring for an imported module: > > >>> import tmpl as foo > > >>> print(foo.__doc__) > &g

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* Chris Rebert [110710 16:14]: > > > >  Where is general documentation on the subject of variables > >  beginning with 2 underscores? > > I've never heard that phrase used to describe __doc__ or its friends. :) That why I wasn't satified with my search results. > Look in the "underscore" sectio

Hostmonster : Installing MySQLdb at a specific location

2011-07-31 Thread Tim Johnson
I've using MySQLdb for years, but always on servers where I had system-wide access. I have an account on Hostmonster and would like to do some development there, but although python2.6 is available, MySQLdb is not installed. I do not believe there is a system-wide access, nor do I expect sysadmins

Re: Hostmonster : Installing MySQLdb at a specific location

2011-07-31 Thread Tim Johnson
* Tim Johnson [110731 11:01]: > I've using MySQLdb for years, but always on servers where I had > system-wide access. > > I have an account on Hostmonster and would like to do some > development there, but although python2.6 is available, MySQLdb is > not installed. I do

Re: Hostmonster : Installing MySQLdb at a specific location

2011-08-01 Thread Tim Johnson
* Tim Johnson [110731 11:47]: > I don't want to discourage any further input, but I'm looking at > https://my.hostmonster.com/cgi/help/000531?step=000531 > regarding installing django and I think the instructions can be > extrapolated for MySQLdb. I will report what hap

Re: what is the advantage of Django when comparing with LAMP and J2EE platform?

2011-08-02 Thread Tim Johnson
* smith jack [110802 11:37]: > There are so many choice to do the same thing, so is there any special > advantage Django brings to user? Django is a python framework, J2EE is a java platform (my apologies if I use 'framework' incorrectly). Our customers want PHP,perl or python, not java. The de

Thoughts about documentation for non-python resource files

2011-08-22 Thread Tim Johnson
I'm looking for comments and/or URLs to discussions on this topic. I use my own MVC system. A component of this system generates documentation from python docstrings. Of course this system also comprises many non-python filetypes : css, html, txt, js, xml etc. Views, which are txt or html files ca

Maximum post data length

2011-03-03 Thread Tim Johnson
I am currently using python 2.6. For years I have used my own cgilib module which in turn uses the stand python cgi library module. The implementation is : self.form = cgi.FieldStorage(keep_blank_values=1) I'm looking for an approach that would enable both client- and server-side validation with

PEP for module naming conventions

2011-03-11 Thread Tim Johnson
I need to be better informed on naming conventions for modules. For instance, I need to create a new module and I want to make sure that the module name will not conflict with any future or current python system module names. There may be a PEP for this, if so, a URL to such a PEP would suffice f

Re: PEP for module naming conventions

2011-03-11 Thread Tim Johnson
You can find the list of all PEPs at http://python.org/dev/peps/ Thank you for the links David. > -- > David Marek > dav...@atrey.karlin.mff.cuni.cz > http://davidmarek.cz And interesting web site. The future is with us. > > On Fri, Mar 11, 2011 at 10:52 PM, Tim Johnson wrote:

Re: organizing many python scripts, in a large corporate environment.

2011-03-12 Thread Tim Johnson
* Phat Fly Alanna [110312 07:22]: > We've been doing a fair amount of Python scripting, and now we have a > directory with almost a hundred loosely related scripts. It's > obviously time to organize this, but there's a problem. These scripts > import freely from each other and although code reuse

Changing class name causes process to 'hang'

2011-03-12 Thread Tim Johnson
I'm using Python 2.6.5 on ubuntu 10.04 32-bit. My issue however, is with a code base that goes back to 2002, which at that time was 1.5~ or so. I have been since that time using my own cgi module which in turn, uses the python standard `cgi' module. The object instantiation has looked something l

Re: organizing many python scripts, in a large corporate environment.

2011-03-12 Thread Tim Johnson
* Tim Johnson [110312 10:41]: <...> 3)Cut down on the number of executables by using 'loaderers'. Sheesh! Typo, meant to say 'loaders'.. sorry -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing class name causes process to 'hang'

2011-03-12 Thread Tim Johnson
* Terry Reedy [110312 13:28]: > On 3/12/2011 2:53 PM, Tim Johnson wrote: > > Is 'cgilib' *your* wrapper of the cgi module, or from a third party. cgilib is my module. I use the cgi module as follows: ## code below import cgi self.form = cgi.FieldStorage(keep_blank

Re: Changing class name causes process to 'hang'

2011-03-13 Thread Tim Johnson
* Terry Reedy [110312 17:45]: > >## code below > > import cgi > > self.form = cgi.FieldStorage(keep_blank_values=1) > >## /code > And cgitools is a class therein? Code above is called with/from cgitools > > Hmm! I'm unsure what you mean here, but > > If the name 'cgitools' is used

Re: Changing class name causes process to 'hang'

2011-03-13 Thread Tim Johnson
* Tim Johnson [110313 08:27]: > One other thing I just realized: > The process stops inside of a function call to another object > method, if that method call is removed, the process teminates. > :) I may have a solution later today, and will relay it to you if > found. M

Re: Changing class name causes process to 'hang'

2011-03-13 Thread Tim Johnson
* Terry Reedy [110313 13:46]: > On 3/13/2011 3:17 PM, Tim Johnson wrote: > >* Tim Johnson [110313 08:27]: > > Your fundamental problem is that you changed the api of your module. > When you do that, No. I created a 'fork' of the original so that the 'fork&#

Re: organizing many python scripts, in a large corporate environment.

2011-03-13 Thread Tim Johnson
* bukzor [110313 15:48]: > > Thanks Tim. > > I believe I understand it. You create loaders in a flat organization, > in the same directory as your shared library, so that it's found Not in the same directory as shared libraries. > naturally. These loaders use custom code to find and run the

Re: PEP for module naming conventions

2011-03-13 Thread Tim Johnson
* Ben Finney [110313 17:15]: > Tim Johnson writes: > > > I need to be better informed on naming conventions for modules. For > > instance, I need to create a new module and I want to make sure that > > the module name will not conflict with any future or current python

Dynamic loading of module with explicit file path

2011-03-14 Thread Tim Johnson
FYI: Using python 2.6 on ubuntu 10, backward compatibilty to 2~ needed. Self-employed programmer 24 years. Python 9 years, part-time. I'm not addressing an existing problem, but looking for ideas that might help me to do some upgrading (if needed). I'd like to solicit comments on the following m

Where to put .pth files on slax

2011-03-25 Thread Tim Johnson
Hello: I'm trying to put together a test platform on a slax OS. Python 2.7 packages appear to be at /user/lib/python2.7. Where is the appropriate place to put a .pth file? Note, I have django on this system too, but slax does not resolved system paths. And that is 'slax' not 'slack'. -- Tim tim

Re: Where to put .pth files on slax

2011-03-25 Thread Tim Johnson
* Tim Johnson [110325 12:59]: > Hello: I'm trying to put together a test platform on a slax OS. > Python 2.7 packages appear to be at /user/lib/python2.7. > > Where is the appropriate place to put a .pth file? I must have stumped the chumps. And this chump hasn't used

Incompatible _sqlite3.so

2011-03-27 Thread Tim Johnson
I have python 2.6.5 on my main workstation with ubuntu 10.04. I am attempting to set up a temporary test platform on an asus netbook with slax running from an SD card. I have installed a python 2.7 module on the slax OS. (I can't find a python 2.6.5 module for slax). For those who don't know, slax

Re: Incompatible _sqlite3.so

2011-03-27 Thread Tim Johnson
* Alexander Kapps [110327 13:58]: > On 27.03.2011 23:24, Tim Johnson wrote: > >I have python 2.6.5 on my main workstation with ubuntu 10.04. I am > >attempting to set up a temporary test platform on an asus netbook > >with slax running from an SD card. I have installed a py

Re: Incompatible _sqlite3.so

2011-03-27 Thread Tim Johnson
* Alexander Kapps [110327 15:14]: > On 28.03.2011 00:21, Tim Johnson wrote: > > >>Python 2.6: > >>http://www.slax.org/modules.php?action=detail&id=3118 > > > > That module is *not* trusted. See the warning? > > > You don't trust an unveri

Re: Incompatible _sqlite3.so

2011-03-27 Thread Tim Johnson
* Tim Johnson [110327 16:59]: > * Alexander Kapps [110327 15:14]: > > On 28.03.2011 00:21, Tim Johnson wrote: > > > > >>Python 2.6: > > >>http://www.slax.org/modules.php?action=detail&id=3118 > > > > > > That module is *not* trusted.

Programmatically log in and request XML

2011-04-18 Thread Tim Johnson
FYI: Using python 2.7 on ubuntu 10.04. I have acquainted myself with the parsing of XML data using an input file as test data. Now I need to make a request the feed itself, and capture that field as data. I need to do the following: 1)Programmatically log into a site with user and password. 2)Mak

Re: Codes do not run

2011-05-24 Thread Tim Johnson
* SKHUMBUZO ZIKHALI [110524 07:26]: > Hi: > > I am learning Python on my own using a " Guide to Programming with Python" > book. Author of the book is Micheal Dawson and I am using version 2.3.5 of > python.  When I try to run the code I do not get required results. The > picture > could not

Pips for python2 and python3

2021-03-21 Thread Tim Johnson
Using ubuntu 20.04 as a recent install with python3 (3.8.5) which was installed as part of the original distribution install and python2 (2.7.18) that has been installed using apt. I have a large amount of utilities written in python2 which I need to maintain until I convert that code to python

Re: Pips for python2 and python3

2021-03-21 Thread Tim Johnson
On 3/21/21 5:14 PM, MRAB wrote: Tn 2021-03-21 23:13, Tim Johnson wrote: Using ubuntu 20.04 as a recent install with python3 (3.8.5) which was installed as part of the original distribution install and python2 (2.7.18) that has been installed using apt. I have a large amount of utilities

Re: Pips for python2 and python3

2021-03-22 Thread Tim Johnson
On 3/21/21 5:44 PM, Dan Stromberg wrote: python3 -m pip install Got it. Thanks a lot. -- Tim tj49.com -- https://mail.python.org/mailman/listinfo/python-list

Idiomatic code validator?

2016-09-20 Thread Tim Johnson
Not to confuse idiomatic code validation with pep8 validation (I use elpy on emacs) Is there such a thing as a validator for _idiomatic_ code? I have Knupp's "Writing Idiomatic Python" and have bookmarked some advisory websites that illustrate idiomatic style. thanks -- Tim http://www.akwebsof

Re: Idiomatic code validator?

2016-09-20 Thread Tim Johnson
* Terry Reedy [160920 11:48]: > On 9/20/2016 11:41 AM, Tim Johnson wrote: > > Not to confuse idiomatic code validation with pep8 validation > > Strictly speaking, there cannot be a mechanical PEP 8 validator, as any > mechanical checker violates the admonitions of the

Re: Idiomatic code validator?

2016-09-20 Thread Tim Johnson
* Steve D'Aprano [160920 16:29]: > On Wed, 21 Sep 2016 01:41 am, Tim Johnson wrote: > > > Not to confuse idiomatic code validation with pep8 validation (I use > > elpy on emacs) > > > > Is there such a thing as a validator for _idiomatic_ code? > >

Re: Idiomatic code validator?

2016-09-20 Thread Tim Johnson
* Steve D'Aprano [160920 16:29]: > On Wed, 21 Sep 2016 01:41 am, Tim Johnson wrote: > > > Not to confuse idiomatic code validation with pep8 validation (I use > > elpy on emacs) > > > > Is there such a thing as a validator for _idiomatic_ code? > >

Re: What is currently the recommended way to work with a distutils-based setup.py that requires compilation?

2016-11-08 Thread Tim Johnson
* Ivan Pozdeev via Python-list [161106 17:28]: > https://wiki.python.org/moin/WindowsCompilers has now completely replaced > instructions for `distutils`-based packages (starting with `from > distutils.core import setup`) with ones for `setuptools`-based ones > (starting with `from setuptools impo

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Tim Johnson
* Antonio Caminero Garcia [170102 02:50]: <> > Now, I am thinking about giving a try to Visual Studio Code > Edition (take a look, it sounds good > https://marketplace.visualstudio.com/items?itemName=donjayamanne.python). > I need an editor for professional software development. What would >

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-03 Thread Tim Johnson
* Antonio Caminero Garcia [170102 20:56]: > Guys really thank you for your answers. Basically now I am more > emphasizing in learning in depth a tool and get stick to it so I > can get a fast workflow. Eventually I will learn Vim and its > python developing setup, I know people who have been progr

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread Tim Johnson
* Paul Rudin [170103 23:17]: > Tim Johnson writes: > > > * Antonio Caminero Garcia [170102 20:56]: > >> Guys really thank you for your answers. Basically now I am more > >> emphasizing in learning in depth a tool and get stick to it so I > >> can get a

Re: Choosing a Python IDE. what is your Pythonish recommendation? I

2017-01-06 Thread Tim Johnson
* Paul Rudin [170103 23:17]: > Tim Johnson writes: > > > * Antonio Caminero Garcia [170102 20:56]: > >> Guys really thank you for your answers. Basically now I am more > >> emphasizing in learning in depth a tool and get stick to it so I > >> can get a fas

Restore via pip to new OS

2018-03-14 Thread Tim Johnson
I'm currently running both python and python3 on ubuntu 14.04. Plan is to do a complete re-install of ubuntu 16.04 on a fresh hard drive. I've accumulated a list of pip-install packages via pip list > piplist.txt. Can I duplicate the same packages on the new OS by pip -r piplist.txt? thanks --

Re: Restore via pip to new OS

2018-03-14 Thread Tim Johnson
* Paul Moore [180314 15:42]: > Use pip freeze rather than pip list. That will give you the > information in "requirements file" format that pip install -r can > read. > > On 14 March 2018 at 23:20, Tim Johnson wrote: <...> > > Can I duplicate the same

Pip Version Confusion

2018-03-24 Thread Tim Johnson
I'm on Ubuntu 16.04. I'm getting the following message from pip: You are using pip version 8.1.1, however version 9.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. # But then I get this : tim@linus:~/Downloads$ which pip /home/tim/.local/bin/pip # an

Re: Pip Version Confusion

2018-03-24 Thread Tim Johnson
* Steven D'Aprano [180324 08:29]: > On Sat, 24 Mar 2018 07:40:17 -0800, Tim Johnson wrote: > > > I'm on Ubuntu 16.04. > > > > I'm getting the following message from pip: > > > > You are using pip version 8.1.1, however version 9.0.3 is availa

Re: Pip Version Confusion

2018-03-24 Thread Tim Johnson
* Tim Johnson [180324 10:32]: > * Steven D'Aprano [180324 08:29]: > > On Sat, 24 Mar 2018 07:40:17 -0800, Tim Johnson wrote: > > > > > I'm on Ubuntu 16.04. > > > > > > I'm getting the following message from pip: > > > > &g

Determining latest stable version for download

2019-03-20 Thread Tim Johnson
://www.python.org/ftp/python/. How do I determine the following? 1) Latest current stable version of python 3* 2) Correct tarfile for linux - at this time I assume it will be linux centOS TIA -- Tim Johnson http://www.tj49.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Determining latest stable version for download

2019-03-20 Thread Tim Johnson
pecific. For Linux there are really only > two options: Python-3.7.2.tar.xz and Python-3.7.2.tgz. The only difference > is that one is compressed with xz and the other is compressed with gzip. > Pick the .xz unless you're unable to decompress it. > On Wed, Mar 20, 2019 at 12:43 PM Ti

Re: Determining latest stable version for download

2019-03-21 Thread Tim Johnson
* Michael Torrie [190320 19:22]: > On 03/20/2019 07:10 PM, Tim Johnson wrote: > > * Ian Kelly [190320 12:00]: > >> 1) https://www.python.org/downloads/ has release information. Based on that > >> you would currently want 3.7.2. Make sure you actually download

Re: Determining latest stable version for download

2019-03-21 Thread Tim Johnson
* Michael Torrie [190320 19:22]: > On 03/20/2019 07:10 PM, Tim Johnson wrote: > > * Ian Kelly [190320 12:00]: > >> 1) https://www.python.org/downloads/ has release information. Based on that > >> you would currently want 3.7.2. Make sure you actually download

Re: Determining latest stable version for download

2019-03-23 Thread Tim Johnson
* Tim Johnson [190320 10:46]: > Some time in the near future I will want to install the latest > current stable version of python on a remote server. I anticipate > that I will either use wget from the server shell or download to my > workstation and transfer via FTP. I will ne

Managing pipenv virtualenvs

2019-03-26 Thread Tim Johnson
tring. examples helloworld-_e28Oloi pages-Du4qJjUr What would happen if I deleted the first folder, which was created in a previous chapter? ... trying to minimize my SSD real estate. thanks -- Tim Johnson http://www.tj49.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Managing pipenv virtualenvs

2019-03-26 Thread Tim Johnson
apter files. I guess I will find out why ... thank you > On a personal note it sounds strange why the author wants to have different > venv's for each chapter. > > On Wed, Mar 27, 2019, 3:30 AM Tim Johnson wrote: > > > I'm on ubuntu 16.04 > > &g

Re: Managing pipenv virtualenvs

2019-03-26 Thread Tim Johnson
thanks again, Test Bot ... > On Wed, Mar 27, 2019, 4:21 AM Tim Johnson wrote: > > > * Test Bot [190326 14:18]: > > > Nothing much i think. If you are properly managing dependencies for each > > > venv, then each new venv should have the same state as the previ

Re: Your IDE's?

2019-03-26 Thread Tim Johnson
rther customized with plenty of my own elisp code. They won't take any of that away unless they pry it from my cold, dead fingers, but that's just me. :) I wouldn't wish emacs or vim on anyone who didn't feel that the learning curve was worth it. MTCW --

ModuleNotFoundError with click module

2019-11-30 Thread Tim Johnson
Using linux ubuntu 16.04 with bash shell. Am retired python programmer, but not terribly current. I have moderate bash experience. When trying to install pgadmin4 via apt I get the following error traceback when pgadmin4 is invoked: Traceback (most recent call last):   File "setup.py", line 17,

Re: ModuleNotFoundError with click module

2019-12-01 Thread Tim Johnson
On 12/1/19 12:26 AM, Peter Otten wrote: Tim Johnson wrote: Using linux ubuntu 16.04 with bash shell. Am retired python programmer, but not terribly current. I have moderate bash experience. When trying to install pgadmin4 via apt I get the following error traceback when pgadmin4 is invoked

Re: ModuleNotFoundError with click module

2019-12-01 Thread Tim Johnson
On 12/1/19 12:26 AM, Peter Otten wrote: Tim Johnson wrote: Using linux ubuntu 16.04 with bash shell. Am retired python programmer, but not terribly current. I have moderate bash experience. When trying to install pgadmin4 via apt I get the following error traceback when pgadmin4 is invoked

Re: ModuleNotFoundError with click module

2019-12-01 Thread Tim Johnson
On 12/1/19 3:41 PM, Tim Johnson wrote: On 12/1/19 12:26 AM, Peter Otten wrote: Tim Johnson wrote: Using linux ubuntu 16.04 with bash shell. Am retired python programmer, but not terribly current. I have moderate bash experience. When trying to install pgadmin4 via apt I get the following

  1   2   >