tead of "localhost" ?
>
> I'm kind of new to client/server programming, so I'm at a loss here.
> Thank you very much for your attention.
>
> Jose Carlos.
>
>
>
>
>
> 2006/4/12, John Abel <[EMAIL PRO
Your server is only listening on 127.0.0.1.
Jose Carlos Balderas Alberico wrote:
> Up till now I've been setting up my server and client in the same
> machine, using the "localhost" address for everything.
> Once I've made it work, I need to move my client application to the
> computer where it'
Here's one I used a while back. Returns a dict containing details per
partition
def _getAvailPartitions():
validTypes = [ 'ufs', 'nfs', 'reiserfs' ]
mntTab = file( '/etc/mtab', 'r' )
drvDetails = {}
for mntLine in mntTab:
splitLine = mntLine.split()
Have a look on:
http://xml.com/pub/a/98/10/guide0.html?page=4#WELLFORMED
Explains it better then I can.
J
Gregory Piñero wrote:
> What do you mean by well-formed? What is required to make XML well
> formed?
>
> -Greg
>
>
> On 10/26/05, *John Abel* <[EMAIL PROTECTED]
Try this page:
http://docs.python.org/lib/module-xml.sax.saxutils.html
I've just tried the code, taking out the , and adding in the belo,
as the XML is not well formed, otherwise.
The code then works.
HTH
J
Gregory Piñero wrote:
> Should I try some sort of XML group instead? I'm still s
[EMAIL PROTECTED] wrote:
>Hello All,
>
>I have a problem with the program that should generate x number of txt
>files (x is the number of records in the file datafile.txt).
>
>Once I execute the program (see below) only one file (instead of x
>files) is created. The file created is based on the la
dcrespo wrote:
>Hi all,
>
>Anyone knows a simpler but stronger control access to XML-RPC functions
>than the one I comment here?
>
>My actual system works like this:
>
>I have a TCP Server and an XML-RPC Server. Both of them verify if the
>IP address is allowed.
>
>The TCP Server works for validat
[EMAIL PROTECTED] wrote:
>John Abel wrote:
>
>
>>Hi,
>>
>>I'm running Python 2.3.5/2.4.2 on OSX 10.4.2, and am trying to run CGI
>>scripts using the builtin Apache. For ease, I've symlinked my custom
>>modules into the /Library/Python/2.3/
Hi,
I'm running Python 2.3.5/2.4.2 on OSX 10.4.2, and am trying to run CGI
scripts using the builtin Apache. For ease, I've symlinked my custom
modules into the /Library/Python/2.3/site-packages directory, and they
import OK via command line python. However, when I perform the import
from a
Fredrik Lundh wrote:
>John Abel wrote:
>
>
>
>>def _importModule( moduleName ):
>>modName = __import__ ( moduleName )
>>modComponents = moduleName.split( '.' )
>>for indivComp in modComponents[ 1: ]:
>>modName =
Try:
userModule = _importModule( pathToModule )
def _importModule( moduleName ):
modName = __import__ ( moduleName )
modComponents = moduleName.split( '.' )
for indivComp in modComponents[ 1: ]:
modName = getattr( modName, indivComp )
return modName
HTH,
J
Joerg Schust
John Abel wrote:
>Hi,
>
>I implemented a SimpleXMLRPCServer, modified it slightly to restrict
>clients based on their IP, but I need to take it a stage further, and
>add user authentication. I would appreciate any pointers as to how I
>might go about this, or any pack
Hi,
I implemented a SimpleXMLRPCServer, modified it slightly to restrict
clients based on their IP, but I need to take it a stage further, and
add user authentication. I would appreciate any pointers as to how I
might go about this, or any packages which already provide this. I'm
guessing th
Have you downloaded the pilfonts.zip from effbot.org?
J
phil hunt wrote:
>I am trying to generate some images (gifs or pngs) with text in
>them. I can use the Python Imaging Library, but it only has access
>to the default, rather crappy, font.
>
>Ideally I'd like to use one of the nicer fonts
windozbloz wrote:
>Bye Bye Billy Bob...
>
>Hello All,
>I'm a fairly literate windoz amateur programmer mostly in visual basic. I
>have switched to SuSE 9.2 Pro and am trying to quickly come up to speed
>with Python 2.3.4. I can run three or four line scripts from the command
>line but have not be
harold fellermann wrote:
>
>so, if I understand you right, what you want to have is a list of
>mutable objects, whose value you can change without changing the
>objects'
>references.
>
>
Yes!
>class Proxy :
> def __init__(self,val) : self.set(val)
> def set(self,val) : self.val = v
>have been declared before being used in the list. Basically, I'm after
>the Python way of using deferencing.
>
>
OK, that should say dereferencing.
J
--
http://mail.python.org/mailman/listinfo/python-list
harold fellermann wrote:
>Hi,
>
>
>
>>I have a list of variables, which I am iterating over. I need to set
>>the value of each variable. My code looks like:
>>
>>varList = [ varOne, varTwo, varThree, varFour ]
>>
>>for indivVar in varList:
>>indivVar = returnVarFromFunction()
>>
>>However,
Hi,
I have a list of variables, which I am iterating over. I need to set
the value of each variable. My code looks like:
varList = [ varOne, varTwo, varThree, varFour ]
for indivVar in varList:
indivVar = returnVarFromFunction()
However, none of the variables in the list are being set.
Jeffrey Maitland wrote:
>when running scripts they seem to work fine on ia-32 but I get
>segfault on ia-64 what the heck should I be looking for?
>
>I did notice that it seems to work ok only for certain scripts but any
>script that imports MySQLdb or glob seems to make this occur.
>
>Thanks Jeff
Andreas Heiss wrote:
>John Abel wrote:
>
>
>
>>Andreas Heiss wrote:
>>
>>
>>
>>>Hi !
>>>I am trying to build python 2.4.1 from source on a Linux system.
>>>Everything seems fine, but tkinter seems not to work.
>>>T
Andreas Heiss wrote:
>Hi !
>I am trying to build python 2.4.1 from source on a Linux system.
>Everything seems fine, but tkinter seems not to work.
>The file _tkinter.pyd is missing.
>How can tell configure to build all necessary components ?
>
>Thanks
>Andreas
>
>
It looks to like Tcl/Tk is no
Philippe C. Martin wrote:
>Thank you all for your answers.
>
>A pure Python would have beenmy first choice. yet I now feel I should spend
>some time looking at PySQLite (I like the fact it's pre-compiled for
>Windows).
>
>Thanks.
>
>Philippe
>
>
>
>Philippe C. Martin wrote:
>
>
>
>>Hi,
>>
>>I am
Just thought of a couple more:
SnakeSQL
KirbyBase
J
John Abel wrote:
>Gadfly
>PySQLite ( requires SQLite library )
>
>J
>
>Philippe C. Martin wrote:
>
>
>
>>Hi,
>>
>>I am looking for a stand-alone (not client/server) database solution for
>&g
Gadfly
PySQLite ( requires SQLite library )
J
Philippe C. Martin wrote:
>Hi,
>
>I am looking for a stand-alone (not client/server) database solution for
>Python.
>
>1) speed is not an issue
>2) I wish to store less than 5000 records
>3) each record should not be larger than 16K
>
>
>As I start w
Negroup wrote:
>Hi, first of all sorry for boring you with a such simple request. I'm
>using Python since few days, and I like it even if I'm not yet in
>confidence. I'd like to organize my programs in hierarchical
>structures, thus I thought that packages could be the solution,
>however I have so
JZ wrote:
>Dnia Fri, 10 Jun 2005 14:57:21 +0100, John Abel napisał(a):
>
>
>
>>$testVar =~ s#/mail/.*$##g
>>
>>The only way I can think of doing it, is:
>>
>>mailPos = testVar.find( "mail" )
>>remainder = testVar[ :mailPos ]
>>
Does anyone know of a quick way of performing this:
$testVar =~ s#/mail/.*$##g
The only way I can think of doing it, is:
mailPos = testVar.find( "mail" )
remainder = testVar[ :mailPos ]
Any ideas would be appreciated. I'm iterating over a lot of entries,
and running these lines for each entr
Jesse Noller wrote:
>Hello -
>
>I am looking at implementing a simple SMTP server in python - I know
>about the smtpd module, but I am looking for code examples/snippets as
>the documentation is sparse.
>
>The server I am looking at writing is really simple - it just needs to
>fork/thread appropri
Magnus Lycka wrote:
>John Abel wrote:
>
>
>>Magnus Lycka wrote:
>>
>>
>
>
>
>>As a programmer on Win32, and *nix platforms, I agree with needing
>>better tools. however, I find cygwin a pita. For tools such as grep
>>and find, t
Magnus Lycka wrote:
>Terry Reedy wrote:
>
>
>>This should REALLY be on the doc page of the Python site.
>>
>>
>Agreed.
>
>
>
>>It is really time to stop pretending that the only Python users
>>that count have a *nix on their desk.
>>
>>
>I agree with this too, but if you're a program
Trent Mick wrote:
>Today ActiveState is announcing support for Mac OS X. I'm happy to
>announce that ActivePython 2.4.1 for Mac OS X is now available for free
>download from:
>
>http://www.ActiveState.com/Products/ActivePython/
>
>This brings the number of free ActivePython platforms to four
Bloke wrote:
>I've been trying to find a Python tutorial on threading - does anyone
>have a reference?
>
>Rob
>
>
>
You could try this:
http://heather.cs.ucdavis.edu/~matloff/Python/PyThreads.pdf
J
--
http://mail.python.org/mailman/listinfo/python-list
Shane Hathaway wrote:
>Mike Meyer wrote:
>
>
>>On a completely different topic, this looks like the wrong way to solve
>>the problem. You want to update a search engine based on changes to the
>>underlying file system. The right way to do this isn't to just keep
>>rescanning the file system, it'
Paul Rubin wrote:
> If verify_request is finished before the new thread starts, then I'd
>
>think it could set a flag and the new thread could find it. You get a
>race condition only if both threads are trying to mess with the flag
>simultaneously.
>
>
Hmm, I think you're right. Thanks!
J
--
John Abel wrote:
>Shane Hathaway wrote:
>
>
>
>>Mike Meyer wrote:
>>
>>
>>
>>
>>>On a completely different topic, this looks like the wrong way to solve
>>>the problem. You want to update a search engine based on changes to the
Shane Hathaway wrote:
>Mike Meyer wrote:
>
>
>>On a completely different topic, this looks like the wrong way to solve
>>the problem. You want to update a search engine based on changes to the
>>underlying file system. The right way to do this isn't to just keep
>>rescanning the file system, it'
Paul Rubin wrote:
>John Abel <[EMAIL PROTECTED]> writes:
>
>
>>OK, I'm guessing what I was after ( see below ) isn't possible. Does
>>anyone know of an easy way of having verify_request inform the request
>>handler of certain events, say client is un
dler class (
self.server.hostAllowed for example ), but that wouldn't work quite
right in a threaded server.
Any ideas?
J
Original Message
Subject:ReWrite Request Within SocketServer?
Date: Wed, 25 May 2005 17:04:53 +0100
From: John Abel <[EMAIL PROTECTED]>
To: python-
bruno modulix wrote:
>Paul McNett wrote:
>
>
>>Sriek wrote:
>>
>>
>>
>(snip)
>
>
>>>Similarly, why do we have to explicitly use the 'self' keyword
>>>everytime?
>>>This is closer to a wart, IMO,
>>>
>>>
>
>
>
Here's one of the shorter threads discussing 'self'. I remember one
lo
Hi!
I may be missing something simple, but is there a way to have
verify_request change the request before it gets processed by the
RequestHandlerClass?
Regards
J
--
http://mail.python.org/mailman/listinfo/python-list
gsteff wrote:
>Hey, I'm working on a Python program that will launch some other
>non-Python process using os.spawn (in the os.P_NOWAIT mode) and then
>basically wait for it to finish (while doing some other stuff in the
>interim). Normally, the new process will signal that it's done by
>writing t
Mike Meyer wrote:
>John Abel <[EMAIL PROTECTED]> writes:
>
>
>
>>Hi!
>>
>>I'm currently writing a script which launches external programs, but
>>it keeps leaving zombie/defunct processes behind, until I kill the
>>launching script, which
praba kar wrote:
>Dear All,
>
> Is it possible to send a message as a mail
>with out smtplib module? If you find out any module
>for mail sending(without smtplib) kindly mail me.
>
>regards
>Prabahar
>
>
>
>Yahoo! In
Hi!
I'm currently writing a script which launches external programs, but it
keeps leaving zombie/defunct processes behind, until I kill the
launching script, which is a bit of a pain, as it's supposed to be a
daemon. The code I'm using is:
newPid = subprocess.Popen( cmdLine[ 1: ], executable=
Sara Khalatbari wrote:
>Is there a Module in Python that gives you the time &
>date of today???
>
>
>
>
>__
>Do you Yahoo!?
>Make Yahoo! your home page
>http://www.yahoo.com/r/hs
>
>
time - http://docs.python.org/lib/module-time.html
datetime - h
Matthew Thorley wrote:
>I'm writing a web app whereby a user uploads a tar acrhive which is then
>opened and processed. My web form reads the file like this:
>
>while 1:
>data = value.file.read(1024 * 8) # Read blocks of 8KB at a time
>if not data: break
>
>which leaves me with data as a s
try:
import os
myPID = os.getpid()
So you can kill it at a later date, it would be worth writing that out
to a file somewhere - C:\temp? I'm sure you can get a kill command for
Win32.
HTH
J
Harlin Seritt wrote:
Let's say I have a simple script on Windows NT. I would like for that
script to find
te:
On Mar 31, 2005 9:20 AM, John Abel <[EMAIL PROTECTED]> wrote:
What OS? Linux? Solaris?
Does it matter? If so, please explain why ( lack of knowledge )
I am using Linux ( Debian Surge )
Thanks
J
Roman Yakovenko wrote:
Hi. I have small problem. I need to load extension mod
What OS? Linux? Solaris?
J
Roman Yakovenko wrote:
Hi. I have small problem. I need to load extension module that depends
on shared library. Before actually importing module I tried to edit
os.environ or to call directly to os.putenv without any success -
shared library was not found. I tried to s
Never mind, sorted now.
On 18 Feb 2005, at 15:10, John Abel wrote:
Read/tried that before posting. Even with a flush, everything hangs
until I kill the client.
Irmen de Jong wrote:
John Abel wrote:
I'm hoping this is something simple, and someone can point me in the
right direction her
Read/tried that before posting. Even with a flush, everything hangs
until I kill the client.
Irmen de Jong wrote:
John Abel wrote:
I'm hoping this is something simple, and someone can point me in the
right direction here. I have a class based on SocketServer
(ThreadingTCPServer), and
I'm hoping this is something simple, and someone can point me in the
right direction here. I have a class based on SocketServer
(ThreadingTCPServer), and I've used makefile on the socket so I use the
"for in " routine. My client sends it a small amount of data. However,
both programs appear
If you're after a simple FTP server, have a look at medusa.
Regards
John
[EMAIL PROTECTED] wrote:
What's the simplest way to write an FTP Server in Python?
A short research on the newsgroup and on the Cookbook did not
bring out anything relevant (but I hear a little voice in the
back of my head say
[EMAIL PROTECTED] wrote:
If you're after a simple FTP server, have a look at medusa.
Uhm ... Medusa does not seem actively maintained nowadays.
M.S.
AFAIK, it's maintained to the extent, that if you find bugs/enhance it
and let the medusa-dev list know, it more than likely will get fi
55 matches
Mail list logo