Will Acheson writes:
> I have had a lot of trouble with executing relative imports with some
> of my projects in python.
>
> Are there any best practices or methods besides '../../' type
> hard-coding?
The important point to learn with Python's import system, as contrasted
with various other la
On Sunday, November 9, 2014 11:51:41 PM UTC-5, Steve Hayes wrote:
> I have a book on Python that advocates dividing programs into modules, and
> importing them when needed.
>
> I have a question about this.
>
> I can understand doing that in a compiled language, where different modules
> can be
On Tue, Nov 11, 2014 at 12:36 AM, Roy Smith wrote:
> Yes, exactly. When you deploy your application someplace, you need to
> include all the things it depends on. In the simple case of a few
> python files (say, a main program and a few modules that you're
> written), the easiest thing to do mig
In article ,
Steve Hayes wrote:
> I have a book on Python that advocates dividing programs into modules, and
> importing them when needed.
Yes, this is a good idea. Breaking your program down into modules, each
of which does a small set of closely related things, makes it easier to
manage.
Steve Hayes writes:
> So if I want to run it on another computer, where do I look for the
> compiled executable program to copy?
You generally don't do that (the compiled files tend to be specific to
various aspects of the target platform). This is a way that i's
important to remember that most
On Mon, 10 Nov 2014 16:12:07 +1100, Ben Finney
wrote:
>Steve Hayes writes:
>
>> I have a book on Python that advocates dividing programs into modules,
>> and importing them when needed.
>
>Which book is this? (This is not essential to your question, but it
>might help to gauge your broader learn
Steve Hayes writes:
> I have a book on Python that advocates dividing programs into modules,
> and importing them when needed.
Which book is this? (This is not essential to your question, but it
might help to gauge your broader learning environment.)
> I can understand doing that in a compiled
On 10/11/14 14:55, Steve Hayes wrote:
I have a book on Python that advocates dividing programs into modules, and
importing them when needed.
I have a question about this.
I can understand doing that in a compiled language, where different modules
can be imported from all sorts of places when th
On 2013-01-14, Rick Johnson wrote:
> Only a fool would do "from Tkinter import *"[2].
> [2] With the exception of command line testing, learning, or playing.
I don't think those should be excepted. Habits acquired during
learning/playing will be continue when doing real work, and "Example"
code
On Monday, January 14, 2013 9:04:00 AM UTC-6, Chris Angelico wrote:
> The performance cost of reimporting a module is very low;
> in fact, trying to avoid it by adorning all your usage
> with an extra dot-level will probably cost you a lot more,
> since there'll be an extra lookup every time.
Most
On Mon, 14 Jan 2013 15:54:27 +0100, zoom wrote:
> Is there any "rules" regarding importing python modules within your own
> module? I mean, how does this affects the performance of the program?
"Even the initializers are optimized!" -- Mel, the real programmer
Unless you've profiled it, and the
On 01/14/2013 04:01 PM, Dan Sommers wrote:
On Mon, 14 Jan 2013 15:54:27 +0100, zoom wrote:
Is there any "rules" regarding importing python modules within your own
module? I mean, how does this affects the performance of the program?
"Even the initializers are optimized!" -- Mel, the real prog
On Tue, Jan 15, 2013 at 1:54 AM, zoom wrote:
> Is there any "rules" regarding importing python modules within your own
> module? I mean, how does this affects the performance of the program?
>
> In short, when creating a module, is it worthwhile to be careful and import
> only necessary functions,
On 31 jan, 02:57, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
> 2008/1/30, J. Peng <[EMAIL PROTECTED]>:
>
> > Hello,
>
> > Is there a site for python,which collects most kinds of python modules?
> > like CPAN for Perl.
> > Sometime I want to use a module,like the time/date modules,don't know
> >
2008/1/30, J. Peng <[EMAIL PROTECTED]>:
> Hello,
>
> Is there a site for python,which collects most kinds of python modules?
> like CPAN for Perl.
> Sometime I want to use a module,like the time/date modules,don't know
> where I should search from.
> Sorry if I have repeated this question on t
Shirley Li wrote:
> Dear Python experts,
>
> I'm a beginner of Python programming.I have a question about Python
> modules.
>
> With the following:
> =
> import sys, os, string, math
> from Numeric import *
> from Matrix import *
> =
> at the beginning of my Py
On Sat, 2005-04-16 at 08:12 -0600, Uche Ogbuji wrote:
> On Sat, 2005-04-09 at 14:09 -0700, dzieciou wrote:
>
> > I'm new-comer in Python.
> > I want to install few Python modules (4Suite, RDFLib, Twisted and Racoon)
> > in my home directory, since Python installation is already installed in the
>
On Sat, 2005-04-09 at 14:09 -0700, dzieciou wrote:
> I'm new-comer in Python.
> I want to install few Python modules (4Suite, RDFLib, Twisted and Racoon)
> in my home directory, since Python installation is already installed in the
> system
> and I'm NOT its admin.
> I cannot install pyvm (portabl
[EMAIL PROTECTED] wrote:
set the PYTHON_PATH to include your home directory
Its correct name is 'PYTHONPATH'.
Under C shell:
setenv PYTHONPATH /home/yourlogin/pythonlibs
Under bourne/bash:
set PYTHONPATH=/home/yourlogin/pythonlibs
export PYTHONPATH
--
set the PYTHON_PATH to include your home directory
--
http://mail.python.org/mailman/listinfo/python-list
my image file is only about 5 MB, so, it's not too large.
I've done some testing with PIL and it will meet my needs, I think. I
can see how I could slice and dice my image, or only present the
cropped section that I need.
thanks,
S
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
I use PROJ.4 via pipes for cartographic projections.
http://proj.maptools.org/
There is an addon to the matplotlib plotting library that contains a
binding for the PROJ.4 library, but I haven't gotten it to work on my Mac.
http://matplotlib.sourceforge.net/toolkits.html
Jus
Stewart Midwinter wrote:
I would like to do some image / map manipulation with Python.
I've got a very large map file in .png format. My thought is to chop
it up into small tiles using some method. What Python module would be
helpful for this?
The PIL. I'm not sure how well it handles files of y
"Kartic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Efrat Regev wrote:
> > Hello,
> >
> > I was wondering whether there are any Python >
Erfat...yes...batteries included!
>
> http://docs.python.org/lib/internet.html
>
> Thanks,
> -Kartic
>
Excellent! more like generator inc
On Thu, Feb 24, 2005 at 11:11:07AM -0600, Efrat Regev wrote:
> I was wondering whether there are any Python modules for various
> Internet protocols, ...
Twisted (http://twistedmatrix.com/products/twisted) is an event driven
framework for writing network applications. It includes many internet
Efrat Regev wrote:
> Hello,
>
> I was wondering whether there are any Python modules for various
> Internet protocols, e.g., is there something similar to
>
Erfat...yes...batteries included!
http://docs.python.org/lib/internet.html
Thanks,
-Kartic
--
http://mail.python.org/mailman/listinf
26 matches
Mail list logo