problem with bcd and a number

2011-08-04 Thread nephish
Hey all, I have been trying to get my head around how to do something, but i am missing how to pull it off. I am reading a packet from a radio over a serial port. i have " two bytes containing the value i need. The first byte is the LSB, second is MSB. Both bytes are BCD-encoded, with the LSB c

problem with bcd and a number

2011-08-04 Thread nephish
Hey all, I have been trying to get my head around how to do something, but i am missing how to pull it off. I am reading a packet from a radio over a serial port. i have " two bytes containing the value i need. The first byte is the LSB, second is MSB. Both bytes are BCD-encoded, with the LSB c

need help with converting c function to python function

2007-07-05 Thread nephish
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

Re: question about class, functions and scope

2006-08-26 Thread nephish
[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

Re: question about class, functions and scope

2006-08-26 Thread nephish
nephish wrote: > [EMAIL PROTECTED] wrote: > > nephish: > > > is this legal ? is it pythonic? > > > > It's legan and pythonic. Functions are here for a purpose. > > > > Bye, > > bearophile > > cool enough, and thanks for the quick reply

Re: question about class, functions and scope

2006-08-26 Thread nephish
[EMAIL PROTECTED] wrote: > nephish: > > is this legal ? is it pythonic? > > It's legan and pythonic. Functions are here for a purpose. > > Bye, > bearophile cool enough, and thanks for the quick reply. shawn -- http://mail.python.org/mailman/listinfo/python-list

question about class, functions and scope

2006-08-26 Thread nephish
lo there all, i have an app that runs three classes as threads in the same program. some of them need to be able to share some functions. Can i set a function before i define a class and have the class use it ? Kinda like this. def some_function(var1, var2): do something with var1, var2 r

Re: easy question about join method

2006-08-06 Thread nephish
very helpful indeed. i did a help([]) to see if it would give me anything for a list. wow. thanks a lot. -sk Terry Reedy wrote: > The easy way to get one answer for buildin funcs and methods is the help > function in the interactive interpreter (and Idle's and probably other > imitations thereof)

Re: easy question about join method

2006-08-06 Thread nephish
yep, easy enough thanks -shawn Jorge Godoy wrote: > "nephish" <[EMAIL PROTECTED]> writes: > > > i have seen the join method before, mostly in this group and i want to > > get it a little better. > > > > if i have a list > > >

easy question about join method

2006-08-06 Thread nephish
i have seen the join method before, mostly in this group and i want to get it a little better. if i have a list x = ['this','is','a','sentence','held','in','a','list'] how can i make it print as a single string? or make a single string out of it ? thanks -- http://mail.python.org/mailman/list

Re: prob with struct and byte order

2006-07-25 Thread nephish
N(32); # this is the serial number of the unit unsigned long int ESN # serial number of the communicator unsigned long int userID thanks again guys.. i think we're getting closer. -sk John Machin wrote: > Marc 'BlackJack' Rintsch wrote: > > In <[EMAIL PROTECTE

Re: prob with struct and byte order

2006-07-24 Thread nephish
ok. indeed i did do '' instead of ' '. here is an example of a message 'STX\x00\x00\x004\x00\x00\x00\xc8stateman\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00state1man\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ENX' tohex gave me '53 54 58 00 00 00 34 00 00 00 c8 70 6

Re: prob with struct and byte order

2006-07-24 Thread nephish
ok, i did this print ' '.join(["%02.2x" % ord(b) for b in message]) and i got this in the text file 535458002c00ea31373538343636383535d6090d54454e58 so, yes, more of the info seems discernable now. according to their docs, all of their va

prob with struct and byte order

2006-07-24 Thread nephish
hello there, all. i have a difficult app that connects to a server to get information for our database here. this server is our access point to some equipment in the field that we monitor. the messages come in over a socket connection. And according to their (very limited) documentation, are set

Re: question about what lamda does

2006-07-20 Thread nephish
hey thanks for that last post, although some of it was a bit over my head. i think i am getting more of the differences here. thanks again, sk danielx wrote: > [EMAIL PROTECTED] wrote: > > Hey there, > > i have been learning python for the past few months, but i can seem to > > get what exactly a

Re: question about what lamda does

2006-07-18 Thread nephish
so a lamda needs to stay at one expression, and use more than one lamda for more expressions ? i think i get it. sk Nick Vatamaniuc wrote: > Use it anywhere a quick definition of a function is needed that can be > written as an expression. For example when a callback function is > needed you cou

Re: question about what lamda does

2006-07-18 Thread nephish
ok, i think i get it. pretty cool. thanks -sk Dan Bishop wrote: > [EMAIL PROTECTED] wrote: > > Hey there, > > i have been learning python for the past few months, but i can seem to > > get what exactly a lamda is for. > > It defines a function. > > f = lambda x, y: expression > > is equivalent to

question about what lamda does

2006-07-17 Thread nephish
Hey there, i have been learning python for the past few months, but i can seem to get what exactly a lamda is for. What would i use a lamda for that i could not or would not use a def for ? Is there a notable difference ? I only ask because i see it in code samples on the internet and in books. th

Re: how to know if socket is still connected

2006-07-17 Thread nephish
ok, yeah, thats in my book. thanks, and no, it isn't enabled. thanks again for everything -sk Grant Edwards wrote: > On 2006-07-17, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> If the server _application_ crashes or exits, then the OS will > >> close the socket and recv() will return "". If

Re: how to know if socket is still connected

2006-07-17 Thread nephish
> If the server _application_ crashes or exits, then the OS will > close the socket and recv() will return "". If somebody powers > down the server without warning, or if the server OS crashes, > or if the Ethernet cable between the Internet and the server is > cut, then the socket will not be clo

Re: how to know if socket is still connected

2006-07-17 Thread nephish
oh, sorry, what i mean by dropped is that the server i am connecting to can close the connection. If that happens, i need to know about it. i also need to know about it if the server i am connecting to just dies. if recv() returns "" is that the same as NONE ? again, sorry, i am still kinda new at

Re: how to know if socket is still connected

2006-07-17 Thread nephish
hey there, i have a question about this solution. if i have a message = socket.recv() in the script, and the socket connection drops, will the socket.recv() just wait forever for something to come across the internet port? or will it know if the connection is dropped? thanks. -sk Grant Edwards wr

Re: how to know if socket is still connected

2006-07-16 Thread nephish
cool enough, thanks ! -sk Grant Edwards wrote: > On 2006-07-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >> If the server has closed the connection, then a recv() on the > >> socket will return an empty string "", and a send() on the > >> socket will raise an exception. > > > like this ?

Re: Cool Python Ebooks Site

2006-07-16 Thread nephish
are not most (or all) of these copywrite protected ? thats why i have not pulled some of them myself, you can get most of them used from amazon for about $10 [EMAIL PROTECTED] wrote: > http://cooldogebooks.blogspot.com/2006/05/python-ebooks.html > > Here is a cool site were you can preview python

Re: how to know if socket is still connected

2006-07-16 Thread nephish
Grant Edwards wrote: > On 2006-07-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > serverhost = 'xxx.xxx.xxx.xxx' > > serverport = 9520 > > aeris_sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > > aeris_sockobj.connect((serverhost,serverport)) > > > > while 1: > > do this or

how to know if socket is still connected

2006-07-16 Thread nephish
lo there, i have a simple app that connects to a socket to get info from a server i looks like this serverhost = 'xxx.xxx.xxx.xxx' serverport = 9520 aeris_sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM) aeris_sockobj.connect((serverhost,serverport)) while 1: do this or that with

Re: problem with writing a simple module

2006-05-24 Thread nephish
cool, thanks, i was running on some thinner examples i found on the net. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with writing a simple module

2006-05-23 Thread nephish
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 -

Re: problem with writing a simple module

2006-05-23 Thread nephish
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

Re: problem with writing a simple module

2006-05-22 Thread nephish
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

Re: problem with writing a simple module

2006-05-22 Thread nephish
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

problem with writing a simple module

2006-05-22 Thread nephish
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

Re: can i set up a mysql db connection as a class ?

2006-04-28 Thread nephish
way cool, i think that this will work. thanks very much -sk -- http://mail.python.org/mailman/listinfo/python-list

Re: can i set up a mysql db connection as a class ?

2006-04-28 Thread nephish
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

Re: can i set up a mysql db connection as a class ?

2006-04-27 Thread nephish
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

can i set up a mysql db connection as a class ?

2006-04-27 Thread nephish
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

Re: need a thread to keep a socket connection alive?

2006-04-25 Thread nephish
yeah, he he -- http://mail.python.org/mailman/listinfo/python-list

Re: need a thread to keep a socket connection alive?

2006-04-24 Thread nephish
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

Re: need a thread to keep a socket connection alive?

2006-04-24 Thread nephish
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:

Re: need a thread to keep a socket connection alive?

2006-04-22 Thread nephish
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

need a thread to keep a socket connection alive?

2006-04-22 Thread nephish
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

Re: another question about buffers

2006-04-22 Thread nephish
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

another question about buffers

2006-04-21 Thread nephish
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

Re: freakin out over C++ module in python

2006-04-20 Thread nephish
sounds cool, most stuff i write is strife with try - except thanks for the tip -sk -- http://mail.python.org/mailman/listinfo/python-list

Re: freakin out over C++ module in python

2006-04-19 Thread nephish
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

Re: freakin out over C++ module in python

2006-04-18 Thread nephish
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) {

Re: freakin out over C++ module in python

2006-04-18 Thread nephish
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

freakin out over C++ module in python

2006-04-17 Thread nephish
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

Re: need a start point for wsdl

2006-03-06 Thread nephish
cool, thank you very much -- http://mail.python.org/mailman/listinfo/python-list

need a start point for wsdl

2006-03-06 Thread nephish
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

Re: in over my head ascii

2006-02-07 Thread nephish
indeed i did not. thanks for the tip. -- http://mail.python.org/mailman/listinfo/python-list

Re: in over my head ascii

2006-02-07 Thread nephish
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

Re: in over my head ascii

2006-02-07 Thread nephish
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

Re: in over my head ascii

2006-02-06 Thread nephish
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

Re: in over my head ascii

2006-02-06 Thread nephish
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

Re: in over my head ascii

2006-02-06 Thread nephish
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

Re: check to see if value can be an integer instead of string

2006-02-06 Thread nephish
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

in over my head ascii

2006-02-06 Thread nephish
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

Re: check to see if value can be an integer instead of string

2006-01-18 Thread nephish
it isn't really that i will want to change it to an integer anyway. the script uses a table to reference a value to a key, if the key is a group of letters, that code tells the script to do something. if the value is a number, it means an equipment failure. The thing is, all the values come out as

Re: check to see if value can be an integer instead of string

2006-01-17 Thread nephish
this looks like the solution i am looking for. thanks for the education by the way. i have a couple of other try / except clauses. Never thought of pulling it off like that. thanks very much, really simple. -- http://mail.python.org/mailman/listinfo/python-list

Re: check to see if value can be an integer instead of string

2006-01-17 Thread nephish
thanks for the reply, but wont python fail out if you try to make an integer out of what cant be an integer? like this : var = int(abc) wont this crash ? -- http://mail.python.org/mailman/listinfo/python-list

check to see if value can be an integer instead of string

2006-01-17 Thread nephish
Hello there, i need a way to check to see if a certain value can be an integer. I have looked at is int(), but what is comming out is a string that may be an integer. i mean, it will be formatted as a string, but i need to know if it is possible to be expressed as an integer. like this var = some

Re: question about extracting value from a string

2005-12-07 Thread nephish
>I agree -- "to each day are sufficient the evils thereof". Many >programmers fall into the temptation to overgeneralize and fail to >follow the AGNI principle ("Ain't Gonna Need It"...;-). thats funny :) -- http://mail.python.org/mailman/listinfo/python-list

