python intergration bus ?

2005-01-04 Thread Tonino
Hi,

Just an interested question - I friend is testing a few JAVA
intergration bus's that will be used to intergrate his companies
services - I was wondering if there was a python intergration bus ?
other than maybe Pyro ?



Thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Socket and Tkinter Problem

2005-01-18 Thread Tonino
hi,

was wondering if you ever got a reply ?
Did you mannage to sort this out ?

I am wanting todo the same thing - just have a window that connects to
a port and displays the data it receives from that port in the window?
Thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


tkinter socket client ?

2005-01-20 Thread Tonino
I have been looking through the previous posts - but with my lack of
knowledge on the whole tkinter subject - I have no clue what to look
for ...

SO - can anyone please help with this ...?

I have a python server that when it gets a connection from a client -
it sends data back - quite a bit of it - in discreet parts - around
1024 byte chunks ...

I have created a tkinter client that makes a simple connect to the
server.  What I have a problem with is I need the client to write all
the data to the Text() widget created in the GUI client - the Text()
widget is created as :

self.text=Text(self.center_frame,background='white')
scroll=Scrollbar(self.center_frame)
self.text.configure(yscrollcommand=scroll.set)

self.text.pack(side=LEFT, fill=BOTH, expand=YES)
scroll.pack(side=RIGHT,fill=Y)
self.center_frame.pack(side=RIGHT, expand=YES, fill=BOTH)


I have a button with "Connect" written on it that connects to the
server by calling :

HOST = 'localhost'
PORT = 9000
global s
for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC,
socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
try:
s = socket.socket(af, socktype, proto)
except socket.error, msg:
s = None
continue
try:
s.connect(sa)
except socket.error, msg:
s.close()
s = None
continue
break
if s is None:
print 'could not open socket'
self.quitButtonClick

NOW - HOW do I get the server's sent data to continuiosly print in the
Text() widget ?

Many thank
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: tkinter socket client ?

2005-01-21 Thread Tonino
thanks for the reply .

just one problem - I do not know how to sit in a "loop" accepting
messages on the socket connection - writting them to the Text() widget
- refreshing the the GUI - and then starting all over 
where do I put the loop for the socket ?

Thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: tkinter socket client ?

2005-01-21 Thread Tonino
thanks for the info - but I really do  not want to learn twisted before
I can understand Tkinter ;)
another thread seems the way - will try that ...

Thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: tkinter socket client ?

2005-01-21 Thread Tonino
hi there ,

yeah - had a look at createfilehandler() - was a bit confusing - but
your example helps ;)

Thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: tkinter socket client ?

2005-01-25 Thread Tonino
Hi,

thanks for this info - I had to abandon the createfilehandler() method
as it is not supported in windows and the GUI "might" be used there at
some time ...

So - I went the threading route - works well - for now - so I will
stick to it ...

BUT - the next question:
In the Text() widget - why - when the text scrolls off the screen -
does the window not follow it ?

I have added a scrollbar to it :

self.center_frame = Frame(self.top_frame, background="tan",
relief=RIDGE)

self.text=Text(self.center_frame,background='white')
scroll=Scrollbar(self.center_frame)
self.text.configure(yscrollcommand=scroll.set)

self.text.pack(side=LEFT, fill=BOTH, expand=YES)
scroll.pack(side=RIGHT,fill=Y)
self.center_frame.pack(side=RIGHT, expand=YES, fill=BOTH)


but the window does not scroll to follow the text ?
Any ideas ?

Thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: tkinter socket client ?

2005-01-27 Thread Tonino
great - thanks ;)

Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


ftp upload through proxy ?

2005-09-04 Thread Tonino
Hi,

I have been searching the groups for a way to upload a file using
URLLIB (2) to a ftp site using a proxy server.
I read the ftplib does not support proxy servers and I know that urllib
does support it.
I can download a file from a ftp site through the proxy - but now I
need to be able to upload.

There are some postings about file uploads using http_post but none
mentioned ftp uploads using urllib2 over proxy server ...

Has anyone done this ?  Can it be done ?

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


gui scripting

2005-02-14 Thread Tonino
HI,

I have a 2 phase question:

Phase 1 is I am needing to automate a report generation from a
proprietary product.  Currently a person sits and input's the data into
a GUI frontend and clicks's the appropriate buttons to start the report
generation.  What I am wanting todo is automate this, but since the GUI
is from a proprietary product all I have is the GUI.

This is done on a Linux Xfree server.  Can anyone please point me in a
direction to a pythonic gui scripting module ?
Python is the best tool and we use it elsewhere - so it is the best
option.

Second phase will have this done on a Windows platform... but that is
second priority ...

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: gui scripting

2005-02-14 Thread Tonino
thanks - this helps ;))

