Well you're right about the paths...
print(os.getcwd())outputs
when run from notepad++:
c:\program files\Notepad++
when double clicked:
actual directory path
I'd like to use notepad++ to execute the scripts I edit, is there a way to
solve this problem?
On Sat, May 30, 2009 at 3:45 PM, Alan G
Hi list,
I am trying to make this code work. I don't have any experience with
defining things and this is my second program. The error returmed is
"SyntaxError: invalid syntax"
code:
#!/usr/bin/python
import cvs
def convertXLS2CSV(aFile):
'''converts a MS Excel file to csv w/ the same n
> The difference between objects is measeured by their interfaces not their
> data
> so provided the supplier objects all use the same operations of a Flavor then
> its not too bad. You can either create subclasses of Flavor for each
> manufacturer that retuirns the requisite list of attrib
> From: Daniel Brown
>
> Can anyone recommend any ways of getting exposed to high quality
> Python code?
Have a look at (& contribute to) the source code of projects like
http://www.sagemath.org/
Kind regards,
-- Van Ly
___
Tutor maillist - Tutor@p
On Sat, May 30, 2009 at 8:20 PM, David wrote:
>
> Alan Gauld wrote:
>>
>> "David" wrote
>>
>>> I took this program that determines a fertilizer application rate;
>>> ...
>>> And converted it to class/object to learn how they work. Just looking
for some pointers, if I did it correctly etc.
>>>
>>>
Alan Gauld wrote:
"David" wrote
I took this program that determines a fertilizer application rate;
...
And converted it to class/object to learn how they work. Just looking
for some pointers, if I did it correctly etc.
For such a small program its hard to see what else you could have done.
"Tony Cappellini" wrote
sys.stdout.write( "\r%-8s ... 0x%08X->0x%08X " % ( descr,
long(startAddr), long(endAddr) )
Why are these displayed with a leading negative sign (between the 0x
and the actual number)- as seen below?
0x-1BFFF400 to 0x-1BFFF000
Because they are negative values and th
"David" wrote
I took this program that determines a fertilizer application rate;
...
And converted it to class/object to learn how they work. Just looking
for some pointers, if I did it correctly etc.
For such a small program its hard to see what else you could have
done. Technically itys
I was looking at a this code which uses this code to dsiplay some hex numbers
sys.stdout.write( "\r%-8s ... 0x%08X->0x%08X " % ( descr,
long(startAddr), long(endAddr) )
The hex values are in this range
0x1BFFF400 to 1BFFF000
Why are these displayed with a leading negative sign (between the 0x
a
I took this program that determines a fertilizer application rate;
#!/usr/bin/python
rate = float(raw_input("Enter rate i.e. (0.5) : "))
n = float(raw_input("Enter N from bag i.e. (.14) : "))
app = rate / n
area = 43.560
acre = input("Enter total acre's to be treated: ")
bag = input("Enter bag w
David wrote:
Alan Gauld wrote:
"Doug Reid" wrote
The tutorial I'm using is discussing list, tuples, and dictionaries.
...
four attributes: Strength,Stamina, Wisdom, and Dexterity.
The player should be able to spend points from the pool on
any attribute and should also be able to take points f
Alan Gauld wrote:
"Doug Reid" wrote
The tutorial I'm using is discussing list, tuples, and dictionaries.
...
four attributes: Strength,Stamina, Wisdom, and Dexterity.
The player should be able to spend points from the pool on
any attribute and should also be able to take points from
an attribu
"xbmuncher" wrote
Traceback (most recent call last):
File "C:\path to file\script.py", line 1, in
h = open('file2.dat', 'rb')
File "C:\Python30\lib\io.py", line 278, in __new__
return open(*(args, **kwargs)
File "C:\Python30\lib\io.py", line 222, in open
closefd)
File "C:\Python30\li
"Doug Reid" wrote
The tutorial I'm using is discussing list, tuples, and dictionaries.
...
four attributes: Strength,Stamina, Wisdom, and Dexterity.
The player should be able to spend points from the pool on
any attribute and should also be able to take points from
an attribute and put them bac
xbmuncher wrote:
I have a script called: script.py and here are the contents:
h = open('file2.dat', 'rb')
data = h.read(1120)
h.close()
print(data)
input("Press ENTER to exit")
I am editing it in Notepad++ and I set it up so I can run in on
python.exe (I have python30) from the program, it s
I have a script called: script.py and here are the contents:
h = open('file2.dat', 'rb')
data = h.read(1120)
h.close()
print(data)
input("Press ENTER to exit")
I am editing it in Notepad++ and I set it up so I can run in on python.exe
(I have python30) from the program, it sends these parameter
The tutorial I'm using is discussing list, tuples, and dictionaries. An
exercise at the end wants me to do this:
Write a Character Creator program for a role-playing game. The player should be
given a pool of 30 points to spend on four attributes: Strength,Stamina,
Wisdom, and Dexterity. The
> Date: Fri, 29 May 2009 09:46:17 -0500
> From: Gregory Morton
> To: Tutor Newsgroup Python
> Subject: [Tutor] (no subject)
> Message-ID:
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> I'm having a problem understanding how this code works in lesson 4.4 on the
> python tutorial. Can any
"Hi" wrote
My program will have two windows. I want to be able to dock the two so
they
are side by side. I am wondering if this is doable in Python.
Yes it is doable but how difficult it is will depend on the GUI toolkit you
use.
Most GUI programming environments nowadays (eg. .NET, Delph
"Gregory Morton" wrote
I'm having a problem understanding how this code works
in lesson 4.4 on the python tutorial.
Can you already program in another language? Say VB, Java or PHP?
If not you would be better off with a different tutorial since rthe
official
one is really targeted at exper
20 matches
Mail list logo