Re: question about extracting value from a string

2005-12-07 Thread nephish
the second line was not a typo , and thanks for that. these values may vary somewhat over time. So i may have to rewrite this part of the script. a string is fine for right now, because it is just going to be pumped into a database. i can change it later if necessary. thanks for the help gents, i

question about extracting value from a string

2005-12-07 Thread nephish
hey there, i have looked at the string module and re. i was looking for advice on what would be the best way to pull a value out of a small string. for example, i have a string $.+.09 JAR and all i want out of it is the +.09 likewise, i have $-.04 TIN kt and all i want is the -.04 what wou

Re: need help extracting data from a text file

2005-11-07 Thread nephish
um, wait. what you are doing here is easier than what i was doing after your first post. thanks a lot. this is going to work out ok. thanks again. sk -- http://mail.python.org/mailman/listinfo/python-list

Re: need help extracting data from a text file

2005-11-07 Thread nephish
this is cool, it is only going to run about 10 times a day, the text is not written out like foo(bar) its more like foo blah blah blah (bar) the thing is , every few days the structure of the textfile may change, one of the reasons i wanted to avoid the re. thanks for the tip, -- http://mail.p

need help extracting data from a text file

2005-11-07 Thread nephish
Hey there, i have a text file with a bunch of values scattered throughout it. i am needing to pull out a value that is in parenthesis right after a certain word, like the first time the word 'foo' is found, retrieve the values in the next set of parenthesis (bar) and it would return 'bar' i think

Re: question about urllib and parsing a page

2005-11-02 Thread nephish
well, i think thats the case, looking at the code, there is a long string of math functions in page, java math functions. h. i guess i'm up that famous creek. thanks for the info, though shawn -- http://mail.python.org/mailman/listinfo/python-list

Re: question about urllib and parsing a page

2005-11-02 Thread nephish
thats cool, but i want to do this automatically with python. what can i do to have urllib download the source with the numbers in it? ok, not necessarily urllib, whatever one is best for the occation thanks shawn -- http://mail.python.org/mailman/listinfo/python-list

question about urllib and parsing a page

2005-11-02 Thread nephish
hey there, i am using beautiful soup to parse a few pages (screen scraping) easy stuff. the issue i am having is with one particular web page that uses a javascript to display some numbers in tables. now if i open the file in mozilla and "save as" i get the numbers in the source. cool. but i click

Re: need start point for getting html info from web

2005-10-30 Thread nephish
yeah, i know i am going to have to write a bunch of stuff because the values i want to get come from several different sites. ah-well, just wanting to know the easiest way to learn how to get started. i will check into beautiful soup, i think i have heard it referred to before. thanks shawn -- ht

need start point for getting html info from web

2005-10-30 Thread nephish
hey there, i have a small app that i am going to need to get information from a few tables on different websites. i have looked at urllib and httplib. the sites i need to get data from mostly have this data in tables. So that, i think would make it easier. Anyone suggest a good starting point for

