On Fri, 27 Feb 2009 09:59:40 +0530, prasad rao wrote:
> def myform(s):
> import os
> so=open(s)
> d=os.path.dirname(s)+os.sep+'temp.txt'
> de=open(d,'w')
> for line in so:
> while len(line)>60:
> item=line[60:]
> try:
> a
Le Thu, 26 Feb 2009 21:53:43 -0800,
Mohamed Hassan s'exprima ainsi:
> Hi all,
>
> I am new to Python and still trying to figure out some things. Here is the
> situation:
>
> There is a text file that looks like this:
>
> text text text Joseph
> text text text text text text text text text text
Le Fri, 27 Feb 2009 00:06:59 -0500,
David s'exprima ainsi:
> Hi Everyone,
> I go through the archived [Tutor] mail list to find programs others have
> tried to do. I found one that would keep track of a petty cash fund.
> please point out my misunderstanding.
> Here is what I started with;
>
>
Le Fri, 27 Feb 2009 00:06:59 -0500,
David s'exprima ainsi:
> Hi Everyone,
> I go through the archived [Tutor] mail list to find programs others have
> tried to do. I found one that would keep track of a petty cash fund.
> please point out my misunderstanding.
> Here is what I started with;
>
[
Hi all,
I am new to Python and still trying to figure out some things. Here is the
situation:
There is a text file that looks like this:
text text text Joseph
text text text text text text text text text text text
text text text text text text text text text text text
text text text text text te
>> how does one go about setting a PYTHON path environment variable on
>> Mac OS X 10.4?
>
>i set up my .profile in the Terminal.app (UNIX) with a text file with
>the following line:
>PATH=$PATH:/Applications/Autodesk/maya8.5/Maya.app/Contents/bin
You should do more or less the same -- edit .b
Hi Everyone,
I go through the archived [Tutor] mail list to find programs others have
tried to do. I found one that would keep track of a petty cash fund.
please point out my misunderstanding.
Here is what I started with;
#!/usr/bin/python
from reportlab.lib.normalDate import ND
#import cPick
2009/2/27 prasad rao :
> Hello
> I don't know why, but this I think going into infinite loop.
> I cant see anything wrong in it.
> Please show me where the problem is.
[...]
> while len(line)>60:
> tem=line[60:]
> try:
> ??? a,b=tem.split(' ',1)
> ?
HelloI don't know why, but this I think going into infinite loop.
I cant see anything wrong in it.
Please show me where the problem is.
def myform(s):
import os
so=open(s)
d=os.path.dirname(s)+os.sep+'temp.txt'
de=open(d,'w')
for line in so:
while len(line)>60:
?
how does one go about setting a PYTHON path environment variable on
Mac OS X 10.4?
i set up my .profile in the Terminal.app (UNIX) with a text file with
the following line:
PATH=$PATH:/Applications/Autodesk/maya8.5/Maya.app/Contents/bin
thanks,
-b
A.T.Hofkamp wrote:
> prasad rao wrote:
>> helloThank you Lie and Kent.
>> I forgot about newline character and the fact that string can be sliced.
>> Thanks for your timely help
>> BTW I have gone through the Python library reference and find no
>> examples
>> in fileinput module.
>
> The filein
Aha! I found the key - I was missing the weight argument:
1 from Tkinter import *
2 import os, shutil, tkFileDialog, tkMessageBox
3
4 class TkSync:
5 def __init__(self, root):
6 self.sbox = Listbox(root)
7 self.sbox.grid(row=0, column=0, sticky=N+S+E+W)
8
I am running this on a freebsd 4.9 system running apache server. I started
with code that was as simple as yours. But the problem is apache does not
print "hello before the fork" until the child exists.I have read at various
forums that apache buffers till the script exists and in this case till th
Hi,
I'm writing a Tkinter program and having severe problems with getting
my listbox to expand when I resize the window.
Here's my code so far:
1 from Tkinter import *
2 import os, shutil, tkFileDialog, tkMessageBox
3
4 class TkSync:
5 def __init__(self, root):
6 self.sbo
Le Thu, 26 Feb 2009 18:16:59 + (GMT),
ALAN GAULD s'exprima ainsi:
>
> > >> Similaraly in Alan Guald Learn to program link, he has given
> > >> information on opening a file with file() and open() functions.
> > >
> > > And in V3 they took that back out again :-(
> >
> > ?? open() is in V3.
"Spencer Parker" wrote
I am looking for a good tutorial to walk through that really explains
class
definition. This has been one sticking point that always messes me
up
I assume from that you have been through the basic tutors like mine?
Have you tried the deeper material in Dive into Pyt
> >> Similaraly in Alan Guald Learn to program link, he has given information
> >> on opening a file with file() and open() functions.
> >
> > And in V3 they took that back out again :-(
>
> ?? open() is in V3. file() is not.
That's right, they have reverted to how it was in Python 1.X
I changed
I am looking for a good tutorial to walk through that really explains class
definition. This has been one sticking point that always messes me up for
the most part. That and when people use "self". For some reason I just
can't grasp what people say. Any good pointers to throw at me? I really
w
Spencer Parker wrote:
I am looking for a little instruction on how one would process a set of
parameters being sent to it through CGI. I have a script that sends
info to another script that lives on another server. The second script
would then process the information that is passed to it thro
Ravi Kondamuru wrote:
Hi,
I am trying to write a python cgi script, that invokes another process
and exists.
Using the subprocess documentation on NO_WAIT, I am not having much success:
pid = os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg")
==>
pid = Popen(["/bin/mycmd", "myarg"]).pid
On Thu, Feb 26, 2009 at 10:35 AM, Alan Gauld wrote:
>
> "Bala subramanian" wrote
>> Similaraly in Alan Guald Learn to program link, he has given information
>> on
>> opening a file with file() and open() functions.
>
> And in V3 they took that back out again :-(
?? open() is in V3. file() is no
"Bala subramanian" wrote
Is there any website/tutorial that explains new features that are
constantly
getting embedded in python.
The documentation for each release has a whats new document
that is always worth reading.
Similaraly in Alan Guald Learn to program link, he has given
informat
On Thu, Feb 26, 2009 at 8:43 AM, prasad rao wrote:
> hello
> Thank you Lie and Kent.
> I forgot about newline character and the fact that string can be sliced.
> Thanks for your timely help
> BTW I have gone through the Python library reference and find no examples
> in fileinput module.
> z=fil
prasad rao wrote:
helloThank you Lie and Kent.
I forgot about newline character and the fact that string can be sliced.
Thanks for your timely help
BTW I have gone through the Python library reference and find no examples
in fileinput module.
The fileinput module only deals with reading and w
helloThank you Lie and Kent.
I forgot about newline character and the fact that string can be sliced.
Thanks for your timely help
BTW I have gone through the Python library reference and find no examples
in fileinput module.
z=fileinput.input(file,inplace=1)
for line in z:
???if len(line)<60:pa
Hi,
I didn't get nearly as far as you.
In [2]: from LinearAlgebra import *
---
ImportError Traceback (most recent call
last)
/home/bermanrl/ in ()
ImportError: No module named LinearAlgebra
On Thu, Feb 26, 2009 at 6:28 AM, Bala subramanian
wrote:
> Dear Friends,
>
> Is there any website/tutorial that explains new features that are constantly
> getting embedded in python.
Every new release comes with a "What's New in Python xx" document.
This is often the best, and sometimes the only
On Thu, Feb 26, 2009 at 2:00 AM, wrote:
> Hi,
>
> I am trying to convert an output from subprocess.Popen() from a byte string
> to a list of numbers. This is what Popen returns:
>
> print SAL.stdout.readlines()
>
> ['[335, 180, 201, 241, 199]\r\n']
For one line:
In [11]: s = '[335, 180, 201, 24
On Thu, Feb 26, 2009 at 12:32 AM, Mr Gerard Kelly
wrote:
> I am getting some very strange behaviour from the Linear Algebra module.
>
> Look at this code:
>
> from LinearAlgebra import *
>
> a=5
> print a
>
> And look at the output that I get when I run it:
>
> 50.0
> 0.0
> 0.25
> 0.0
> 0.5
> 0.0
kkwai...@umich.edu wrote:
Hi,
I am trying to convert an output from subprocess.Popen() from a byte
string to a list of numbers. This is what Popen returns:
print SAL.stdout.readlines()
['[335, 180, 201, 241, 199]\r\n']
Except the string will be much longer in practice.
I've experimented w
Dear Friends,
Is there any website/tutorial that explains new features that are constantly
getting embedded in python. This would be helpful for python lovers to grow
with python and adopt new styles of codes. Just for an example, i read in
Mark Luts "learning python" book, the various forms of ex
On Thu, Feb 26, 2009 at 4:09 AM, prasad rao wrote:
> hello
> I find it difficult to use horizontal scroll bar to read text documents.
> So I want to split lines in the text file in to two lines.
>
> def myforrmat(source,desty):
> so=open(source)
> de=open(desty,'w')
> for line in
Hi,
I am trying to convert an output from subprocess.Popen() from a byte
string to a list of numbers. This is what Popen returns:
print SAL.stdout.readlines()
['[335, 180, 201, 241, 199]\r\n']
Except the string will be much longer in practice.
I've experimented with .rstrip and .split and
I am getting some very strange behaviour from the Linear Algebra module.
Look at this code:
from LinearAlgebra import *
a=5
print a
And look at the output that I get when I run it:
50.0
0.0
0.25
0.0
0.5
0.0
0.75
0.0
1.0
[[ 2.5000e-01 -2.5000e-01 -4.3750e-01 ...,
3.73459082e+
Try thinking what happens when you do this:
line = 'this is a rellly long line\n'
first = line[:20]
second = line[20:]
print first
print second
.
.
.
.
.
.
.
.
.
.
Have you got it? The first would contain "this is a re" and the
second "llly long linee
hello
I find it difficult to use horizontal scroll bar to read text documents.
So I want to split lines in the text file in to two lines.
def myforrmat(source,desty):
so=open(source)
de=open(desty,'w')
for line in so:
? if len(line)<60:de.write(line)
? if len(line)
Le Thu, 26 Feb 2009 12:38:27 +0530,
Abhishek Kumar s'exprima ainsi:
> hello list,
>
> Below is the sample code of a class.
>
>
> import
>
> Class ABC:
> def __init__(self,a,b,c):
> statement 1
> statement 2
>
37 matches
Mail list logo