will play with android ...

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: gui scripting

2005-02-14 Thread Tonino
hmm - there is a problem - Android uses Xtest extensions - this is BAD
;)

I Need to be able to get values from the form that is returned ... and
the Xtest stuff does not allow you to access the values of a returned
form in the GUI ...

example :

if the GUI has a form that is returned and in this form it has columns
on the left expressing names for values on the right - you cannot get
the text for the columns on the left or the associated values ...

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: gui scripting

2005-02-17 Thread Tonino
hi,

thanks - am already involved in a process to modify winguiauto.py  -
this is a GREAT start but we need more control and better handleing ;)

Thanks for the WATSUP site - will check on this as well ;)

Thanks
T

-- 
http://mail.python.org/mailman/listinfo/python-list


Tkinter and Text() widget interactivity ?

2005-03-01 Thread Tonino
Hi,

I have a small Tkinter app that gets data from a socket connection to a
"server".  The app has a Text() widget to display the info that it gets
from the socket connection.  I have the ability to stop the text at any
point.

What I want to be able todo is select a line from the Text() window and
double click or whatever on it to open a new window with that selected
text as a paramater to the new window.

The app is a network sniffer and I want to be able to select a line
from the Text() window and run a decode on the data from the sniffer.

any help and pointers would help.  I have no idea of what to search for
;)

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter and Text() widget interactivity ?

2005-03-02 Thread Tonino
Many thanks for this - will give it a bash ;)

Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


mathmatical expressions evaluation

2004-12-22 Thread Tonino
Hi,

I have a task of evaluating a complex series (sorta) of mathematical
expressions and getting an answer ...

I have looked at the numarray (not really suited??) and pythonica (too
simple??) and even tried using eval() ... but wondered if there were
other packages/modules that would enable me to to this a bit easier...

The formula/equations are for investment calculations (Swap Yields).
Is there a module/method that anyone can suggest ??

Many thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: mathmatical expressions evaluation

2004-12-22 Thread Tonino
thanks all for the info - and yes - speed is not really an issue and no
- it is not an implementation of a complete financial system - but
rather a small subset of a investment portfolio management system
developed by "another company" ...

What I am trying to achieve is to parse a formula(s) and generate a
result ...

I will look into the pyparsing suggested and maybe even leave out
numarrays for now - as it seems a bit overkill ...

The formula are a bit complex and maybe even difficult to write out
Thanks all - I will post my progress ;)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: mathmatical expressions evaluation

2004-12-23 Thread Tonino
yes - this is what I have been doing - created a set of functions to
handle the formula and they all calculate a section of the formula.
Thanks for all the help ;)
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


urllib2 ftp mirror

2006-08-31 Thread Tonino
Hi,

I need to be able to mirror a remote ftp site recursivly, but my access
to the internet is through a http proxy server.

>From my search I can see that ftpmirror.py uses ftplib and ftplib does
not support proxy servers, you need to use urllib2.

Does anyone know of a simple way to get this done?  recursive ft mirror
using urllib?

Thanks
Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list


best way to do this ...

2005-05-17 Thread Tonino
Hi ALL,

I am having a issue with a particular storage of data problem and
wanted to know if I am going about it the wrong way.

I have a list of reference numbers associated with a product and I have
a socket that listens on a port.  Now what happens is the client app
connects to the server - sends the product and the associated ref
numbers (there are a few per product). I need to be able to store these
in a data  structure so that when the same product is called again  -
it can display the ref numbers for that product.

I am new to OO programming - so please have mercy ;)

eg:


class ProductData:
def __init__(self,prod):
self.prod = prod
self.ref = []
def add_ref(self,refno):
self.ref.append(refno)
def __str__(self):
return "%s : %s" % (self.prod,",".join(self.ref))


products = ['table', 'chair', 'couch']
ref_numbers = ['1234','4567', '7890']

detail = {}
id = 0

for p in products:
detail[id] = ProductData(p)
for r in ref_numbers:
detail[id].add_ref(r)
id = id + 1

for a in detail:
print detail[a]


so I will get:

table : 1234,4567,7890
chair : 1234,4567,7890
couch : 1234,4567,7890

BUT I will need to be able to have this in a while loop - as there is a
socket listener there.

I keep getting this error:

for a in Detail:
RuntimeError: dictionary changed size during iteration


any ideas ?

Thanks
Tonino

what I want to be able to get is a dict of the products and associated

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: best way to do this ...

2005-05-17 Thread Tonino
hmm - but I want to store the data in memory eather than a filesystem
... it is not an issue if the program terminates - it is almost needed
while running and does not need to remember where it is ..

the dirctionary is detail = {}

will try the list() function - thanks

Tonino

-- 
http://mail.python.org/mailman/listinfo/python-list