Re: Python SOAP library

2012-05-10 Thread John
W dniu 2012-05-02 17:35, Alec Taylor pisze: Would you recommend: http://code.google.com/p/soapbox/ Or suggest another? I am having lots of fun and positive experience with https://github.com/arskom/rpclib Awesome doc and example code and, most importantly, it works! :) -- John -- http

Django/AppEngine DevSoup

2011-05-07 Thread John
I finish in a week? I don't want to deal with all of the other stuff. Will this come back to haunt me in 7 days? Yours frazzled, John -- http://mail.python.org/mailman/listinfo/python-list

How do I automatically download files from a pop up dialog using selenium-python?

2016-09-09 Thread John
Please help. Thanks. -- https://mail.python.org/mailman/listinfo/python-list

python list index - an easy question

2016-12-17 Thread John
f a list is indexed as "0". Doesn't x[1:5] mean a sub-list of x, indexed 1,2,3,4,5? If I am right, it should print [2,3,4,5,6]. Why does it print only [2,3,4,5]? Thanks!! John -- https://mail.python.org/mailman/listinfo/python-list

FS: PC Doctor

2005-01-03 Thread john
Bought from http://www.PCbeginner.com two weeks ago. Now my computer got fixed and I do not need it any more. Asking $15 only. I will ship to you by first class mail. Email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

FS: PC Doctor

2005-01-03 Thread john
Bought from http://www.PCbeginner.com two weeks ago. Now my computer got fixed and I do not need it any more. Asking $15 only. I will ship to you by first class mail. Email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Python HTTP digest authentication woes...

2005-07-16 Thread john
e: print "Error 401" print e.headers print e.headers['www-authenticate'] === I get 401 every time! This was taken from an example online almost verbatim, the only major thing I changed was HTTPBasicAuthHandler --> HTTPDigestAuthHandler. Any ideas or help would be greatly appreciated! Thanks, -John -- http://mail.python.org/mailman/listinfo/python-list

socket + file i/o question

