On Fri, 29 Jul 2005, Miguel Lopes wrote:
> I understand the subject is advanced, but I'm a newbie without a
> technological background making some technology research for a company I
> work for.
Hi Miguel,
You may want to ask this on comp.lang.python instead. The Modbus/JBUS
protocol might be
On Sun, 31 Jul 2005, Nathan Pinno wrote:
> Well, you saw my password program. That was my first attempt at using
> file I/O. Thought I'd try it big time. You saw where that went.
Ok, let's take a look. It was from this message, right?
http://mail.python.org/pipermail/tutor/2005-July/03947
On Sat, 30 Jul 2005 [EMAIL PROTECTED] wrote:
> it said this is for newbies but I download the 2.4 and I tried the stuff
> it said on the tutorial like the control-z or sys.exit () I tried the
> control-p or the python -c but it always says "'something' is not
> defined" or " invalid syntax"
He
Well, you saw my password program. That was my first attempt at using file
I/O. Thought I'd try it big time. You saw where that went.
Nathan
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, July 31, 2005 12:13 AM
Subject:
> If anyone will help me learn file I/O, it would be appreciated. I went
> through Josh Cogliani's Non-Programmer's Tutorial for Python, and I
> still can't understand it.
Hi Nathan,
Can you point out what parts don't make sense? We can try to explain
better, but we can only do so if you eithe
> I have no idea how to get the server to receive and print a message or
> for the client to send the message. Does anyone know of some good python
> networking tutorials designed for newbies? (Not ones on
> www.awaretek.com. They seem to expect you to know some things that I
> don't even know ab
hello.
I didn't read or understand your code that well.
but you asked:
> for section in config.sections():
> section = bsserver.Server()
>
> first I would like for this instance to be named the name of the host in
> the section
> but i keep getting instances named section I think doing it m
This is a little long
a program consisting of
bsserver.py ## to define server class and methods
bscaller.py ## to define a test class subclasses for services (imap
http pop dns et al)
bslogger.py ## to log and analyze tests and send emails on
exceptions/failures
bsmain.py ## that instantiates
Have you worked through the diveintopython.org tutorial/book? Chapter 6
covers file handling. If/When you get stuck post your code/question and ask
for help.
--Todd
On Saturday 30 July 2005 11:49 pm, Nathan Pinno wrote:
> If anyone will help me learn file I/O, it would be appreciated. I went
This is an easy one. Go to the IDLE, I
found it was easier. The latest Python refused to work on mine, so I'm using
2.2.3, and it works fine.
- Original Message -
From:
[EMAIL PROTECTED]
To: tutor@python.org
Sent: Friday, July 29, 2005 10:22
PM
Subject: [Tutor] cant g
Hi there,
I ran across this error when running a few lines of
code in debian python, but this runs perfectly in
windows python. Basically I created a dummy matrix
called "gamma" (using kroneckerproduct in numarray)
and printed out its mean. Here is the code:
gamma = kroneckerproduct(ones((N, 1))
Hi,
I understand the subject is advanced, but I'm a newbie without a technological
background making some technology research for a company I work for.
I wonder if there is a library for accessing/interpreting JBUS protocol in
Python.
Also, I've searched the net looking for some information so
it said this is for newbies but I download the 2.4 and I tried the
stuff it said on the tutorial like the control-z or sys.exit () I tried the
control-p or the python -c but it always says "'something' is not defined" or "
invalid syntax" where do I go or what do I do. do i go the the command
If anyone will help me learn file I/O, it would be appreciated. I went
through Josh Cogliani's Non-Programmer's Tutorial for Python, and I still can't
understand it.
Thanks in advance,
Nathan Pinno
___
Tutor maillist - Tutor@python.org
http://mai
Glad I didn't put up my mini calculator apps on my site. Would have had
complaints from people. But this thread has given me ideas on how to fix
them all, and how to fix Giant Calculator as well.
- Original Message -
From: "Reed L. O'Brien" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PR
I've got a little problem with my socket program(s):
#Client
import socket
#create an INET, STREAMing socket
s = socket.socket(
socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 2000))
s.send('hello!'[totalsent:])
#Server
import socket
#create an INET, STREAMing socket
serversocket
I never have it. Although when I ask for option I use
int(raw_input('Option:')) instead of raw_input('Option:'). That's usually
near the top, but part of a while loop.
- Original Message -
From: "Kent Johnson" <[EMAIL PROTECTED]>
Cc:
Sent: Saturday, July 30, 2005 8:55 PM
Subject: Re: [T
You are almost there.
Do you undestand why you are getting the output that you are getting?
Pretend that you are the computer and walk through what happens when you enter
9 at the menu:
while cal_opt != 9:
menu()
cal_opt = cal() # This is where you entered '9' so cal_opt
Do you have a call to raw_input() at the end of your program? That will make
you press return to exit the program. It's useful for command-line programs
that you want to run by double-clicking them but you can take it out if you
find it annoying.
Kent
Nathan Pinno wrote:
> I meant the return k
Here is another screen shot:
Mini Calculator
By Nathan Pinno
CALCULATE MENU
1) Add
2) Subraction
3) Multiplication
4) Division w/o remainder
5) Division with remaider
6) Exponation
7) Square roots
9) Exit
Option: 3
First number:4
Second number:6
4 * 6 = 24
CALCULATE MENU
1) Add
2) Subraction
3) M
Thanks Todd. Can you please look at my other messages that you haven't
answered, and see what's wrong with them, or what the answer is.
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Saturday, July 30, 2005 8:10 PM
Subject: Re: [Tutor] When I run this code, it just keeps repeat
Looks like you are making some pretty good progress.
The short answer to your question is that the menu & user input need to be
inside the while loop. That way cal_opt has a chance to change value before
it gets evaluated by the while loop again.
Another comment - the global cal_opt is conside
When I run the following code it just keeps repeating. Here is a screen
shot showing what I mean:
Mini CalculatorBy Nathan Pinno
CALCULATE MENU1) Add2) Subraction3) Multiplication4)
Division w/o remainder5) Division with remaider6) Exponation7)
Square roots9) ExitOption: 5First number:4Seco
How does the user indicate that they are done with the program?
One solution is to ask at the end of each iteration if they want to repeat.
Psuedocode:
keep_going=True
while(keep_going)
Run your program stuff
keep_going = get_user_response("Do you want to run again?")
--Todd
On Saturd
Hi all,
How do I make a program keep repeating until the user is done with
it?
Thanks,
Nathan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
There is only 1 parenthesis on the prior line, but lots of commas.
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Saturday, July 30, 2005 5:22 PM
Subject: Re: [Tutor] What's the invalid synax? Error message and
codesupplied.
>
> I'd count the parenthesis on the prior line:
>
I'd count the parenthesis on the prior line:
option = int(raw_input('Option (1,2,3,4,5,6,9): ')
while option != 9:
Also when you notice that you are copying and pasting the same line over and
over, it may be time to think about reorganizing the code a little bit (Once
you have it working)
Here's the message:
File "D:\Python22\prog4.py", line 19 while
option != 9: ^SyntaxError:
invalid syntax
And the code:
#This program finds the area and perimeter of circles, rectangles, and
squares.def menu(): print '1) Area
(Circle)' print '2) Area
(Rectangle)' print '
I meant the return key, not the spacebar. Sorry for the mix-up.
- Original Message -
From:
Nathan
Pinno
To: tutor@python.org
Sent: Saturday, July 30, 2005 3:50
PM
Subject: [Tutor] How do I get rid of
blank space when running a program I'vecoded?
Hi all,
Hi all,
I'll be brief. I always get a blank line whenever I run my Python programs
that I've coded. How can I get rid of it. It's kind of annoying to press the
spacebar in order to return to >>> in IDLE or the C:\ prompt in
DOS.
Thanks,
Nathan
_
I'm working on a WinXP SP-2 OS.
I'm too ill-informed to figure this out: When I execute
C:\Python24\python.exe
I get
'import site' failed.; use -v for traceback
ActivePython 2.4.1 Build 247 ...
I then ran this from a DOS window, and tried to redirect the -v output to
a text file, so I could
Jeff Peery wrote:
>
> Hello, I have a signal that I want to do a fourier transform on. I
> tried using FFT.fft(data).real but I don't understand the output.
> what is output from this function, and why doesn't it require
> amplitude and time as inputs?
Hi Jeff,
As Danny wrote, your input are
> I have the following code to traverse a directory structure from a
> given path:
I'm not sure what you are using the browse function for.
Normally with path.walk you would use browse)() to modify
the namelist argument value and thus modify the path walked
by path.walk(). You appear to be trying
Jorge Louis De Castro wrote:
> Hi all,
>
> I have the following code to traverse a directory structure from a given
> path:
>
> import os, fnmatch, re
> folders = []
> r = re.compile(r'file_filter') # msn_username is passed by the user
>
> def browse(junk, dirpath, namelist):
> for name in na
> Hello, I have a signal that I want to do a fourier transform on. I tried
> using FFT.fft(data).real but I don't understand the output. what is output
> from this function, and why doesn't it require amplitude and time as
> inputs?
Please write the package you use for FFT. Standard Python doesn'
Hi all,
I have the following code to traverse a directory structure from a given
path:
import os, fnmatch, re
folders = []
r = re.compile(r'file_filter') # msn_username is passed by the user
def browse(junk, dirpath, namelist):
for name in namelist:
if r.search(name):
folders.append
36 matches
Mail list logo