On Dec 14, 6:58 pm, Cameron Walsh [EMAIL PROTECTED] wrote:
Hi all,
Using a pythoncgiscript such as the one below to handle uploaded
binary files will end up with atruncatedfile (truncates when it hits
^Z) on Windows systems. On linux systems the code works and the file is
nottruncated
Hi all,
Using a python cgi script such as the one below to handle uploaded
binary files will end up with a truncated file (truncates when it hits
^Z) on Windows systems. On linux systems the code works and the file is
not truncated.
One solution for Windows is to use the -u flag, i.e.
Antonio Ceballos wrote:
Hello,
I am trying to open a URL on a new browser or new tab from an HTML page
created from a python cgi script.
import cgitb; cgitb.enable()
# Will save you hours of debugging. Prints error messages and
exceptions to the client, wrapped in pretty html.
On Apache
Amit Khemka wrote:
Cut image by m X m grid (bigger the m, the more varied shapes you
would be able to generate), this will give you m*m square pieces. With
each piece store a vector which represents the polygon (say by storing
co-ordinates of the corners).
Now visualize this set of pieces as
Tom_chicollegeboy wrote:
I figured out problem. here is my code. now it works as it should!
Thank you everyone!
I decided my 4th clue earlier was too much, so I removed it before
posting. It looks like you got it anyway =)
You've now solved it the way the course instructor intended you to
Jens wrote:
Thanks a lot! I'm not sure I completely understand your description of
how to integrate Python with, say PHP. Could you please give a small
example? I have no experience with Python web development using CGI.
How easy is it compared to web development in PHP?
I still havent't
Jens wrote:
I'm starting a project in data mining, and I'm considering Python and
Java as possible platforms.
I'm concerned by performance. Most benchmarks report that Java is
about 10-15 times faster than Python, and my own experiments confirms
this. I could imagine this to become a
Tom_chicollegeboy wrote:
snip!
Here is my code:
def speed():
infile = open('speed.in', 'r')
line = infile.readline()
read = int(line)
print line
i = 0
t0 = 0
v = 0
while iread:
line = infile.readline()
list = line.split()
[EMAIL PROTECTED] wrote:
hi
i am looking for some info about mapping btw values in an array and
corresponding columns of a matrix
i have an numpy array=[11.0,33.0,22.0,55.0,44.0]
and a numpy matrix object=
matrix(([1.3,2.5,3.2,6.7,3.1],
sandipm wrote:
seeing posts from students on group. I am curious to know, Do they
teach python in academic courses in universities?
Sydney University teaches user interface design, some data mining and
some natural language processing in Python. Software development is
still largely a Java
Barry wrote:
Hi, guys
Basiclly, it is automated testing system. There is a main python script
that handles the testing campagin. This main script will call another
script that will in turn runs a few hundered individual python scripts.
Here is my problem. I want to log everything
johnny wrote:
How do I join two string variables?
I want to do: download_dir + filename.
download_dir=r'c:/download/'
filename =r'log.txt'
I want to get something like this:
c:/download/log.txt
Hi Johnny,
This is actually two questions:
1.) How do I concatenate strings
2.) How do
Cameron Walsh wrote:
Hi all,
I'm trying to extract the data from a bitmap or .pnm file using the
following code:
import Image
img = Image.open(test.bmp,r)
data=img.getdata()
Unfortunately I get the following exception on Linux, but not on Windows:
data=img.getdata()
Traceback
Hi all,
I'm trying to extract the data from a bitmap or .pnm file using the
following code:
import Image
img = Image.open(test.bmp,r)
data=img.getdata()
Unfortunately I get the following exception on Linux, but not on Windows:
data=img.getdata()
Traceback (most recent call last):
File
ronrsr wrote:
I have a single long string - I'd like to split it into a list of
unique keywords. Sadly, the database wasn't designed to do this, so I
must do this in Python - I'm having some trouble using the .split()
function, it doesn't seem to do what I want it to - any ideas?
thanks
ronrsr wrote:
still having a heckuva time with this.
here's where it stand - the split function doesn't seem to work the way
i expect it to.
longkw1,type(longkw): Agricultural subsidies; Foreign
aid;Agriculture; Sustainable Agriculture - Support; Organic
Agriculture; Pesticides, US,
[EMAIL PROTECTED] wrote:
Hello,
I use csv to take information from file.
import csv
reader = csv.reader(open('t.csv'))
for row in reader:
print row # it is perfectly OK
-
But If I use this code I have problem
Robert Kern wrote:
Cameron Walsh wrote:
Hi all,
I have a numpy.array of 89x512x512 uint8's, set up with code like this:
numpy questions are best asked on the numpy list, not here.
At first I thought it was a generic python question, since it had more
to do with writing array data to file
Hi all,
I have a numpy.array of 89x512x512 uint8's, set up with code like this:
data=numpy.array([],dtype=uint8)
data.resize((89,512,512))
# Data filled in about 4 seconds from 89 image slices
snip lots of processing code
I first tried writing this data to a binary raw format (for use in a
[EMAIL PROTECTED] wrote:
Hello :)
I have installed Apache on windows...
The server work well, and my python script also
but when I want in my python script to run a System command like
os.system(my_command) the script doesn't do anything!
here the error.log
[Wed Nov 08 14:19:30
Gabriel Genellina wrote:
At Wednesday 8/11/2006 21:18, Nicolas G wrote:
How can I use python to get the real IP address of my DSL router (when
my PC is part of the local home LAN) ?
limodou wrote:
On 10/27/06, Wijaya Edward [EMAIL PROTECTED] wrote:
Thanks but my intention is to strictly use regex.
Since there are separator I need to include as delimiter
Especially for the case like this:
str = '\xc5\xeb\xc7\xd5\xbc--FOO--BAR'
field = list(str)
print field
[EMAIL PROTECTED] wrote:
Dennis Lee Bieber wrote:
On Fri, 27 Oct 2006 03:48:25 GMT, Michael Naunton
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
This may seem pendantic, but CS is mostly about thinking about (and thus
snicker Someday I should arrange to do a lost-wax
Paul McGuire wrote:
J. Clifford Dyer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
ZeD wrote:
Paul Rubin wrote:
A = [0,1,2,3,4,5,6,7,8,9,10]
B = [2,3,7,8]
desired_result = [2,3,7,8,0,1,4,5,6,9,10]
How about:
desired_result = B + sorted(x for x in A if x not in B)
this.
Steven Bethard wrote:
As you noted, you'll get an error if you try to concatenate B as a set
to the list.
Steve
Whoops, remind me to check things work before I type them. In the mean
time, here are some more interesting timing results:
With a larger data set, 500 elements instead of
Wijaya Edward wrote:
Hi,
How can we slurp all content of a single file
into one variable?
I tried this:
myfile_content = open('somefile.txt')
print myfile_content,
open file 'somefile.txt', mode 'r' at 0xb7f532e0
But it doesn't print the content of the file.
help(open)
Wijaya Edward wrote:
Hi all,
I was trying to split a string that
represent chinese characters below:
str = '\xc5\xeb\xc7\xd5\xbc'
print str2,
???
fields2 = split(r'\\',str)
print fields2,
['\xc5\xeb\xc7\xd5\xbc']
But why the split function here doesn't seem
to do the job for
[EMAIL PROTECTED] wrote:
Now i began to learn GUI programming. There are so many
choices of GUI in the python world, wxPython, pyGTK, PyQT,
Tkinter, .etc, it's difficult for a novice to decide, however.
Can you draw a comparison among them on easy coding, pythonish design,
beautiful and
Delaney, Timothy (Tim) wrote:
Cameron Walsh wrote:
Hi,
I have two lists, A and B, such that B is a subset of A.
I wish to sort A such that the elements in B are at the beginning of
A, and keep the existing order otherwise, i.e. stable sort. The
order of elements in B will always
Hi,
I have two lists, A and B, such that B is a subset of A.
I wish to sort A such that the elements in B are at the beginning of A,
and keep the existing order otherwise, i.e. stable sort. The order of
elements in B will always be correct.
for example:
A = [0,1,2,3,4,5,6,7,8,9,10]
B =
Cameron Walsh wrote:
Hi,
I have two lists, A and B, such that B is a subset of A.
I wish to sort A such that the elements in B are at the beginning of A,
and keep the existing order otherwise, i.e. stable sort. The order of
elements in B will always be correct.
for example
Paul McGuire wrote:
Cameron Walsh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
I have two lists, A and B, such that B is a subset of A.
I wish to sort A such that the elements in B are at the beginning of A,
and keep the existing order otherwise, i.e. stable sort
Hi,
This has actually been answered in a previous post (user modules
started by myself), for which I was very grateful. I have since
expanded on their solutions to create the following code, of which parts
or all may be useful. You'll probably be most interested in the last
part of the code,
Gabriel Genellina wrote:
At Wednesday 18/10/2006 22:51, Cameron Walsh wrote:
previous_directory = os.getcwd()
try:
os.chdir(directory)
[ ... ]
return modules
finally:
os.chdir(previous_directory)
Woah, that actually works? Having the finally
John J. Lee wrote:
Bernard [EMAIL PROTECTED] writes:
zdp wrote:
[...]
However, now I need to process some pages by a python program. When I
use urllib.urlopen(theurl), I can only get a page which told me I need
login. I think It's reasonable, becuase I wasn't in a loggined session
which as
I just thought, your original question was whether or not it was
possible to share your browser session with IE. Unless you do this
explicitly, you may require a different login for your Python program
and for your IE user. If the Python program does not get the same
cookie as used by IE, or
Hi,
I'm writing a python program to analyse and export volumetric data. To
make development and extension easier, and to make it more useful to the
public when it is released (LGPL), I would like to enable users to place
their own python files in a user_extensions directory. These files
Tuomas wrote:
Cameron Walsh wrote:
Hi,
I'm writing a python program to analyse and export volumetric data.
To make development and extension easier, and to make it more useful
to the public when it is released (LGPL), I would like to enable users
to place their own python files
Juho Schultz wrote:
Juho Schultz wrote:
Cameron Walsh wrote:
Hi,
I'm writing a python program to analyse and export volumetric data. To
make development and extension easier, and to make it more useful to the
public when it is released (LGPL), I would like to enable users to place
39 matches
Mail list logo