I have created a server and client that communicate via a TCP socket
connection. Everything runs great on 6 of the 6 boxes. However, when
I installed Sun's VirtualBox on one of the PC's I started getting:
error: (10061, 'Connection refused')
I tried restarting, stopping services, checking out a
On Feb 12, 10:23 am, Tim Chase wrote:
> > If you subscribe to C.P.L as a mailing list instead of a
> > newsgroup, I believe most of the spam gets filtered out at the
> > mailing list<->news group gateway by the Python.org spam
> > filters... At least no spam in my Gmail spam folder appears to
> >
Ok... for some closure I have written a class to automate the
process. It takes getters and setters and deleters and then sets the
property automatically. Sweet!
class AutoProperty(type):
def __new__(cls, name, bases, methoddict):
processed = []
getter =
On Feb 12, 9:27 am, josh logan wrote:
> On Feb 12, 10:58 am, TechieInsights wrote:
>
>
>
> > Oh... one other thing that would be really cool is to do this with AOP/
> > descriptors! I just haven't been able to get that to work either.
> > Basics...
>
On Feb 12, 9:19 am, Michele Simionato
wrote:
> On Feb 12, 5:07 pm, TechieInsights wrote:
>
> > On Feb 12, 9:03 am, Catherine Heathcote
>
> > wrote:
> > > But I just cant find it. How do I do an or, as in c/c++'s ||? Just
> > > trying to do something
On Feb 12, 9:03 am, Catherine Heathcote
wrote:
> But I just cant find it. How do I do an or, as in c/c++'s ||? Just
> trying to do something simple, the python equivilent of:
>
> if(i % 3 == 0 || i % 5 == 0)
>
> Thanks.
in 2.5 and above you can do
if any(i%3 == 0, i%5 == 0)
--
http://mail.python.
On Feb 12, 9:03 am, Catherine Heathcote
wrote:
> But I just cant find it. How do I do an or, as in c/c++'s ||? Just
> trying to do something simple, the python equivilent of:
>
> if(i % 3 == 0 || i % 5 == 0)
>
> Thanks.
if i % 3 == 0 or i % 5 == 0
--
http://mail.python.org/mailman/listinfo/pyth
Oh... one other thing that would be really cool is to do this with AOP/
descriptors! I just haven't been able to get that to work either.
Basics...
@readonly
class MyClass(object):
def __init__(self, x):
self.set_x(x)
def get_x(self):
return self._
Ok, so I noticed some of the modules (such as many of the datetime
attributes) are read-only, which means the __setattr__ and __set__
methods are intercepted... pretty easy. I am looking for a way to
automate this. The real goal is not to have read only attributes, but
to have getters and setters
I am having problems with a socket connection to a Java server. In
java I just open the socket, pass the length and then pass the bits
across the socket.
I created a socket object:
import socket
class MySocket:
def __init__(self, host='localhost', port = 28192, buffsize = 1024):
wrote:
> On Jan 6, 7:03 am, TechieInsights wrote:
>
> > __file__ command does not work when compiled to exe. It makes since
> > because the file is now in a compressed library. Is there a
> > replacement or something else you can do? The real problem is that
> >
Thanks
J. Cliff Dyer wrote:
> On Mon, 2009-01-05 at 11:49 -0800, TechieInsights wrote:
> > Ok I have read all of the tutorials and documents I could find. I am
> > running Python 2.6 on windows. The problem I am having with packages
> > is that they don't show up!
>
__file__ command does not work when compiled to exe. It makes since
because the file is now in a compressed library. Is there a
replacement or something else you can do? The real problem is that
when you create an exe of your program with python embedded, you can't
always guarantee that your cur
Ok... I figured it out... you can only import packages via the __all__
= ['subpackage/folder']... if you include a module such as hello.py,
it will fail.
Go figures I'd find this right after posting here...
Greg
TechieInsights wrote:
> Ok I have read all of the tutorials and
Ok I have read all of the tutorials and documents I could find. I am
running Python 2.6 on windows. The problem I am having with packages
is that they don't show up!
Simple example of what isn't working...
Structure-
pytest/ Root directory of package
__init__.py- code: __all__ = ['folder']
You can use the built-in string formatting options and operations.
2.5: http://www.python.org/doc/2.5.2/lib/typesseq-strings.html
2.6: http://docs.python.org/library/string.html
In essence, you can do:
print "You still have $%i remaining" %(money)
On Jan 2, 2:15 pm, sprad wrote:
> I've done a g
Note:
The os.path.relpath is new in 2.6. If you are using an older version
you will have to write your own algorithm
TechieInsights wrote:
> import os
> os.path.relpath('/path/to/your/file', os.path.dirname(__file__))
>
> tekion wrote:
> > Hello,
> >
import os
os.path.relpath('/path/to/your/file', os.path.dirname(__file__))
tekion wrote:
> Hello,
> I have a script in /usr/local/app/mypython.py and a configuration file
> relative to /usr/local/app/conf. When I call the script with an
> absolute path of /usr/local/app/mypthon.py I recieved an
18 matches
Mail list logo