On 7/14/06, Gerhard Fiedler <[EMAIL PROTECTED]> wrote:
On 2006-07-14 18:05:56, Ivan Shevanski wrote:> Hey I'm pretty new to python and I have a question. I'm trying to write:> "[BOOT]> run=C:\windows\aawin.bat">> in my win.ini
> So I went about it like
Hey I'm pretty new to python and I have a question. I'm trying to write:"[BOOT]run=C:\windows\aawin.bat"in my win.iniSo I went about it like this:win = open('C:\windows\win.ini', 'a')
win.write('[BOOT]')win.write('\n')win.write('run=C:\windows\aawin.bat')I expected that to work, but instead of C:\
On 5/3/06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
On 2 May 2006 12:02:50 -0700, [EMAIL PROTECTED] declaimed the
following in comp.lang.python:>> Also, How can I shutdown other Linux terminals from my Main (Linux) ?> Uhm... Telnet into the other workstations using the root account (orso
On 2/23/06, Claudio Grondi <[EMAIL PROTECTED]> wrote:
Paul Probert wrote:> Hi,> My app runs in a loop looking for changes in a database, and like a> good boy I call time.sleep(1) inside the loop. Unfortunately this> sometimes runs for 200 seconds or so, presumably while my OS is calling
> Bill Ga
On 2/5/06, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
On 2/5/06, Ivan Shevanski <[EMAIL PROTECTED]
> wrote:
On 2/5/06, Florian Nykrin <[EMAIL PROTECTED]
> wrote:
Hi Byte!Your code should look like this:x = raw_input('Please enter your name: ')if x == 'my
On 2/5/06, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
On 2/5/06, Florian Nykrin <[EMAIL PROTECTED]
> wrote:
Hi Byte!Your code should look like this:x = raw_input('Please enter your name: ')if x == 'myself': print 'OK'
Because myself should be a string
On 1/25/06, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
On 1/25/06, Fredrik Lundh <
[EMAIL PROTECTED]> wrote:
Aldo Cortesi wrote:> > What do you mean?>> Well, the problem with "input" is that it allows the user to supply an> arbitrary Python _expression_, whi
On 1/23/06, Aldo Cortesi <[EMAIL PROTECTED]> wrote:
Well, leaving aside the merits of using "input" (which should be avoided at allcosts), here's one way to do what you want:while 1:try:x = input("> ")break
except SyntaxError:print "explain the problem here"Cheers,Al
Alright this is kind of a continuation of a past conversation. . .But not really. Anyway, heres the problem. Say I had this:
try: x = input("> ") except SyntaxError: print "explain the problem here" x = input("> ")That's
to catch when people just pres
On 1/20/06, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
Alright first of all I'd like to say I'm a python noob.Now that thats over with, heres what I'd like to know about. Is there a python way to detect if a variable exsists? Say I had a program that needed a certain variable
Alright first of all I'd like to say I'm a python noob.Now that thats over with, heres what I'd like to know about. Is there a python way to detect if a variable exsists? Say I had a program that needed a certain variable to be set to run and the variable was not found when it came time to use it
Looking to replace my older flavor of linux with something new. . .What
are some of your favorites for python programming and anything
else?
Thanks,
-Ivan
--
http://mail.python.org/mailman/listinfo/python-list
On 11/6/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Ivan Shevanski wrote> I know there is a way to do this, but google doesn't seem to want to find it> =) There is a command to clear the output screen right?no, because "output screen" isn't a well-defined concept o
I know there is a way to do this, but google doesn't seem to want to
find it =) There is a command to clear the output screen right?
Thanks in advance,
-Ivan
--
http://mail.python.org/mailman/listinfo/python-list
On 11/5/05, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
On Sun, 06 Nov 2005 02:39:40 +0100, Carl Friedrich Bolz wrote:> Hi!>> Ivan Shevanski wrote:>> I've searched on google for a bit but I can't seem to find a way to get>> multiples of a number. .
I've searched on google for a bit but I can't seem to find a way to get
multiples of a number. . .For instance what would I do if I wanted
something to happen every time x reached a multiple of 100 in this
sample code:
x = 0
while x < 2000:
x += 1
Thanks in advance,
-Ivan
--
http://mail.pyt
On 11/3/05, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
On 3 Nov 2005 18:28:49 -0800, Brett Hoerner <
[EMAIL PROTECTED]> wrote:
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for> a utility we use around the shop. My tool of choice is
On 3 Nov 2005 18:28:49 -0800, Brett Hoerner <[EMAIL PROTECTED]> wrote:
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for> a utility we use around the shop. My tool of choice is of course
> Python and therefore what I am using to attempt my given task. I have> no trouble pu
On 11/1/05, James Stroud <[EMAIL PROTECTED]> wrote:
Why do my posts get held for suspcious headers and troll Xha Lee gets to postall sorts of profanity and ranting without any problem?--James StroudUCLA-DOE Institute for Genomics and ProteomicsBox 951570
Los Angeles, CA 90095http://www.jamesstroud.
On 10/14/05, Peter Hansen <[EMAIL PROTECTED]> wrote:
Christian Stapfer wrote:> 0.0. ... and add an item to your SendTo folder that allows> you to have Windows Explorer open a terminal window with its> current directory set to the currently displayed folder
> (= "Open terminal here").Or install the
You can still use it, but you can't use the help. I don't know but this has always been better than the help for me! =D-- -Ivan
--
http://mail.python.org/mailman/listinfo/python-list
Thanks everyone for helping once again, lots of good ideas there
Thanks,
-Ivan
_
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
--
http://mail.python.or
>Is it *really* a good idea if the user types "STOP!!!" and it has the
>same effect as if they typed "Start please"?
>
>I've heard of "Do what I mean, not what I said" systems, which are usually
>a really bad idea, but this is the first time I've seen a "Do what I don't
>mean, not what I said" syst
Yes, I realize that. . .Heres another question then. I was trying somehting
before so that if the user just pressed enter by accident, it would not
accept the input and ask them to put in another. But the thing is I couldnt
get it to work. I tryed if choice1 == None it would loop and ask for a n
>Perhaps a better idea is to present the user with a choice that cannot
>be deviated from, along the lines of...
>
>def main():
> print "1.\tStart"
> print "2.\tSomething Else"
> print "3.\tStop"
>
> x = raw_input()
> if x is '1': print 'Start'
> elif x is '2': print 'Something else'
>
Alright heres another noob question for everyone. Alright, say I have a
menu like this.
print "1. . .Start"
print "2. . .End"
choice1 = raw_input("> ")
and then I had this to determine what option.
if choice1 in ('1', 'Start', 'start'):
#do first option
if choice1 in ('2', 'End', 'end'):
Thanks everyone for helping me out and tolerating the noob question =D The
last part was confusing to me and thanks for explaining it so I get it!
-Ivan
_
Express yourself instantly with MSN Messenger! Download today - it's FREE!
To continue with my previous problems, now I'm trying out classes. But I
have a problem (which I bet is easily solveable) that I really don't get.
The numerous tutorials I've looked at just confsed me.For intance:
>>>class Xyz:
... def y(self):
... q = 2
...
>>>Xyz.y()
Tracebac
Well I've been experimenting with the warning filter and it doesn't seem to
be working. . .I think it has something to do with the fact that warnings
are issued during the compiling and not during the excecution. . .So the
filter would come in to late to block them? Any ideas?
-Ivan
__
Here's a noob question for everyone which i can't seem to find the answer to
on google. . .Is there a way to turn off syntax warnings?
-Ivan
_
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-
Here's a noob question for everyone (I'm not sure if my first message got
through, is had a "suspicious header" so sorry for double post is so), is
there a way to turn off syntax warnings or just make them not visible?
Thanks,
-Ivan
_
Thanks for your quick responce Roy, thats exactly what I needed. =)
-Ivan
_
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
--
http://mai
Alright heres my problem. . .Say I want to carry over a variable from one
function to another or even another run of the same function. Is that
possible? Heres a quick example of what I'm talking about.
def abc():
x = 1
y = x + 1
print y
def abcd():
y = x + 1
print y
abc()
abcd
Wait. . .Do you want it on a website? I don't really understand you
-Ivan
_
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
--
http://mail.python.org/mailman/l
Not sure if you already got the answer to this lol but since this is one
thing about python i do know how to do, use CXFreeze. Its basicly a
combination of all the programs you have already tryed. Works great for me
=D sorry I dont have a link, just google it.
-Ivan
__
Just a quick mailing question for anyone who uses hotmail and gets this. Im
having problems with my filters =/ i have a filter for mails with
python-list@python.org in to or cc, but i still get some in my inbox.
anyone?
-Ivan
_
Well, the thing is that I was just using changing directories as an example
for running a name specific command, is the the
only way to run name specific commands? An example would be (what I am
actually trying to do) run the simply command
mame s1945
in the command line. MAME is, for those o
n-list@python.org
Subject: Re: How to run commands in command line from a script
Date: Thu, 30 Jun 2005 20:01:29 -0700
Ivan Shevanski wrote:
> I know there is an easy way to do this, and I just can not remember. I
have
> already searched where I thought the module would be. . . I just want t
I know there is an easy way to do this, and I just can not remember. I have
already searched where I thought the module would be. . . I just want to run
some name specific commands. Is this easily possible?
Thanks,
-Ivan
_
Expres
Hey this is probally a noob question but here goes. . .How could I open the
command line inside of a python script? Would I have to use COM?
-Ivan
_
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click
l.MIMEText import MIMEText
from smtplib import SMTP
x = 'python'
y = 'python2'
def sendToMe(subject, body):
me = '"Ivan Shevanski" <[EMAIL PROTECTED]>'
send(me, me, subject, body)
def send(frm, to, subject, body):
s = SMTP()
s.set_debugl
From: Jan Danielsson <[EMAIL PROTECTED]>
To: python-list@python.org
Subject: A question about time
Date: Thu, 09 Jun 2005 22:58:17 +0200
Hello all,
I have a list of servers which an application connects to. If the
connection fails, the application should mark the server as temporarily
una
So youre wondering how to send mail in python? I have a lot of examples if
you want the smtp module. I don't have anything for anything other than the
smtp module.
-Ivan
_
Express yourself instantly with MSN Messenger! Download tod
From: "Thomas W" <[EMAIL PROTECTED]>
To: python-list@python.org
Subject: cx_freeze error : LookupError: no codec search functions
registered:can't find encoding
Date: 9 Jun 2005 10:11:19 -0700
I get this error when I try to run a freezed exe on my ubuntu 5.04
running Python 2.4 :
LookupErro
>From: "Philip Seeger" <[EMAIL PROTECTED]>
>To: python-list@python.org
>Subject: Exe file
>Date: Thu, 9 Jun 2005 18:24:15 +0200
>
>Hi @ll
>
>I'm sorry for that newbie question but how can I compile a program (a .py
>file) to an executable file?
>
>--
>Philip Seeger
>
>
Yes there is and its very e
#!/usr/local/bin/python
''' Send mail to me '''
from smtplib import SMTP
def sendToMe(subject, body):
me = '"Ivan Shevanski" <[EMAIL PROTECTED]>'
send(me, me, subject, body)
def send(frm, to, subject, body):
s
>From: Paul McNett <[EMAIL PROTECTED]>
>To: python-list@python.org
>Subject: Re: Start application & continue after app exits
>Date: Thu, 09 Jun 2005 09:07:47 -0700
>
>Guy Lateur wrote:
> > I was wondering if it would be possible to launch an application, block
> > until the app exits, and do some
;>if __name__ == '__main__':
>> sendToMe('Testing', 'This is a test')
---
I think this seems like it would work, but I still can't seem to get it to
work. I turned on the debugging and everything seemed alright. I'll post
how I modified i
From: Steven Knight <[EMAIL PROTECTED]>
To: python-list@python.org
Subject: identifying 64-bit Windows from 2.3.5?
Date: Wed, 8 Jun 2005 23:51:15 -0400 (EDT)
If I have installed 2.3.5 from the python.org Windows installer, can
any one point me to a run-time way to identify whether I'm running o
-Ivan
>From: [EMAIL PROTECTED]
>To: python-list@python.org
>Subject: help
>Date: Thu, 2 Jun 2005 11:11:41 EDT
>
>When i try to open IDLE(python GUI) it says that i have a socket error:
>conection refused what do i do to fix this
>--
Reinstall my friend. . .Reinstalling is the cure for eve
>From: Larry Bates <[EMAIL PROTECTED]>
>To: Ivan Shevanski <[EMAIL PROTECTED]>
>Subject: Re: SMTP help please
>Date: Tue, 07 Jun 2005 07:39:01 -0500
>
>I have found that the SmtpWriter class "hides" all the
>complexity in creating emails like you
Ok, all my problems are solved except for one. . .If I want my program to
send a message back to me do I need the from adress? Because I don't
specifically know it for the person using the program. Any help is
appreciated =D
-Ivan
___
I really can't figure out anything about the SMTP module. . .I think I'm in
over my head( Im pretty new to python). Can someone show me a really(and I
mean REALLY) basic tutorial for smtp or explain it?
program:
I want to make my program have a feedback form attached to it at the end
which se
Could someone send me a good tutorial for sending mail then? The one I found
is not what I'm looking for. Also please dont send me the stmp definition
cause i've looked at that enough.
thanks,
-Ivan
_
Express yourself instantly wi
Ugh. . .I'm really confused. In the example I saw the message was taken
from a file on the computer. . .Like it opened it and then sent it. I guess
I just need to check out the whole thing a bit more before I get specific.
I'll ask again if I need specific help.
thanks,
-Ivan
__
http://python.org/doc/2.4.1/modindex.html
this is the global module index. I'd keep it handy to search through since
it has some of the most useful stuff every intented! =D Try looking through
here to help. . .That's the best I can think of.
-Ivan
_
What version of python do you use? I'll send you the module library. .
.(sorry for double message)
-Ivan
_
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
> > Can you elaborate more? Just any file?
>
>Yes -- a binary file.
>
>The file will contain check blocks for another file. The problem is
>that the order of the received check blocks is not specified, so I need
>to be able seek to the block's position in the file, and then just write
>the blo
Hey i'm new here and relatively new to python. I've made a few small
programs and now I'm making a program for my friends that at the end has a
feedback form. I want to send the feedback back to my email adress. I know
I should use the SMTP module and I have figured out how to send with it,
59 matches
Mail list logo