Re: how do i run another script from my python script

2005-10-27 Thread nephish
well i know i dont want to do another thread, my program has six running all the time. whew. that can get nuts. i mean, this will come to me easier later i am sure. But right now. simple is best. thanks for all the suggestions, gents. right now i am just doing a varient of Steves suggestion, an

Re: how do i run another script from my python script

2005-10-27 Thread nephish
man, thats just too easy. thanks much ! -- http://mail.python.org/mailman/listinfo/python-list

how do i run another script from my python script

2005-10-27 Thread nephish
hey there all, i have been looking for a way to run a php command line script from my python script. here is what i want to do: if x = 4: execute php4 testin.php else: execute php4 testout.php and i also need the script to wait untill the php4 script is done (which i think is the default

Re: need some advice on x y plot

2005-10-25 Thread nephish
WE DID IT ! little more tinkering and correcting this diff = start_time - end_time (vrs the other way around) and its working. so many thanks gents, a lot ! -- http://mail.python.org/mailman/listinfo/python-list

Re: need some advice on x y plot

2005-10-25 Thread nephish
tics.append('"%s" %s' % (time.strftime(...), x)) # might need time.localtime(x) for that last term. ok, tried this and it worked. but the first plot is at the last plot of data back to that math mistake i mentioned earlier. so, thanks much, i will be back when i mess around with it some m

Re: need some advice on x y plot

2005-10-25 Thread nephish
Ok, first off, thanks for all the help guys, this part " set xtics ("label" pos, "label" pos, "label" pos) " is mainly what i was confused about. the 'pos' part. i think that the way i am writing this leaves this out. in fact, i am pretty sure. here is the code i am trying out. def draw_chart(s

Re: need some advice on x y plot

2005-10-25 Thread nephish
well, for what i tried, ticstrings just contained a list of times formatted like [10-21 09:15, 10-21 09:44, 10-21 09:59, and so on.] i did write mine a little different than the example that Grant gave me because its a little different application of time. i think i am having trouble knowing e

Re: need some advice on x y plot

2005-10-24 Thread nephish
ok, i am stuck a bit here with this line gp('set xtics (%s)' % ','.join(ticstrings)) the error code says that it is looking for a closing parenthesis. that and i am kinda new enough not to really get what %s is all about. i know it formats a string. can you simply pass a list to 'set xtics' ? i

Re: need some advice on x y plot

2005-10-21 Thread nephish
this is great, because the docs on gnuplots website are a bit easier for me to grasp. thanks so much for your time on this one. you really have helped me a lot. i will not get a change to work on this till monday. so i may have more questions then. This is sure a point in the right direction. than

Re: need some advice on x y plot

2005-10-21 Thread nephish
ok, i have a display, and its a work in progress. lemme get this straight. you used gp('set term png') is this an example of sending normal gnuplot commands? if so, are all of the gnuplot commands available ? thanks so much this is helping me out a lot here -- http://mail.python.org/mailman/li

Re: need some advice on x y plot

2005-10-21 Thread nephish
the time is DateTime.DateTime object from a mySQLdb query. the value is a number anywhere between 0 and 15. the datetime is formatted like 2005-10-20 08:40:34 i could strip it and make a timestamp out of it. but reading the number of seconds since january of 1970 doesn't make a neat chart. any su

Re: need some advice on x y plot

2005-10-21 Thread nephish
ok, i tried something similar to what you posted. a little simpler though. i am running a query on a database and making a list of time, value pairs kinda like this plot_points = ([time, value], [time, value], [time, value]) gnuplot complains that it needs a float for one of the values. i can plot

Re: need some advice on x y plot

2005-10-20 Thread nephish
ok, yeah, thats exactly what i am looking for. i will give it a go. thanks a whole lot. putt this off is a typo, pull this off is what i was meaning to type. this is cool. -- http://mail.python.org/mailman/listinfo/python-list

Re: need some advice on x y plot

2005-10-20 Thread nephish
i have thought about doing this, just a little different. i was going to list the value pairs. take the start time and end time and plot 100 empty plots between them. add the value pairs, sort by time, and then draw it. The only thing is it get kinda complicated when the times change a lot. they co

Re: need some advice on x y plot

2005-10-20 Thread nephish
how ? i have tried to use unix timestamps, and i have also tried with DateTime objects do i need to use a scale that isn't linear (default in most) ? how do i putt this off ? thanks btw. sk -- http://mail.python.org/mailman/listinfo/python-list

need some advice on x y plot

2005-10-20 Thread nephish
Hey there, i have tried about every graphing package for python i can get to work on my system. gnuplot, pychart, biggles, gdchart, etc.. (cant get matplot to work) so far, they all are working ok. I need to make an x y chart for some data that comes in from sensors at different times durring the d

Re: question about smtplib

2005-10-04 Thread nephish
thanks for all the help, got it working ok now, connecting once, sending many. thanks for the link too. cheers, sk -- http://mail.python.org/mailman/listinfo/python-list

Re: question about smtplib

2005-10-03 Thread nephish
cool. so this line server = smtplib.SMTP(localhost) is when i connect ? i had my syntax wrong anyway, i was using server.close() instead of server.quit() thanks much -- http://mail.python.org/mailman/listinfo/python-list

question about smtplib

2005-10-03 Thread nephish
Hey there, i am using the smtplib module in python 2.3 my question is, this works: server = smtplib.SMTP(localhost) then server.sendmail(to address, from address, message) what i want to know is, how does the connection work? when i do server.sendmail, does it connect then ? or did it connec

Re: another time challenge

2005-09-29 Thread nephish
cool, thanks -shawn -- http://mail.python.org/mailman/listinfo/python-list

another time challenge

2005-09-28 Thread nephish
Hey there pythoneers i have another question about time, specifically, the mxDateTime module. i have been able to get a RelativeDateTimeDiff between two times, it gives me a difference between two DateTimes in the form of +3days +2hours etc... so, if i have a date that is 6 days and 6 hours from

never mind about the plot stuff, my mistake

2005-09-26 Thread nephish
hey, a little update. i got the pychart working the examples did not include the necessary #!/usr/bin/python its like being a literary critic forgetting how to spell his name. thanks for your help getting the deb package going. i should be all good now. sk -- http://mail.python.org/mailman/list

Re: time challenge

2005-09-23 Thread nephish
sorry about that, i got a message in my inbox that said that the post was rejected so i tried it from my email client. wont happen again. shawn -- http://mail.python.org/mailman/listinfo/python-list

time challenge

2005-09-22 Thread nephish
Hey there, i am doing a plotting application. i am using mxRelativeDateTimeDiff to get how much time is between date x and date y now what i need to do is divide that time by 20 to get 20 even time slots for plotting on a graph. For example, if the difference between them is 20 hours, i need 20

need to divide a date

2005-09-22 Thread nephish
Hey there, i am doing a plotting application. i am using mxRelativeDateTimeDiff to get how much time is between date x and date y now what i need to do is divide that time by 20 to get 20 even time slots for plotting on a graph. For example, if the difference between them is 20 hours, i need 20 p

Re: can i move attribute values from one class to another?

2005-09-07 Thread nephish
oh wait. never mind , i figgured it out! thanks anyway -- http://mail.python.org/mailman/listinfo/python-list

can i move attribute values from one class to another?

2005-09-07 Thread nephish
heres the deal. i am working on a threading gui. pygtk in one class (main) is all the gui stuff, but in another class that is a thread, i am reading serial input. what i want to be able to do is take what read in the thread and print it in a textview in the gui class. here is what i have: class

  1   2   >