2005-08-07 Thread John
I am sending a file on a tcp socket using the following code while 1: buf = os.read(fd, 4096) if not buf: break print total, len(buf) conn.send(b

Re: socket + file i/o question

2005-08-07 Thread John
Here is what the send and recieved number of bytes show up as: Filesize being sent = 507450 Server sending file to client... (total size sent , buffer size) ... 491520 4096 495616 4096 499712 4096 503808 3642 ./server.py: (107, 'Transport endpoint is not connected') On the client side, the bytes

Re: socket + file i/o question

2005-08-07 Thread John
I found the problem. There was a recv that was not from an open socket... Sorry abt the trouble, --j -- http://mail.python.org/mailman/listinfo/python-list

zipped socket

2005-08-07 Thread John
Is there anyway open a socket so that every send/listen/recv goes thru a zipping/unzipping process automatically? Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list

client server question

2005-08-11 Thread John
I have a simple script that runs a server where one client can connect. I would like to make it so that many clients can connect to one server on the same port. Where can I find how to do this? Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list

Re: client server question

2005-08-14 Thread John
Thanks a lot, I think I could modify this to get my work done. --j Chris Curvey wrote: > import threading > import logging > > ## > class Reader(threading.Thread): > def __init__(self, clientsock): > threading.Thread.__i

sizeof(long) from python

2005-09-04 Thread John
I want to know the sizeof(long) / sizeof(int) ... in C from python. (This is to read a set of numbers output from a C Code and can be machine dependent). Is there an easy way except writing a C program and parsing its output? Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list

Re: sizeof(long) from python

2005-09-04 Thread John
Thanks a lot, That solved my problem. --j -- http://mail.python.org/mailman/listinfo/python-list

help in simplification of code [string manipulation]

2005-09-13 Thread John
How could I simplify the code to get libs out of LDFLAGS or vice versa automatically in the following python/scons code? if sys.platform[:5] == 'linux': env.Append (CPPFLAGS = '-D__LINUX') env.Append (LDFLAGS = '-lglut -lGLU -lGL -lm') env.Append(CPPPATH=['include', 'incl

Re: help in simplification of code [string manipulation]

2005-09-13 Thread John
Thanks for your replies... Solved my problem. --j Christophe wrote: > John a écrit : > > How could I simplify the code to get libs out of LDFLAGS > > or vice versa automatically in the following python/scons code? > > > > if sys.platform[:5] == 'linux': >

Re: help in simplification of code [string manipulation]

2005-09-14 Thread John
But ur previous solution worked on my machine... although a friend tried it on his machine and the libraries were not found even if they existed! (Even the -lm was not found) Can you explain a bit why the previous solution worked? Thanks for ur help, --j -- http://mail.python.org/mailman/listi

Re: difference between class methods and instance methods

2005-02-17 Thread John
Steven Bethard wrote: John M. Gabriele wrote: 1. Are all of my class's methods supposed to take 'self' as their first arg? If by "class's methods" you mean methods on which you called classmethod, then no, they shouldn't take a 'self' parameter, th

Re: difference between class methods and instance methods

2005-02-17 Thread John
Duncan Booth wrote: John M. Gabriele wrote: I've done some C++ and Java in the past, and have recently learned a fair amount of Python. One thing I still really don't get though is the difference between class methods and instance methods. I guess I'll try to narrow it down to

Re: difference between class methods and instance methods

2005-02-17 Thread John
Diez B. Roggisch wrote: John wrote: ... hmm... bound methods get created each time you make a call to an instance method via an instance of the given class? No, they get created when you create an actual instance of an object. So only at construction time. Creating them means taking the unbound

Re: difference between class methods and instance methods

2005-02-17 Thread John
Duncan Booth wrote: [snip] Bound methods get created whenever you reference a method of an instance. If you are calling the method then the bound method is destroyed as soon as the call returns. You can have as many different bound methods created from the same unbound method and the same instan

Re: having troubleing finding package for Twisted 1.3 for Mac OS X 10.3.x

2005-02-18 Thread John
fuzzylollipop wrote: just got a Powerbook and need to do twisted development on it, but I can't find a simple straight foward instructions on installing Twisted 1.3 on it. Also the package manager at undefined.org has 1.1.0 and it doesn't work with 10.3.x ( pre-installed Python ) any help is welcom

running a python script in drpython

2005-03-13 Thread john
"", line 1 python test.py ^ SyntaxError: invalid syntax how do you run a script you create in the python interpreter? Thanks John -- http://mail.python.org/mailman/listinfo/python-list

Re: running a python script in drpython

2005-03-13 Thread john
john wrote: Haveing problems writeing a program then running it in python 2.3.5 interpreter. Called the program test.py used chmod to make it executable in linux #! /usr/bin/python print 2** 8 print 'the bright side ' + 'of life' >>> python test.py File

Re: Delphi underrated, IDE clues for Python

2004-11-30 Thread John
"Caleb Hattingh" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > thx, I already have and use PythonForDelphi (and am on the mailing list). > > It works very well indeed, my impression is that Python-Delphi connection > is even easier than Python-C integration (e.g. via SWIG,

Chrooted Python problem

2004-12-05 Thread John
Hello to all   I lately installed the python 2.3 and mod_python 2.7.10   My apache runs in a chrooted enviroment so i want to chroot pyton and mod_python as well.   I have copy the    /usr/local/apache/libexec/mod_python.so -> /chroot /usr/local/apache/libexec/mod_python.so   /usr/local/lib/

Re: Chrooted Python problem

2004-12-05 Thread John
        - Original Message - From: John To: [EMAIL PROTECTED] Sent: Sunday, December 05, 2004 9:10 PM Subject: Chrooted Python problem Hello to all   I lately installed the python 2.3 and mod_python 2.7.10   My apache runs in a chrooted enviroment so

My code won't work if I double click the saved file

2015-07-29 Thread john
I have windows 8 running on my computer and I think I downloaded python 2 and 3 simultaneously or I think my computer has built in python 2 and I downloaded python 3. And now when I ran my code in IDLE, the code works fine but when I save my program and double click the save file, it will run bu

py2app dependency determination?

2014-06-21 Thread john
Hi, trying to get py2app to work. It keeps saying that we need Pillow-PIL, which is wrong. And, anyways, Pillow-PIL fails to install. The program works fine as a normal python script, and it doesn't use Pillow- PIL. Any ideas? thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: py2app dependency determination?

2014-06-25 Thread john
Steven D'Aprano wrote: > On Sat, 21 Jun 2014 16:50:22 -0800, john wrote: > >> Hi, trying to get py2app to work. It keeps saying that we need >> Pillow-PIL, which is wrong. And, anyways, Pillow-PIL fails to install. >> >> The program works fine as a norma

Re: stackoverflow and c.l.py

2011-09-15 Thread john
On Sep 14, 4:58 pm, Steven D'Aprano wrote: > memilanuk wrote: > > On 09/14/2011 05:47 AM, Chris Angelico wrote: > >> The SNR here isn't bad either. Most of the spam gets filtered out, and > >> even stuff like Ranting Rick posts can be of some amusement when it's > >> a slow day... > > > I subscrib

Re: Microsoft Hatred FAQ

2005-12-18 Thread John
is polluted with this insecure, bomb prone OS. Could anyone not suicidal imagine trying to run the ISS, or a manned Lunar Base on MS Windows? Of course not. Humbly, John -- http://mail.python.org/mailman/listinfo/python-list

filling forms automatically generated using javascript

2006-11-21 Thread John
Is there an automatic way of filling forms that have been generated using javascript? I tried to use python+mechanize but am having trouble with javascript forms. This is the way the form is created: Thanks in advance for your help, --j -- http://mail.python.org/mailman/listinfo/python-lis

cache line length of a machine

2007-01-04 Thread John
How do I find out the cache line length of a machine in python? Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list

testing for existence of compilers/executables

2006-03-05 Thread John
I am working with my build system using scons. I would like to test the existence of 'doxygen' or any other compiler/executable in the path (like gcc/icc/...) What is the most efficient way to find this out using python? using scons? Is there a way to list all C/C++/fortran compilers available on

descriptor dilemma

2005-05-04 Thread john
'].__get__(c,C) True >>> c.f is C.__dict__['f'].__get__(c,C) False Why do c.f and C.__dict__['f'].__get__(c,C) compare as equal under == but not under *is* ? Thanks, John -- http://mail.python.org/mailman/listinfo/python-list

High resolution sleep (Linux)

2007-05-04 Thread John
The table below shows the execution time for this code snippet as measured by the unix command `time': for i in range(1000): time.sleep(inter) inter execution time ideal 0 0.02 s0 s 1e-44.29 s0.1 s 1e-3

Re: High resolution sleep (Linux)

2007-05-10 Thread John
On 9 Maj, 03:23, John Nagle <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Tim Roberts" <[EMAIL PROTECTED]> wrote" > > It is also possible to keep the timer list sorted by "expiry date", > > and to reprogram the timer

Re: Call for advice on how to start PyOpenGL!

2007-08-21 Thread John
round that might be useful: http://www.milliwatt-software.com/jmg/files/pyopengl_template.py ---John -- http://mail.python.org/mailman/listinfo/python-list

Is numeric keys of Python's dictionary automatically sorted?

2007-03-07 Thread John
I am coding a radix sort in python and I think that Python's dictionary may be a choice for bucket. The only problem is that dictionary is a mapping without order. But I just found that if the keys are numeric, the keys themselves are ordered in the dictionary. part of my code is like this: ra

Re: Is numeric keys of Python's dictionary automatically sorted?

2007-03-07 Thread John
Then is there anyway to sort the numeric keys and avoid future implemetation confusion? "Ant" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mar 7, 8:18 pm, "John" <[EMAIL PROTECTED]> wrote: > ... >> However, I am not sure

any better code to initalize a list of lists?

2007-03-08 Thread John
For my code of radix sort, I need to initialize 256 buckets. My code looks a little clumsy: radix=[[]] for i in range(255): radix.append([]) any better code to initalize this list? -- http://mail.python.org/mailman/listinfo/python-list

Re: any better code to initalize a list of lists?

2007-03-08 Thread John
I want to radix sort non-negative integers that can fit into 32-bits. That will take 4 passes, one for each byte. So, I will need 256 "buckets" The list radix of 256 elements of list is good for this purpose. Your code is much shorter, works and probably takes less time. Thanks! Jo

How to calculate a file of equations in python

2007-03-19 Thread John
Hi, I have a text file which contains math expression, like this 134 +234 +234 (i.e. an operation (e.g. '+) and then a number and then a new line). Can you please tell me what is the easiest way to calculate that file? for example the above example should be = 134 + 234 + 234 = 602. Thank you.

Video sharing social network Teenwag seeks great Python hackers we ll wear Python T-shirts at startupschool

2007-03-23 Thread John
Video sharing social network Teenwag seeks great Python hackers we ll wear Python T-shirts at startup school $100K $5K sign on $2k referral http://www.teenwag.com/showvideo/352 -- http://mail.python.org/mailman/listinfo/python-list

how to check the 'content/type' using urlopen

2007-04-15 Thread John
i have the following code to open a URL address, but can you please tell me how can I check the content type of the url response? Thank you. try: req = Request(url, txdata, txheaders) handle = urlopen(req) except IOError, e: print e print 'Failed to open %s'

unittest assertRaises Problem

2007-04-16 Thread john
help appreciated. Thanks, John -- http://mail.python.org/mailman/listinfo/python-list

Re: unittest assertRaises Problem

2007-04-16 Thread john
On Apr 16, 6:35 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On 16 Apr 2007 15:13:42 -0700, john <[EMAIL PROTECTED]> wrote: > > > > >All: > > >Hi. I am an experienced developer (15 yrs), but new to Python and have > >a question re unit

Cross platform way of finding number of processors on a machine?

2007-10-04 Thread John
Is there a way to find the number of processors on a machine (on linux/ windows/macos/cygwin) using python code (using the same code/cross platform code)? -- http://mail.python.org/mailman/listinfo/python-list

Re: setuptools without unexpected downloads

2007-10-07 Thread John
es arg, and then try to install what's listed there using their own system's package management software. I'm not exactly sure what the --no-deps arg to easy_install does. Does it force the named package to install without its dependencies, or does it give a package listing and then bail out without installing anything? The docs don't seem to specify. ---John -- http://mail.python.org/mailman/listinfo/python-list

Threaded for loop

2007-01-13 Thread John
I want to do something like this: for i = 1 in range(0,N): for j = 1 in range(0,N): D[i][j] = calculate(i,j) I would like to now do this using a fixed number of threads, say 10 threads. What is the easiest way to do the "parfor" in python? Thanks in advance for your help, --j -- http://ma

Re: Threaded for loop

2007-01-13 Thread John
Damn! That is bad news. So even if caclulate is independent for (i,j) and is computable on separate CPUs (parts of it are CPU bound, parts are IO bound) python cant take advantage of this? Surprised, --Tom Paul Rubin wrote: > "John" <[EMAIL PROTECTED]> writes: > > I

Re: Threaded for loop

2007-01-13 Thread John
Damn! That is bad news. So even if caclulate is independent for (i,j) and is computable on separate CPUs (parts of it are CPU bound, parts are IO bound) python cant take advantage of this? Surprised, --j Paul Rubin wrote: > "John" <[EMAIL PROTECTED]> writes: > > I want

Re: Threaded for loop

2007-01-13 Thread John
Thanks. Does it matter if I call shell commands os.system...etc in calculate? Thanks, --j [EMAIL PROTECTED] wrote: > John wrote: > > I want to do something like this: > > > > for i = 1 in range(0,N): > > for j = 1 in range(0,N): > >D[i][j] = calculate(i,

html + javascript automations = [mechanize + ?? ] or something else?

2007-01-15 Thread John
I have to write a spyder for a webpage that uses html + javascript. I had it written using mechanize but the authors of the webpage now use a lot of javascript. Mechanize can no longer do the job. Does anyone know how I could automate my spyder to understand javascript? Is there a way to control a

Re: html + javascript automations = [mechanize + ?? ] or something else?

2007-01-15 Thread John
I am curious about the webbrowser module. I can open up firefox using webbrowser.open(), but can one control it? Say enter a login / passwd on a webpage? Send keystrokes to firefox? mouse clicks? Thanks, --j John wrote: > I have to write a spyder for a webpage that uses html + javascript

installing/maintaining modules for multiple versions of python

2007-01-15 Thread John
I have a suse box that has by default python 2.4 running and I have a 2.5 version installed in /reg/python2.5. How do I install new modules for only 2.5 without disturbing the 2.4 default installation. Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list

Re: html + javascript automations = [mechanize + ?? ] or something else?

2007-01-21 Thread John
at is different from cygwin's python? Thanks, --j ina wrote: > John wrote: > > I have to write a spyder for a webpage that uses html + javascript. I > > had it written using mechanize > > but the authors of the webpage now use a lot of javascript. Mechanize > > can no

Re: html + javascript automations = [mechanize + ?? ] or something else?

2007-01-21 Thread John
My python2.5 installation on windows did not come with "win32com". How do I install/get this module for windows? Thanks, --j Duncan Booth wrote: > "John" <[EMAIL PROTECTED]> wrote: > > > Is there a way > > to control a browser like firefox from

Re: html + javascript automations = [mechanize + ?? ] or somethingelse?

2007-01-21 Thread John
ideas? Thanks, --j Gabriel Genellina wrote: > "John" <[EMAIL PROTECTED]> escribió en el mensaje > news:[EMAIL PROTECTED] > > > My python2.5 installation on windows did not come with "win32com". > > How do I install/get this module for windows? >

class explorer for automating IE

2007-01-21 Thread John
I found this class which was written in 2003. http://xper.org/wiki/seminar/InternetExplorerAutomation Is there a better/more complete version around that someone knows of. Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list

Re: class explorer for automating IE

2007-01-21 Thread John
Is there an analogue of IE Mechanize in python? http://search.cpan.org/src/ABELTJE/Win32-IE-Mechanize-0.009/README Thanks, --j On Jan 22, 1:48 am, "John" <[EMAIL PROTECTED]> wrote: > I found this class which was written in 2003. > > http://xper.org/wiki/seminar/I

Re: class explorer for automating IE

2007-01-22 Thread John
The problem is that this does not run javascript code it seems. I got started with pamie, which seems to work till now. Thanks, --j On Jan 22, 2:42 am, Peter Otten <[EMAIL PROTECTED]> wrote: > John wrote: > > Is there an analogue of IE Mechanize in > > python?http://ww

Can somebody give me a python code for this?

2007-02-07 Thread John
Given an array of elements, look at it as a binary tree. Start at the last interior node, and downheap it. Then downheap the previous interior node, and continue in this fashion, up to the root. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can somebody give me a python code for this?

2007-02-07 Thread John
I solved it myself. Don't bother. "John" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Given an array of elements, look at it as a binary tree. Start at the last > interior node, and downheap it. Then downheap the previous interior node, > and c

Re: Newbie Question

2007-02-08 Thread John
Visual Basic is also good. "Reid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all > > I am just starting to play with programing again as a hobby. I have heard > good things about python. I have not really looked into the language much. > My question is, will python make p

How to covert ASCII to integer in Python?

2007-02-22 Thread John
Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread John
I just found ord(c), which convert ascii to integer. Anybody know what the reverse is? "John" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there any built in function that converts ASCII to integer or vice versa > in Python? > > Thanks! >

What is the best queue implemetation in Python?

2007-02-22 Thread John
I want to write a code for Breadth First Traveral for Graph, which needs a queue to implement. I wonder that for such a powerful language as Python, whether there is a better and simpler implementation for a traditional FIFO queue? Thanks! -- http://mail.python.org/mailman/listinfo/python-lis

Re: What is the best queue implemetation in Python?

2007-02-22 Thread John
Than C or PASCAL I mean, list or dictionary in Python are so powerful than the traditional array. Maybe I can make use of it? "John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Feb 23, 11:12 am, "John" <[EMAIL PROTECTED]> wrote: >

Re: How to output newline or carriage return with optparse

2007-11-08 Thread John
On Nov 8, 12:40 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > Thanks for the help Tim. I just copied and pasted your code into a > > file in my $PYTHONPATH (IndentedHelpFormatterWithNL.py), but I'm > > getting the following error: > > > class IndentedHelpFormatterWithNL(IndentedHelpFormatter):

Re: python from any command line?

2007-12-09 Thread john
t displayed in the Variable Value box. BW, John -- http://mail.python.org/mailman/listinfo/python-list

popen3 on windows

2006-04-28 Thread John
Hello. Can anyone tell me how to get p.poll() or a workaound to work when using popen3() on windows? I use python 2.3. I am trying to launch a command window to execute a command and then check periodically to see if the command has finished executing. If it has not finished after a given am

printing dots in simple program while waiting

2008-01-09 Thread John
Ok, so this should be a really simple thing to do, but I haven't been able to get it on the first few tries and couldn't find anything after searching a bit. what i want to do is print a 'waiting' statement while a script is working-- the multithreading aspect isn't an issue, the printing on the s

Re: printing dots in simple program while waiting

2008-01-09 Thread John
On Jan 9, 11:56 am, Martin Marcher <[EMAIL PROTECTED]> wrote: > John wrote: > > import time > > s = '.' > > print 'working', # Note the "," at the end of the line > > while True: > > print s > > time.sleep(1) >

Re: printing dots in simple program while waiting

2008-01-09 Thread John
L PROTECTED] > > Subject: Re: printing dots in simple program while waiting > > > John wrote: > > > > import time > > > s = '.' > > > print 'working', # Note the "," at the end of the line > > > while True: > &

matplotlib install error

2008-02-07 Thread John
I'm trying to install matplotlib and currently getting the below error. I searched the group and google and couldn't find anything similar... Any ideas? Thanks in advance! src/ft2font.cpp: In member function 'Py::Object Glyph::get_path(FT_FaceRec_* const&)': src/ft2font.cpp:441: error: 'FT_CURVE

Re: matplotlib install error

2008-02-08 Thread John
> Is thate really all of the error? It hints on a missing include, which > will be mentioned earlier. > > Diez platform: linux2 REQUIRED DEPENDENCIES numpy: 1.0.3.1 freetype2: found, but unknown version (no pkg-config) OPTIONAL BACKEND DEPENDENCIES

Topographical sorting

2008-02-11 Thread John
I'm working on a project involving the topographical sorting of partially ordered sets (posets), using the poset (S, |), where S is the set of integers <= n. Ultimately, I need to determine all possible topographical sorts for whatever n happens to be. This requires me to be able to build the order

Re: Reading text file with wierd file extension?

2009-02-02 Thread john
you've closed DataFH and letting the outer layers deal > > > with it in a more appropriate fashion. > > > > Incidentally, this code isn't going to do anything useful > > > for you anyway even after you've fixed the typo.  DataFH > > > and ResourceFH are both local variables to __init__ and > > > will be tossed away when it finishes executing.  If you > > > want to use them later, make them self.data_fh and > > > self.resource_fh respectively. > > > > (PEP 8 recommends that you use lower_case_with_underscores > > > for variable or attribute names, and leave MixedCase for > > > class names.) > > > > -- > > > Rhodri James *-* Wildebeeste Herder to the Masses- Hide quoted text - > > > > - Show quoted text - > > > Very good comments. I'll be implementing some of your suggestions, to > > be sure. Thanks Rhodri. > > You could check to see if the file actually exists using os.path.exists > (). I've found that if I use that in combination with printing the > path variable, I sometimes discover that either my file doesn't exist > or that my path is slightly wrong and thus Python doesn't think my > file exists... > > Mike It's weird, right? But thanks to Grant and Rhodri, from another newbie (me) and to everyone else who helps us out. John (the "how to ask questions" text is priceless) -- http://mail.python.org/mailman/listinfo/python-list

importing a class thru a variable?

2008-10-21 Thread john
Hi, This is probably a question of questionable sanity, due to the fact I don't think I can explain this well. I'd like to have a script set up such that it imports a class that is named in the command line arguments as the first argument to the script. Let's say I have a script, command.py, and I

Re: can't install new modules after updating python

2009-04-18 Thread John
On Apr 18, 9:00 am, a...@pythoncraft.com (Aahz) wrote: > In article > , > > Generally speaking, you should never directly update the system Python; > most Linux systems these days rely on Python for their operation. > Instead, you install an additional copy of Python, and you cannot use > your OS

Re: iterate to make multiple variables?

2009-04-20 Thread john
On Apr 19, 11:11 pm, Tairic wrote: > Hi, I'm somewhat new to programming and especially to python. Today I > was attempting to make a sudoku-solver, and I wanted to put numbers > into sets call box1, box2, ... box9, so that I could check new values > against the boxes > > I ended up declaring the

Re: iterate to make multiple variables?

2009-04-20 Thread john
On Apr 19, 11:11 pm, Tairic wrote: > Hi, I'm somewhat new to programming and especially to python. Today I > was attempting to make a sudoku-solver, and I wanted to put numbers > into sets call box1, box2, ... box9, so that I could check new values > against the boxes > > I ended up declaring the

What is the difference between init and enter?

2009-05-26 Thread John
I'm okay with init, but it seems to me that enter is redundant since it appears that anything you want to execute in enter can be done in init. -- http://mail.python.org/mailman/listinfo/python-list

so funny...

2008-05-29 Thread John
http://sitscape.com/topic/funny Just keep hit the "Surprise->" button there for amazing fun. Click on "channel" will show you other topics, lots of fun! -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] python gui

2008-06-11 Thread john
W W wrote: > On Wed, Jun 11, 2008 at 10:18 AM, Gabriela Soares > <[EMAIL PROTECTED]> wrote: > > How ? > > That's an extremely broad question, and shows little initiative, and > offers little information. Most of us are happy to help you solve > problems for free, but few, if any, are willing to wri

newbie question

2008-04-25 Thread John
I'm working with the HTMLParser module and have implemented HTMLParser.handle_starttag() and I see there is a separate handle_data method (which can be implemented), but I am not clear how to tie this together with a given start tag, so I only get the data I want. For example, I'd like to get a ha

Re: newbie question

2008-04-25 Thread John
Thanks for the tip! -- http://mail.python.org/mailman/listinfo/python-list

F2PY changing integers to arrays???

2008-09-09 Thread john
I have a simple module which performs basic operations on plot3d files (below). I wrapped like: f2py --fcompiler=gfortran -m plot3d -c prec.f90 plot3d.f90 That seems to work fine, but i get some unexpected results... >>> from plot3d import plot3d as p3 >>> dir(p3) ['imax', 'jmax', 'kmax', 'mg',

Re: F2PY changing integers to arrays???

2008-09-09 Thread john
Hmmm... I didn't even try that... I thought this might have caused problems down the road passing this var to other classes, etc., but i guess not! Thanks. -- http://mail.python.org/mailman/listinfo/python-list

catching exceptions from fortran

2008-09-11 Thread john
I wrapped some fortran code using F2PY and need to be able to catch fortran runtime errors to run the following: # "grid" is a wrapped fortran module # no runtime errors incurred when run with the correct inputs for filetype #--- def readGrid( self, coord='xyz'

sending a text message via webpage button

2006-03-07 Thread John
Can anyone help me in coding a script that can send a text message typed to the script like. sendmessage 6318019564 "test message" What I want to do is fill up this information on this webpage http://www.cingularme.com/do/public/send;jsessionid=aKDwXM1S0Reh and click the submit button using the

counting number of (overlapping) occurances

2006-03-09 Thread John
I have two strings S1 and S2. I want to know how many times S2 occurs inside S1. For instance if S1 = "" and S2 = "AA" then the count is 3. Is there an easy way to do this in python? I was trying to use the "count" function but it does not do overlapping counts it seems. Thanks, --j -- ht

Re: counting number of (overlapping) occurances

2006-03-09 Thread John
Thanks a lot, This works but is a bit slow, I guess I'll have to live with it. Any chance this could be sped up in python? Thanks once again, --j -- http://mail.python.org/mailman/listinfo/python-list

instantiate a class with a variable

2006-03-27 Thread John
Hi, is it possible to instantiate a class with a variable. example class foo: def method(self): pass x='foo' Can I use variable x value to create an instance of my class? Thanks, John -- http://mail.python.org/mailman/listinfo/python-list

Re: instantiate a class with a variable

2006-03-28 Thread John
Thanks for the help, this was exactly what I needed. Working Great bruno at modulix wrote: > John wrote: > > Hi, is it possible to instantiate a class with a variable. > > > > example > > > > class foo: > > def method(self): > > pass >

Python (and me) getting confused finding keys

2009-12-22 Thread John
Hi there, I have a rather lengthy program that troubles me for quite some time. After some debugging, I arrived at the following assertion error: for e in edges.keys(): assert edges.has_key(e) Oops!? Is there ANY way that something like this can possibly happen? Cheers, John -- http

Re: Python (and me) getting confused finding keys

2009-12-22 Thread John
before, and no obscure functions have been called in the meantime, just some adding to edges). Python would also fail on edges.keys() if edges wasn't a dict... cheers, john -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >