Re: [Tutor] How to set up an Array?

2009-05-11 Thread Lie Ryan
John Fouhy wrote: 2009/5/12 nickel flipper : sfr (key=PORTA addr=0xf80 size=1 access='rw rw rw u rw rw rw rw') reset (por='' mclr='') bit (names='RA7 RA6 RA5 - RA3 RA2 RA1 RA0' width='1 1 1 1 1 1 1 1') bit (tag=scl names='RA' width='8') bit (names='OSC1 OSC2 AN4 - AN3

Re: [Tutor] How to set up an Array?

2009-05-11 Thread John Fouhy
2009/5/12 nickel flipper : > sfr (key=PORTA addr=0xf80 size=1 access='rw rw rw u rw rw rw rw') >    reset (por='' mclr='') >    bit (names='RA7 RA6 RA5 - RA3 RA2 RA1 RA0' width='1 1 1 1 1 1 1 1') >    bit (tag=scl names='RA' width='8') >    bit (names='OSC1 OSC2 AN4 - AN3 AN2 AN1 AN

[Tutor] How to set up an Array?

2009-05-11 Thread nickel flipper
Hello, Just getting started with Python, and have had some early, although trivial success. It looks like just the ticket to parse a data file. Total noob at this, but really kind of overwhelmed by all the options. Looking for some direction on which modules, librarys, or ? to accomplish the

Re: [Tutor] moving files from one dir to another

2009-05-11 Thread Dave Angel
Matt Herzog wrote: Should be simple, right? Not for me, heh. def schmove(src,dst): ... src = '/home/datasvcs/PIG/cjomeda_exp/' ... dst = '/home/datasvcs/PIG/cjomeda_exp_archive/' ... listOfFiles = os.listdir(src) ... for filez in listOfFiles: ... os.s

Re: [Tutor] moving files from one dir to another

2009-05-11 Thread Kent Johnson
On Mon, May 11, 2009 at 4:22 PM, Matt Herzog wrote: > Should be simple, right? Not for me, heh. > > def schmove(src,dst): > ...         src = '/home/datasvcs/PIG/cjomeda_exp/' > ...         dst = '/home/datasvcs/PIG/cjomeda_exp_archive/' > ...         listOfFiles = os.listdir(src) > ...         fo

Re: [Tutor] Alternative for Shelve

2009-05-11 Thread Kent Johnson
On Mon, May 11, 2009 at 1:39 PM, Timo wrote: > Hello all, > > I have an issue with the Shelve module. It works great for my needs, the > only problem is that a file made with Shelve isn't interchangable between > different computers. I want my data to be exchanged between users. > > Does someone h

Re: [Tutor] Alternative for Shelve

2009-05-11 Thread Alan Gauld
"Timo" wrote I have an issue with the Shelve module. It works great for my needs, the only problem is that a file made with Shelve isn't interchangable between different computers. I thought it would be. What kind of computers are you having issues with? And what kind of issues? Does someo

Re: [Tutor] moving files from one dir to another

2009-05-11 Thread Alan Gauld
"Matt Herzog" wrote I sure wish I could for the last line go, shutil.move("src", "dest") That would be cool. So why don't you? What is the problem? -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maill

Re: [Tutor] How to control the not existent keys in a dict

2009-05-11 Thread Emilio Casbas
Thanks to all for the responses. Problem solved!, and I get a lot of valuable info. Thanks Emilio - Mensaje original > De: Alan Gauld > Para: tutor@python.org > Enviado: lunes, 11 de mayo, 2009 1:59:32 > Asunto: Re: [Tutor] How to control the not existent keys in a dict > > > "Emi

[Tutor] Import package module problem

2009-05-11 Thread mandel
Hello there, I have just started working with python and I have some issues understanding how I should be importing modules from packages. Curretly I have the following tree structure: general/ __init__.py address_book.py groups/ __init__.py contact_group.py where groups and gene

Re: [Tutor] Suggestions for while loop

2009-05-11 Thread David
Dave Angel wrote: def getTotalNumber(prompt): while True: try: numstr = raw_input(prompt) n = int(numstr) if 0 < n < 50:#some validation return n print "Number is not reasonable, try again" except ValueErro

[Tutor] moving files from one dir to another

2009-05-11 Thread Matt Herzog
Should be simple, right? Not for me, heh. def schmove(src,dst): ... src = '/home/datasvcs/PIG/cjomeda_exp/' ... dst = '/home/datasvcs/PIG/cjomeda_exp_archive/' ... listOfFiles = os.listdir(src) ... for filez in listOfFiles: ... os.system("mv"+ " " + src

[Tutor] Alternative for Shelve

2009-05-11 Thread Timo
Hello all, I have an issue with the Shelve module. It works great for my needs, the only problem is that a file made with Shelve isn't interchangable between different computers. I want my data to be exchanged between users. Does someone have an alternative to Shelve? It must be able to conta

Re: [Tutor] Guidance needed for script

2009-05-11 Thread Alan Gauld
"rony dsouza" wrote Using GnuPG to encrypt a file(s) on linux. Essentially two modes of operation would be ideal: You might find the GPG module useful but it is sadly no longer maintained by AMK(since 2006). So it may not work in recent versions of Python. http://wiki.python.org/moin/GnuPri