Hello all:
I have the following snippet:
In [1]: fileName = 'Perfect Setup.txt\n'
In [2]: fileName = fileName[0:len(fileName)-1)] # remove the '\n'
character
In [3]: fileName
Out[3]: 'Perfect Setup.txt'
Question one:
Does python provide any function that can remove the last character of
a stri
hello all:
I am using Image module from PIL to save created image as JPG format.
Is there any option I could set for function Image.save so that the
stored image will have the highest quality.
Thank you
-Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Hello all:
I follow the following tutorial
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/108598
Description:
script for making executables with py2exe
##
from distutils.core import setup
import sys, os, py2exe
name = sys.argv[1]
sys.argv[1] = 'py2exe'
sys.path.append(os.pat
Hello all:
I have found a useful module in IPython, named 'from IPython.ipstruct
import Struct".
So I can use it as follows:
from IPython.ipstruct import Struct
mystruct = Struct(echo = 1,
verb = 'Verbose',
filedir
Hello all:
I installed IPython on my XP machine today and find that my sys.path
has been changed
as follows:
>> import sys
>> print sys.path
['',
'C:\\Program Files\\Python24\\scripts',
'C:\\WINDOWS\\system32\\python24.zip',
'C:\\Documents and Settings\\Daniel\\Desktop',
'C:\\Program Files\
Hello all:
I have a python program and would like to find out the maximum memory
used
by this program.
Does Python provide such module so I could check it easily?
Thank you
-Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Hello all:
I am looking the sample code posted on PIL website
http://www.pythonware.com/library/pil/handbook/imagedraw.htm
<>
import Image, ImageDraw
im = Image.open("lena.pgm")
draw = ImageDraw.Draw(im)
draw.line((0, 0) + im.size, fill=128)
dra
Hello all:
I have a list AAA = [1, 2, 3] and would like to subtract one from list
AAA
so AAA' = [0, 1, 2]
What should I do?
Thank you
-Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Hello all:
I am using PIL to draw a rectangle filled with color blue.
Is there anyway I could set the fill pattern so that the drawn
rectangle could be filled with
gradient blue?
Thank you
-Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Hello all:
I am using PIL to draw some graphics and I need to draw some texts
in vertical direction rather than the default left-to-right horizontal
direction.
Is there anyway I could do that?
Thank you
-Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Hello all:
I am using getopt package in Python and found a problem that I can not
figure out an easy to do .
// Correct input
D:\>python AddArrowOnImage.py --imageDir=c:/
// Incorrect input
D:\>python AddArrowOnImage.py --imageDi
Traceback (most recent call last):
File "AddArrowOnImage.py", li
Hello all:
I have following code that works well under command line, but it
doesn't work after I convert it
as exe application.
### file: testPath.py
import getopt, math, sys, os, Image, ImageDraw, aggdraw
def processline():
try:
imgDir = 'c:/'
lumenImageName = '0
Hello all:
I want to draw some shapes, such as lines, circles on an image.
The input to the program is an image and the output from the program is
a superimposed image.
what kind of document or functions I should take a look for searching
this question?
The program doesn't show the image, but
Dear John:
> Have a look in each of those folders (including the root!!) and see
> what you find there. [If I were forced to bet, I'd put my money on
> cygwin].
You are a genius!!!
My machine was intalled python in cygwin:)
I didn't expect that I could get so much helps from this forum.
My hear
Hello John:
I did try, however, it doesn't work on my machine.
Thank you
-Daniel
John Salerno wrote:
> Daniel Mark wrote:
>
> > Maybe there is not solution to this problem:)?
>
> Did you not try Sybren's suggestion? Remove the space between the
> semicolon and
u, is Python there?
>
> Cheers
> Ray
>
> Daniel Mark wrote:
> > Hello all:
> >
> > I have set the PATH for Python as follows:
> >
> > My Computer->Properties->Advanced->Environment Variables->System
> > Variables->Path
> >
>
Hello Dennis:
> A second suggestion would be: don't install Python in "Program
> Files", but put it at the top level of the partition (ie; C:\Python24\)
>
I guess your comment is right.
However, I would like to install Python under directory
"C:\Program Files\Python24"
Also, I list some scr
Hello all:
I have set the PATH for Python as follows:
My Computer->Properties->Advanced->Environment Variables->System
Variables->Path
...; C:\Program Files\Python24;
Then I try to run python under command line
C:\>python
C:\>python.exe
I got nothing:)
It works iff I run as follows:
C:\>"P
18 matches
Mail list logo