[EMAIL PROTECTED] wrote:
> nephish:
> > one more question.
> > the functions defined above the classes that the could be called from
> > within the classes, they do not need a 'self' declaration because they
> > are not part of a class, right?
>
> Class
Hello there,
i need to write a script that can transfer info back and forth with a
data server at so-and-so ip.
i have Programming Python, which covers socket programming. So thats
cool. But what i need to know how to do is make a message in ascii that
is what the server is looking for.
for examp
Thanks guys,
No, i did not know about isdigit ?
very helpful. Thanks.
esp liked the "overloaded doohicky' bit.
thanks again.
--
http://mail.python.org/mailman/listinfo/python-list
i think like byte 1 = 'S'
byte 2 = 'T'
and byte 3 = 'X'
still new at this, and thanks for the references
-sk
--
http://mail.python.org/mailman/listinfo/python-list
ok, part of what i have to do is know how many bytes will be sent. in
ascii is it one byte per character ?
like "password" would be 8 bytes long?
--
http://mail.python.org/mailman/listinfo/python-list
i know that those characters exist, the docs say that the server does
not want the special "ETX" and "STX" characters, but the 3 ascii
characters "STX" and "ENX" i am not sure why.
--
http://mail.python.org/mailman/listinfo/python-list
i'm not sure, but its kinda been a pain in the hinder for a newbie like
me to find it in their docs.
thanks for all the help guys, let you know how it goes
--
http://mail.python.org/mailman/listinfo/python-list
ok, i am stuck again.
from the docs, the byte stream is supposed to look like this:
'S' 'T' 'X' [length indicator] [message type] [message] 'E' 'N' 'X'
the length indicator it says is a four byte integer number of a value N
( N would be how long the message body is )
the message type comes f
indeed i did not. thanks for the tip.
--
http://mail.python.org/mailman/listinfo/python-list
hello there, i have recently been tasked with grabbing info to pipe
into our database from an information server. The server guys told me i
need to grab their wsdl file. Untill earlier this afternoon, i had no
idea what wsdl is. From what i gather, it is much like SOAP.
So anyway, any pythoneers ou
Hey there,
i have been spending some time learning python. i do enjoy it so.
Heres the deal. i need some dirrection advice.
i have a friend that wants me to set up a customer database for him.
Easy stuff like name, phone number, email address. and current status.
he also wants to be able to print t
wow thanks,
i think i am going to check out sqlite.
acce$$ is not possible because of the cash. ick.
i am interested in learning the code anyway, but just want to learn
python instead of
javascript right now.
i have a simple cgi-script working to display info to the browser (from
apache)
but the sc
Hey there.
i want to set a variable to represent the last line of a text file
how do i do that?
or even better, how do i create a list of the lines of a text file?
--
http://mail.python.org/mailman/listinfo/python-list
cool. thanks for the help guys !
--
http://mail.python.org/mailman/listinfo/python-list
Hey there,
i am trying to write an online application using the cgi module.
what i want to do is have an html form display a drop-down list and
have the values of that list be the lines of text written in a file.
this would be updated almost every time the site is visited.
i have been sucessful in
Hey man, i would like to know this too.
hope someone knows...
--
http://mail.python.org/mailman/listinfo/python-list
whoa, thanks
been trying to figgure this out for a week.
cant wait to try it this weekend.
thanks again.
--
http://mail.python.org/mailman/listinfo/python-list
Hello all.
i have a strange problem with some python cgi scripts.
the deal is.
i keep loosing permission to write to a file created by a cgi script.
the file is created in a directory created by a python script. but
after the file is created by the cgi script,
another script in the same folder
Hey there. Here is the deal i have a script that is supposed to
open a file based on criteria from a web form.
i cant seem to get it to work though.
here is the code:
form = cgi.FieldStorage()
DataRecord = form['DataTime'].value
Customer = form['CustName'].value # should be automatically fill
no takers?
--
http://mail.python.org/mailman/listinfo/python-list
i fixed it.
the program was going nuts because there were
spaces in the name of the file.
go figgure.
anyway, i changed the way i format the timestamp that
becomes the file name and removed the spaces.
working all better now.
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hey there,
i have a python cgi script that prints out html just fine in the Opera
browser
but doesnt print at all under FireFox.
weird, eh?
i am getting nothing in the apache logs about any error.
perhaps its a firefox issue, but i doubt it.
any suggestions. simple script here..
--
http://mail.p
Well, i don't have an app that will automaticlly check a page for
errors,
unless bluefish will do it, i am not sure.
the page it is supposed to print out is a response to a form entry.
here is the source from Opera if one of you guys want to look at it.
Customer Data
Watkins Crop Consulting
Ok, i made a change in the source. now here is the source from Opera,
still cant get firefox to work with me.
Customer Data
Watkins Crop Consulting
1915 Cherokee
Dalhart, Tx 79022333-5943
gandalf
Field field one
Crop crop one
GS growing, yep
Weeds many weeds
Water lots o water
fixed, thanks for all of your help.
i am pouring over python texts and the problem is
html... duh
looking for a more efficient way to jerk all of the hair outta my head.
thanks a whole lot. your awesome
--
http://mail.python.org/mailman/listinfo/python-list
Great Advice, can see that saving me a few headaches
thanks
--
http://mail.python.org/mailman/listinfo/python-list
i have an html form with a drop-down list that lists a bunch of images.
how can i get my cgi script to load the image ?
i have imported cgi and os
text entered from a form and read from a file do ok, but i cant seem to
get it to load an image.
the form writes all of the entries as lines in a .txt
hello all,
i have a c function from some modbus documentation that i need to
translate into python.
it looks like this:
unsigned short CRC16(puchMsg, usDataLen)
unsigned char *puchMsg ;
unsigned short usDataLen ;
{
unsigned char uchCRCHi = 0xFF ;
unsigned char uchCRCLo = 0xFF ;
unsigne
lo there all !
i have a huge delima, i have to be able to connect to a data server and
recieve info from it. The servers software guys release some visual C++
modules that one can incorporate into a visual C++ project. Which is
great, but i am developing in linux, and only am very familliar with
p
ok, well enough, looked at struct and it does seem to be what i am
after. for that anyway.
thanks, guess i will just have to take the time and pull it apart.
cheers
sk
--
http://mail.python.org/mailman/listinfo/python-list
pyconstruct looks cool. i dont know if the classes are using the plain
berkely-ish code. i couldn't find anything in it that pointed to send()
recv(), & such. i found other stuff like SetSocketOpt() and so on like
this :
long CClientSocket::ConnectToServer(LPCTSTR serverAddr, UINT port)
{
wow , thanks for the tips and the link.. i can at least see whats going
on here.
this project is beginning to look believable to me.
i have another question.. later , in this same class, after it goes
thru some error handling, it returns like this
return COM_SUCCESS;
but i cannot find where COM_SU
sounds cool, most stuff i write is strife with try - except
thanks for the tip
-sk
--
http://mail.python.org/mailman/listinfo/python-list
lo there all !
i finally got my script to receive info on a socket. but i need to
somehow set up a loop that will continue to listen for more info
comming across the same socket.
the way it works is, i log in with a login and password, it shoots back
an acknowlagement, then i send a request for d
i think it may be,
i am just doing a while 1: loop to just wait for whatever comes in.
thanks
--
http://mail.python.org/mailman/listinfo/python-list
hey there,
i have a script that waits for message packets from a data server over
a socket.
it goes a little like this:
while 1:
x+=1
databack = sockobj.recv(158)
if databack:
print 'caught a message %s bytes ' % len(databack)
if len(databa
thanks for the info, i will likely use the first link you posted with
the async module just to get it going, but i want to learn more about
twisted for later. there is even an O'Reilly book on it i see.
thanks for the tips,
sk
--
http://mail.python.org/mailman/listinfo/python-list
ok, thanks for all the suggestions, gents, i clearly have more to read
on this.
i have discovered that the server will send a request for the heartbeat
ping if its almost timed out, so i use the length of the message to
determine what to do with it.
msg = sockobj.recv(1024)
if len(msg) == 158:
ok, every message starts with "ENX" and ends with "STX"
in between are several parts. the first is the message length sent as
an unsigned long int (according to the docs) this is four bytes. The
next is the message type - another 4 bytes that corrospond to a certain
chart. for example, the login is
yeah, he he
--
http://mail.python.org/mailman/listinfo/python-list
hey there,
i have a huge app that connects to MySQL. There are three threads that
are continually connecting and disconnecting to the db. The problem is,
if there is an error, it faults out sometimes without closing the
connection. i connect like this.
db = MySQLdb.connect(host="localhost", user="M
This is great !
ok, i dont really have a lot of time to get into the ORMS (before your
post, this is the first i have heard of it) and my stuff is due on
Monday. he he.
but, if i am able to make a global db connection, and multiple cursors
pointing to the same connection object, how do i pull tha
So this opens and closes the connection every time i run the query?
thats cool. i think that would fit in well. so when i need to run the
query, i pass something like
query = "SELECT * FROM `Table` WHERE `foo` = 'bar'"
result = DB_Connector.Execute(query)
and the result would be the same as if i
way cool, i think that this will work.
thanks very much
-sk
--
http://mail.python.org/mailman/listinfo/python-list
ello there. i am having a problem getting a module to work right.
i wrote a class that is going to be used in a few different scripts in
the same directory.
it looks like this:
#!/usr/bin/python
import MySQLdb
class DbConnector(object):
"""
Database Connection object.
c
ok, cool, and thanks very much. That worked.
thanks for the info too.
i am still new at the OO thing, just tired of doing a copy and paste
over and over again.
thanks again
--
http://mail.python.org/mailman/listinfo/python-list
yeah, i have thought of picking that one up. That one, or nutshell.
i got programming python, which was way over my head, then learning
python, which has helped me a great deal.
thanks
--
http://mail.python.org/mailman/listinfo/python-list
ok, thanks everyone. The funny thing about the name conventions is, i
was just two days ago looking around on the web for the best way to go
about consistancy in variable names, class names, etc..
i have the module working now. thanks to you guys. And i think i
understand the container name | obje
ok, what i posted above had the getOne method, the whole class has a
function for getMany, update, and Insert.
none of this will be used by an end user, it kinda runs in the
background. But, if you have a good link to the docs on the API, i
would like to see it. Still kinda new at this.
thanks
-
cool, thanks, i was running on some thinner examples i found on the
net.
--
http://mail.python.org/mailman/listinfo/python-list
cool, thank you very much
--
http://mail.python.org/mailman/listinfo/python-list
101 - 151 of 151 matches
Mail list logo