Hey all,
I keep getting a connection error 111 connection refused. When i try to
connect to a server at a remote ip address.
I am using linux on both computers.
the socket server looks like this:
#!/usr/bin/python
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
def
Hey all,
I keep getting a connection error 111 connection refused. When i try to
connect to a server at a remote ip address.
I am using linux on both computers.
the socket server looks like this:
#!/usr/bin/python
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
def
n_pattern if you
> watch at the sample implementation, there is a Python example too.
>
> Mac.
>
> On Tue, 2009-07-28 at 10:45 -0500, shawn bright wrote:
>> Hey all,
>>
>> I have an app that runs in a GUI written in pygtk. It spawns several
>> threads, and r
Thanks for the pointers Wayne, Tino,
Looks easier than i had thought.
sk
On Tue, Jul 28, 2009 at 11:10 AM, Tino Dai wrote:
> On Tue, Jul 28, 2009 at 11:45 AM, shawn bright wrote:
>>
>> So, my question is, how can i write something that will know if there
>> is an insta
Hey all,
I have an app that runs in a GUI written in pygtk. It spawns several
threads, and runs all the time.
It is mission critical that we can never have two instances of this
running at once.
So, my question is, how can i write something that will know if there
is an instance of that something
cool, thanks again
sk
On Fri, May 29, 2009 at 5:09 PM, Alan Gauld wrote:
>
> "vince spicer" wrote
>>
>> import commands
>> output = commands.getout("ls -lah")
>
> There are many ways to do this in Python including os.popen, commands and
> subprocess.
>
> But subprocess is the "officially correct
kick butt, gents, thanks a lot
sk
On Fri, May 29, 2009 at 4:39 PM, W W wrote:
> On Fri, May 29, 2009 at 4:27 PM, shawn bright wrote:
>>
>> Hey all
>>
>> I have a small program that when run from the command line, will
>> return a certain value for an argueme
Hey all
I have a small program that when run from the command line, will
return a certain value for an arguement. Like this:
> mfetchz 45
> 45j
so the program is mfetchz and the argument is 45
i know i can call the program with os.system("mfetchz 45")
but how do i get the return?
The OS is lin
cool thanks for the help.
-shawn
On Wed, Dec 10, 2008 at 1:29 PM, Steve Willoughby <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 10, 2008 at 01:15:18PM -0600, shawn bright wrote:
>> Sorry, was not very specific in my request.
>>
>> say i have a script like
>>
>
cesses (so I'm told).
> -HTH,
> Wayne
> On Wed, Dec 10, 2008 at 12:28 PM, Steve Willoughby <[EMAIL PROTECTED]>
> wrote:
>>
>> On Wed, Dec 10, 2008 at 12:23:48PM -0600, shawn bright wrote:
>> > Hey gents,
>> >
>> > I have an interesting problem
Hey gents,
I have an interesting problem. I need to have a python script start
when a computer boots up, and i need it to run forever.
I also am going to run a script by cron that will check to see if the
process is running, if not, i need a python script to execute
the script.
What would be a go
Hey all.
I have a rather large app that uses 14 threads that all run at the same time.
i use threading.Thread().start() to set them off.
each one runs somthing like this
def run():
while 1:
do a bunch of stuff
time.sleep(60)
i have the option i guess of having fewer thread
Hey all,
I am back again with the serial port stuff, i have verified that all
the baud rate and settings are ok,
had my unit talk directly to a serial port reader and it is looking
good, however, i still am not seeming to be able to read this.
I had a question that might make me a clue.
if i do t
, Nov 3, 2008 at 10:14 PM, Brian C. Lane <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> shawn bright wrote:
>> Forgot some info,
>> i hooked the device up and used a serial terminal and got back stuff like
>> this
>> !^V$G(
, Jerry Hill <[EMAIL PROTECTED]> wrote:
> On Mon, Nov 3, 2008 at 4:08 PM, shawn bright <[EMAIL PROTECTED]> wrote:
>> yes, they look like this
>> ��
>>
>> so i used your print repr(chr(ord(i))) and got this
>
> Note that that's the
#x27;J'
's'
'\xde'
'\xc0'
'\xce'
'\xcc'
'\x06'
'\n'
'\x00'
'\x00'
' '
'\xaf'
'J'
's'
'\xde'
'\xc0'
so, what do i do now?
and thanks for the info
d(i))
i get the same weird characters.
should these be read some other way?
thanks,
shawn
On Mon, Nov 3, 2008 at 8:14 AM, shawn bright <[EMAIL PROTECTED]> wrote:
> Hey all, sorry, but am i supposed to be using 'rb' to read this?
> thanks
>
> sk
>
> On Sun, N
Hey all, sorry, but am i supposed to be using 'rb' to read this?
thanks
sk
On Sun, Nov 2, 2008 at 11:50 AM, shawn bright <[EMAIL PROTECTED]> wrote:
> Thanks all,
> Yeah, checked the settings, and when i have the thing talk to a
> program that just prints out whatever
same
problem. Just don't know how to read it.
thanks
shawn
On Sun, Nov 2, 2008 at 9:38 AM, Brian C. Lane <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> shawn bright wrote:
>> Hey there all,
>>
>> I have a gps device that tal
the fields of data.
thanks for any suggestions on this.
shawn
On Sat, Nov 1, 2008 at 11:02 PM, bob gailer <[EMAIL PROTECTED]> wrote:
> shawn bright wrote:
>>
>> Hey there all,
>>
>> I have a gps device that talks to the computer over a serial port.
>> i a
Hey there all,
I have a gps device that talks to the computer over a serial port.
i am using the pyserial module and getting values in.
Here is my delima,
i am supposed to read a message in that starts with a $ (this is all ascii).
but when i do a ser.read(16) and i try to print it to a screen,
Thanks for all your help on this, gents.
found what works.
shawn
On Mon, Oct 20, 2008 at 6:06 PM, Alan Gauld <[EMAIL PROTECTED]>wrote:
> "shawn bright" <[EMAIL PROTECTED]> wrote
>
> i have a script that needs to send a number as two bytes.
>> how would i b
reasonable but I can't be sure.
>
> On Mon, Oct 20, 2008 at 11:20 AM, shawn bright <[EMAIL PROTECTED]> wrote:
>> jeez, i screwed up, i ment num = 600, not 6
>> thanks
>>
>> On Mon, Oct 20, 2008 at 11:16 AM, Luke Paireepinart
>> <[EMAIL P
left,
> 01101011
> and that is your low value.
>
> On Mon, Oct 20, 2008 at 11:04 AM, shawn bright <[EMAIL PROTECTED]> wrote:
>> so using this, if num ==6, then i should get 2 and 88 ?
>> thanks, just checking to make sure i get what you wrote.
>> sha
D]>
> Date: Mon, Oct 20, 2008 at 11:00 AM
> Subject: Re: [Tutor] how to see a number as two bytes
> To: shawn bright <[EMAIL PROTECTED]>
>
>
> high, low = ((num % 2**16) >> 8, num % 2**8) or something thereabouts.
>
> On Mon, Oct 20, 2008 at 10:47 AM, shawn br
hey there all,
i have a script that needs to send a number as two bytes.
how would i be able to see a number expressed as a hi byte and a lo byte?
thanks
shawn
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Thanks, sorry i was late getting back to you, but gmail thought this
was spam. Go figure.
Anyway, SOAPpy is doing great. Thanks
shawn
On Wed, Apr 30, 2008 at 2:05 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> > POST /soap/SMS.asmx HTTP/1.1
> > Host: api.upsidewireless.com
> > Content-Type: t
Hey there all,
I have been spending some time trying to get my head around how to
send info by POST and read the result.
These are examples of what i need to read and write . I think i can
pull off the writing part, but how do i call it?
POST /soap/SMS.asmx HTTP/1.1
Host: api.upsidewireless.com
thanks all, appreciate it much.
shawn
On Sun, Mar 16, 2008 at 6:10 PM, Nathan McBride <[EMAIL PROTECTED]> wrote:
> Yup I use the pexpect module for a lot however couldn't get 'pexpect.run' to
> work with mysqldump piping to gzip
>
>
> -Original Message-
> From: Jeff Younker <[EMAIL PROT
Lo there all,
I am needing to get a response back from a system command.
i can do this:
os.system('mailq | wc -l")
if i do this in the terminal mailq | wc -l , it will spit out a number.
How do i get that number as a python variable ?
OK, thanks.
shawn
gt; The format string will depend whether you need little or big endian.
>
>--Michael
>
>
>
> On Jan 29, 2008 4:13 PM, shawn bright <[EMAIL PROTECTED]> wrote:
> > Thanks for your reply.
> > i need to do this in python because python is what scripting language
Thanks for your reply.
i need to do this in python because python is what scripting language
our data I/O system is written in.
i am writing a command out over a serial port that tells an RTU to
change part of it's program. I am not sure what you mean by using it
in any other python context, this i
Hello there all.
I have a need to make a hi byte and lo byte out of a number.
so, lets say i have a number 300, and need this number to be
represented in two bytes, how do i go about that?
thanks for any tips,
sk
___
Tutor maillist - Tutor@python.or
nk I found on google
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/439094
>
> jay
>
>
> On Jan 2, 2008 9:00 AM, shawn bright <[EMAIL PROTECTED]> wrote:
>
> > It returns this
> > ('hostname', [], [' 127.0.1.1'])
> > i am ru
nux/Unix system? What does this
> return?
>
> print socket.gethostname()
> print socket.gethostbyaddr(socket.gethostname ())
>
> j
>
>
> On Jan 2, 2008 8:45 AM, shawn bright <[EMAIL PROTECTED]> wrote:
>
> > Thanks, Jay,
> > in IDLE, this gave me
name())[2]
>
> Jay
>
> On Jan 2, 2008 8:25 AM, shawn bright < [EMAIL PROTECTED]> wrote:
>
> > Greetings,
> >
> > i am looking for an easy way to get my own ip address as a string from
> > python.
> > I am using
Greetings,
i am looking for an easy way to get my own ip address as a string from
python.
I am using Ubuntu Linux if that makes any difference.
thanks !
shawn
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
i did something very similar to this. My daughter would stay on her instant
messenger (gaim) all night if i didn't. i have a cron script that checks the
hour of day, if later than x pm. does
os.system("/etc/init.d/network stop")
os.system("chmod a-x /etc/init.d/network") ( so that a reboot doesn't
n the admin part
of the program. But the main computer at work that takes data in will need
the modules to run the threads.
thanks for your help on this
shawn
On 9/26/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
>
> shawn bright wrote:
> > lo there all,
> >
> > i ha
lo there all,
i have a gui program that imports a few modules that i don't need if i am
using the program remotely.
The program has an admin interface and thread interface, only the admin
interface is needed when
i am using the program from a remote computer.
all of my modules are imported at the
Just what i was looking for, thanks
shawn
On 9/14/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
>
> "shawn bright" <[EMAIL PROTECTED]> wrote
>
> > i am sure i do it with sys args, but don't know how.
> >
> > like
> >
> > python
lo there all,
i want to write a program that will be called from another program.
I need to pass it one variable.
i suppose i could also do this with a module, and create a new instance of
whatever i want to pass it to,
but all the same, how would i go about this. like if i had a program that i
wa
sorry all, i did mean greatest to least, thanks for all the help here
shawn
On 8/8/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
>
> Tiger12506 wrote:
> >> Just curious: Is there a reason to use __getitem__() over itemgetter
> (used
> >> in the example in my reply)?
> >
> > __getitem__ is a method b
hello there all,
i am wondering how to sort a dictionary that i have by values.
And i also need to sort them from greatest to least
like if i have a dictionary
d = {'a':21.3, 'b':32.8, 'c': 12.92}
how could i sort these from least to greatest
so that the order would turn out
b,a,c
thanks
shawn
_
If i have a thread, of type threading.Thread
that i initiate with an __init__
in the
def run(self):
while 1:
do some stuff
is there a way i can stop this thread and restart this thread from within
itself ?
thanks
___
Tutor maillist - Tu
something is failing and how
soon
i could re-connect to the data server.
whew !
thanks
shawn
On 7/20/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> If i have a thread, of type threading.Thread
> that i initiate with an __init__
> in the
> def run(sel
Hello there,
if i have a python datetime object, what is the easiest way to make it into
epoch seconds ?
thanks
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
change the name of the module, simple.
thanks
shawn
On 7/19/07, Tiger12506 <[EMAIL PROTECTED]> wrote:
If the module has been imported before your code is run, it will be the
library module (very important if working in IDLE which importants many
modules, for example). But if it has not been imp
hello there,
if i have a module that is in the same directory as the file that imports
it,
but that module has the same name as a module in my python path, which one
gets imported ?
i ask because i want to do some work on the module, but dont want to mess
with my stable
one in site-packages.
so
Hey thanks for this,
yes, i used the easy_install method and it did work on the python 2.4, the
python 2.5 failed.
shawn
On 7/18/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
Terry Carroll wrote:
> On Wed, 11 Jul 2007, shawn bright wrote:
>
>> Hey there all,
>> i got
Hey there all,
i got the news that storm was released as open source. Storm is a db orm for
python.
i have a downloaded package and i would like to play with it, but it does
not come with any install instructions.
i found the package here https://storm.canonical.com/FrontPage
there is a makefile i
Hey thanks,
i finally did get a function working.
i posted it on www.bitsbam.com
i did guess that the puchMsg++ ment that it was iterating through the bytes
of an array.
And Kent and Alan helped me get through the other parts.
I am glad for all this help, because this is an issue that comes up
i
Well, I contacted the programmer of these controls and the reason they
mask the MSB on these reports is to designate what type of sensor it
is. If the MSB is set, the sensor is one type, if not, another. So,
knowing that i could put these together ok. To me, the speed is of no
consequence like it w
hello all,
i have a number 12480
i have a low byte of 192 and a high byte of 176
so i can do this
IDLE 1.2.1 No Subprocess
>>> (176 & 127) * 256 + 192
12480
but if i start with the 12480, how do i get the two bytes (lo and hi)
that make it up?
i kinda know what i am doing here,
Thanks Alan,
so do you think my translation is close?
i do not know a lick of c. Nope, not one line.
thanks
shawn
On 7/5/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> "shawn bright" <[EMAIL PROTECTED]> wrote
> while (usDataLen––)
> {
>
< 8 | crc_lo)
whaddya think?
On 7/5/07, shawn bright <[EMAIL PROTECTED]> wrote:
> 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)
>
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 ;
unsi
wait, sorry, thats 16 bits total, a low byte and a high byte.
If that makes more sense
thanks
On 7/4/07, shawn bright <[EMAIL PROTECTED]> wrote:
Hello there all,
Does anyone know where i can find a function that does an 8 bit Cyclical
Redundancy Check.
I need it to verify data, and i n
Hello there all,
Does anyone know where i can find a function that does an 8 bit Cyclical
Redundancy Check.
I need it to verify data, and i need to be able to create one given an 12
byte message. Does anyone know much about doing this in python ?
thanks
__
you can use gedit with some plugins that make it pretty much like an ide,
and its really fast.
another really cool one is JEdit. That is what i used before i switched to
vim to do everything.
runs on everything, has what you are looking for. Eclipse with PyDev is
cool, too. But a little heavy for
Hey there all,
i know this sounds kinda easy, but i was wanting the least verbose way to
get a True / False of a number being odd (not even)
thanks
shawn
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
nevermind, i found it.
4 %2 = 0 (even)
5 %2 = 1 (odd)
pretty simple
shawn
On 5/14/07, shawn bright <[EMAIL PROTECTED]> wrote:
Hey there all,
i know this sounds kinda easy, but i was wanting the least verbose way to
get a True / False of a number being odd (not even)
thanks
cool, thanks
sk
On 5/11/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> lo there all,
>
> i have a simple thread that i want to run without piping any output to
> the terminal.
> like if i do an
>
> x = os.system("ping -c 1 www.google.com
lo there all,
i have a simple thread that i want to run without piping any output to the
terminal.
like if i do an
x = os.system("ping -c 1 www.google.com")
i don't want it to show all the stuff in the terminal.
can i disable that ?
can i disable it for only certain lines?
thanks
___
good enough, i suppose i can use a try, except to test if i am online and
from that have a true / false.
That is what i was looking for. I just didn't think it necessary to pull a
webpage every 20 minutes.
thanks
shawn k
On 5/1/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
"shawn
ok, cool.
thanks
sk
On 4/30/07, Jalil <[EMAIL PROTECTED]> wrote:
ping a host on the net if you get an echo response back you are good.
better yet ping the host page you are scraping.
On 4/30/07, shawn bright < [EMAIL PROTECTED]> wrote:
>
> hello there all,
>
> i am
hello there all,
i am wondering, what would be the simplest way to get a true/false
am i connected to the internet ?
right now i am using httplib to fetch a webpage every 20 minutes to see, but
i am thinking that there is a better way,
any suggestions would be encouraging
thanks
shawn
jeeze, thanks, sorry, stupid question.
On 4/24/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> shawn bright wrote:
> > now there is one function that i have a kinda nested if else
> > conditions that i need to stop if necessary
> >
> > if value == 1:
> >
hello all,
i have a gui app that uses functions to respond to gui events.
like
def on_start_button_clicked(self, stuff):
do this or that.
now there is one function that i have a kinda nested if else
conditions that i need to stop if necessary
if value == 1:
if next_val == 4:
do t
lo there all,
i have been working with pygtk2 for a while now, and, though i do like
the look and feel of a GTK2 app, i would like to do some stuff with
wx. I know, it doesn't look as cool, but , i may have need to work on
something that i can port to a windows box, and i think that wx would
be a
OK, will do. Looks like my future will involve more of this kind of thing.
thanks
shawn
On 3/11/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote:
> On Sun, Mar 11, 2007 at 09:07:41PM -0500, shawn bright wrote:
> > Well, for your first response, its great,
> > thanks a lot.
> &
ript with the formatting "python (filename).py 1 1", not
> "python (filename).py -1 -1", that'll get you negative numbers.
>
> shawn bright wrote:
> > lo there all,
> >
> > i was wondering how to make a python script accept command line arguments.
>
lo there all,
i was wondering how to make a python script accept command line arguments.
i mean, i have used python scripts from the command line in linux and
passed something to it and it knows what to do.
like in a function, if i want to do something like this
def add_two_numbers(a, b):
x
Hello there all,
i am poplib to retrieve mail from a pop server here on my local machine.
i need to be able to forward every message i get to another email address.
i looked through the poplib page on the reference online but i can't
find anything there to help me out with this. Also, the message
TED]> wrote:
>
> "shawn bright" <[EMAIL PROTECTED]> wrote
>
> > if i use i bitmask of 240 it will mask the most significant 4 bits
>
> When using bitmasks its much easier to think in hex (or octal).
> there are exactly 2 hex digits per byte so you only need to
whoops, meant this to the list, sorry Luke.
On 2/23/07, shawn bright <[EMAIL PROTECTED]> wrote:
> Thanks for your help, Luke.
> i am trying to get a grasp on how all this works, which is the msb, lsb, etc..
>
> if i use i bitmask of 240 it will mask the most significant 4 bits
ist of the 2nd half
of the 2nd byte as the most significant , i would take the second byte
with my bitmask then shift it right by 4 then add the third byte to
that am i getting this right
like x = ((byte2 & 240) << 4) + byte 3
i think ?
shawn
On 2/23/07, Luke Paireepinart <[EMAIL
the struct module, but can't figgure out how to do
this type of thing with it.
thanks
shawn
On 2/21/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> shawn bright wrote:
> > oh, sorry, i meant how to get the 0x0A27 out of two bytes
> > a = 0x27 and b = 0x8A
> I don
Hey thanks for all the help guys, i am at least pulling some values
that make sense.
i feel more like i am on my way.
thanks again
shawn
On 2/21/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> "Kent Johnson" <[EMAIL PROTECTED]> wrote
> > This is also a good application of bitwise operations.
> >
>
the numbers
so, i guess a better question is how to get 2599 from the ord(a) and
ord(b), how do i put the two bytes together to make one number?
thanks for your help
On 2/21/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> shawn bright wrote:
> > Hey all, thanks for the help yeste
Hey all, thanks for the help yesterday on finding out if an msb is set or not.
i am now kinda stumped with discovering the value of two bytes together.
ok, if i have two bytes that together make a number, how do i find that number?
i know that i do not add them.
like byte_a = 39
byte_b = 138
to
even better, thanks much for this.
shawn
On 2/21/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Luke Paireepinart wrote:
> > shawn bright wrote:
> >> lo there all,
> >>
> >> i am reading a binary file with open('myfile', 'rb'
great, thanks for this. appreciate it a lot.
sk
On 2/20/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> lo there all,
>
> i am reading a binary file with open('myfile', 'rb')
>
> then i do a read(1) to read one byte. cool so
lo there all,
i am reading a binary file with open('myfile', 'rb')
then i do a read(1) to read one byte. cool so far.
but how do i read the individual bits of a byte
i mean if i have a = read(1)
how do i know what the msb of a is ?
i need to know because i have to see if the msb is set and i
great, saves me 15 lines.
thanks
sk
On 2/11/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> one last queston. if i have a class that i import as a module, say a
> script that emails me when something goes wrong.
> so i have a file called my_own_email.py an
lan G.
On 12/31/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> "shawn bright" <[EMAIL PROTECTED]> wrote
>
> > Yes, the thing is getting to be a pain to deal with at this size, i
> > am
> > in-process of splitting out the classes into their own files.
nt
modules that would need to use it?
Or does this go along with what you wrote a while back about having classes
that depend on each other ?
One runs as a thread, the other responds to gui input.
thanks for any tips.
shawn
On 12/31/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
"shawn brig
Thanks Kent,
i am going with option A, the helper set, because i also need to count
the occurances and this seems to be the easiest solution.
thanks for your help.
shawn
On 1/28/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> lo there all.
>
> i have a lis
lo there all.
i have a list of lists that i want to build, only if an item is not in the
list already.
kinda like this
new_list = []
for item in lists: # item will look something like [var1, var2, var3]
if item[0] in new_list ( only the first element of each list ) like
new_list[0][0]
basicl
i think pydev ( an eclipse plugin ) can too.
shawn
On 1/27/07, Dick Moores <[EMAIL PROTECTED]> wrote:
At 07:12 PM 1/24/2007, Shadab Sayani wrote:
Hi,
I am using vim editor to code my project in python.Is there a good IDE
where in I type the name of the class object and then dot then all the
a
nction(req_var, req_var2, un_req_var=None):
if un_req_var != None:
dosomething
else:
dosomethingelse
Wesley Brooks.
On 26/01/07, shawn bright <[EMAIL PROTECTED]> wrote:
> lo there all,
>
> if i have a function that sometimes needs a value passed to it and
sometimes
lo there all,
if i have a function that sometimes needs a value passed to it and sometimes
not, is this where i use *args ?
like this
def some_function(req_var, req_var2, un_req_var):
do some stuff
return value
how would i use this if sometimes i need to process un_req_var and sometimes
hey there gents, i was wondering if anyone uses pydev ?
its a plugin for eclipse. Has lots of cool stuffs, but i don't like the way
it does code snippets,
when i paste one that is kinda long, it messes up the indentation.
anyone know a way around this ? i have posted this question on the pydev
sou
this is really cool. working too,
we have one provider now that it does not work with, but i think its them
this time.
thanks for your help on this
shawn
On 1/5/07, Christopher Arndt <[EMAIL PROTECTED]> wrote:
shawn bright schrieb:
> lo there all.
>
> i am in a tight spot be
l Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of shawn bright
> Sent: Friday, January 05, 2007 10:18 AM
> To: tutor-python
> Subject: [Tutor] need help with sending email
>
> lo there all.
>
> i am in a tight spot because i need to send an email tha
lo there all.
i am in a tight spot because i need to send an email that it mime encoded
plain-text ( not html or anything )
no attachements, no images, just text from a string. like message = 'some
message'
all the tutorials i find out there, and the cookbook recipies are for
sending multipart me
i can do that, will use my config file,
thanks much
and thanks for the link.
shawn
On 1/4/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> hello there all,
>
> i have a python reference book that got me started knowing how to use
> threads, i can declare o
hello there all,
i have a python reference book that got me started knowing how to use
threads, i can declare one as a class, and start it like this
class SomeThread(threading.Thread):
run_process = SomeThread()
run_process.start()
but how do i kill it ? This part is not in my book. Basically
thanks, luke, Andre.
appreciate it a lot
shawn
On 1/3/07, Andre Roberge <[EMAIL PROTECTED]> wrote:
On 1/4/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
>
> shawn bright wrote:
> > hello there,
> > i am writing an app for linux. what command would be ea
hello there,
i am writing an app for linux. what command would be easiest to test and see
if a certain file exist ?
i was going to do something like this
try:
file = open('/path/to/file', 'rb')
return True
except:
return False
but i thought that there would be an easier way.
thanks
_
1 - 100 of 147 matches
Mail list logo