Re: When writing text. . .

2006-07-24 Thread Ivan Shevanski
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 this: win = open('C:\windows\win.ini', 'a') win.write

When writing text. . .

2006-07-14 Thread Ivan Shevanski
Hey I'm pretty new to python and I have a question. I'm trying to write:[BOOT]run=C:\windows\aawin.batin 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

Re: Wake on LAN and Shutdown for Windows and Linux

2006-05-03 Thread Ivan Shevanski
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 (orsome other

Re: time.sleep(1) sometimes runs for 200 seconds under windows

2006-02-23 Thread Ivan Shevanski
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 Gates to

Re: Learning Python

2006-02-05 Thread Ivan Shevanski
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 and not a variable name, you have toput

Re: Learning Python

2006-02-05 Thread Ivan Shevanski
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 == 'myself': print 'OK' Because myself should

Re: Loop exception catching

2006-01-25 Thread Ivan Shevanski
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_, which will then be executed. Among other things

Re: Loop exception catching

2006-01-24 Thread Ivan Shevanski
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 hereCheers,AldoThanks, that seems to work fine. But

Loop exception catching

2006-01-23 Thread Ivan Shevanski
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 press enter by mistake without selecting something from

Variables and none?

2006-01-20 Thread Ivan Shevanski
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.

Re: Variables and none?

2006-01-20 Thread Ivan Shevanski
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 to be set to run

Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Ivan Shevanski
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

Re: Multiples of a number

2005-11-06 Thread Ivan Shevanski
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. . .For instance what would I do if I wanted something

Clearing output screen

2005-11-06 Thread Ivan Shevanski
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

Re: Clearing output screen

2005-11-06 Thread Ivan Shevanski
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 on modern operating systems.the

Multiples of a number

2005-11-05 Thread Ivan Shevanski
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 --

Re: putting an Icon in My Computer

2005-11-03 Thread Ivan Shevanski
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 putting Icons

Re: putting an Icon in My Computer

2005-11-03 Thread Ivan Shevanski
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 of course Python and therefore what I am using

Re: WTF?

2005-11-01 Thread Ivan Shevanski
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

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-15 Thread Ivan Shevanski
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 Command

Re: Newbie needs help. Setting PYTHONDOCS to read HTML.

2005-10-10 Thread Ivan Shevanski
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

Re: noob question Letters in words?

2005-10-08 Thread Ivan Shevanski
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/ --

noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
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'):

Re: noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
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' elif x is '3':

Re: noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
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

Re: noob question Letters in words?

2005-10-07 Thread Ivan Shevanski
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 system. =D

Re: Class Help

2005-10-02 Thread Ivan Shevanski
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!

Re: Help with syntax warnings

2005-10-01 Thread Ivan Shevanski
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

Turning off syntax warnings?

2005-09-30 Thread Ivan Shevanski
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!

Help with syntax warnings

2005-09-29 Thread Ivan Shevanski
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

Re: Carrying variables over from function to function

2005-09-26 Thread Ivan Shevanski
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 --

Carrying variables over from function to function

2005-09-25 Thread Ivan Shevanski
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()

RE: Survey Tool

2005-08-31 Thread Ivan Shevanski
Wait. . .Do you want it on a website? I don't really understand you -Ivan _ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ --

Re: py to exe: suggestions?

2005-08-30 Thread Ivan Shevanski
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

hotmail filter question with list

2005-08-11 Thread Ivan Shevanski
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

Re: How to run commands in command line from a script

2005-07-01 Thread Ivan Shevanski
Well, the thing is that I was just using changing directories as an example for running a name specific command, is the long winded reply here 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

Open the command line within a script

2005-06-30 Thread Ivan Shevanski
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 _ Don’t just search. Find. Check out the new MSN Search!

Re: How to run commands in command line from a script

2005-06-30 Thread Ivan Shevanski
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 to run some name specific commands. Is this easily

Re: help with sending mail in Program

2005-06-15 Thread Ivan Shevanski
= 'Ivan Shevanski [EMAIL PROTECTED]' send(me, me, subject, body) def send(frm, to, subject, body): s = SMTP() s.set_debuglevel(1) s.connect('D421LN41') # s.ehlo('69.137.27.32') msg = MIMEText(body) msg['To'] = to msg['Subject'] = subject msg['From'] = frm s.sendmail(frm2, [to2

RE: identifying 64-bit Windows from 2.3.5?

2005-06-09 Thread Ivan Shevanski
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 on

Re: help with sending mail in Program

2005-06-09 Thread Ivan Shevanski
''' 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 = SMTP() #///On or off for test\\\ #s.set_debuglevel(1) s.connect('mail.hotmail.com',) s.ehlo('69.137.27.32') # IP address

Re: Start application continue after app exits

2005-06-09 Thread Ivan Shevanski
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 cleanup

Re: help with sending mail in Program

2005-06-09 Thread Ivan Shevanski
#!/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 = SMTP() #///On or off for test\\\ #s.set_debuglevel(1) s.connect

RE: Exe file

2005-06-09 Thread Ivan Shevanski
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 easy, simplely use

RE: cx_freeze error : LookupError: no codec search functions registered:can't find encoding

2005-06-09 Thread Ivan Shevanski
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 : LookupError:

RE: smtpd module

2005-06-09 Thread Ivan Shevanski
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

RE: A question about time

2005-06-09 Thread Ivan Shevanski
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

RE: help

2005-06-08 Thread Ivan Shevanski
-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

Re: Help with SMTP

2005-06-07 Thread Ivan Shevanski
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

Re: SMTP help please

2005-06-07 Thread Ivan Shevanski
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 want to send. Check it out here: http

help with sending mail in Program

2005-06-06 Thread Ivan Shevanski
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,

Re: Creating file of size x

2005-06-06 Thread Ivan Shevanski
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 block. --

Re: Creating file of size x

2005-06-06 Thread Ivan Shevanski
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/

Re: Creating file of size x

2005-06-06 Thread Ivan Shevanski
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

Re: help with sending mail in Program

2005-06-06 Thread Ivan Shevanski
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

Re: help with sending mail in Program

2005-06-06 Thread Ivan Shevanski
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

SMTP help please

2005-06-06 Thread Ivan Shevanski
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