> I have no programming experience and am trying to teaching myself python.
> Am trying to replicate the code below but I get the error message below
> highlighted in yellow:
We need a little more information. Where does this code come from?
What text book or instructional material are you usin
Following up. I can guess that you're looking at:
http://www.sthurlow.com/python/lesson05/
But I would like not to guess unless I have no choice. In the future,
if you're asking for help, provide context. The reason why it's very
useful to say where you're learning from is because we can th
On Mon, Jul 7, 2014 at 8:51 PM, Ni Hung wrote:
> ok, I am now able to write scripts in python. I can read/modify scripts
> written by others (true to some level). I understand the basics of
> libraries (how are they different from modules or are the same thing with
> two names?) like urllib2, js
Pamela Wightley Wrote in message:
>
>
This is a text mailing list. So leaving an html message blocks
some of us from seeing what you intended. Color and other
formatting vanishes for many. Please tell your email program to
post in text mode.
The problem with your fragment is that the ret
On 08/07/14 02:41, Pamela Wightley wrote:
Hi All,
I have no programming experience and am trying to teaching myself
python. Am trying to replicate the code below but I get the error
message below highlighted in yellow:
Unfortunately I can't see anything in yellow, probably due to enmail
losi
On 08/07/14 04:51, Ni Hung wrote:
libraries (how are they different from modules or are the same thing
with two names?)
In Python libraries and modules are nearly the same. Libraries are a
concept in Python which are realized using modules (or packages).
In other languages libraries are the
Hi,
I created a small menu with Tkinter. It has two listboxes: a source and a
destination box. The user can select files from the source box and 'move' them
to the destination box. It now does what I want, except for one thing: when I
resize it, the listboxes will not (*will* not, grrr) increas
> I added background colors to the various frames to see what's happening. I
> pasted the code here because it is a bit much (sorry):
> http://pastebin.com/waeACc4B. Any idea what I am doing wrong in the function
> createListbox (line 80)? I am using sticky=NESW in the grid() calls.
PS: T
Albert-Jan Roskam wrote:
> I created a small menu with Tkinter. It has two listboxes: a source and a
> destination box. The user can select files from the source box and 'move'
> them to the destination box. It now does what I want, except for one
> thing: when I resize it, the listboxes will not
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm using Python 2.7.6 on an openSUSE linux system.
I'm trying to convert a shell (bash) script to a python script, and
everything's worked OK except this. The following line in the shell script
btrfs subvolume snapshot /home/bob/A3/documents /home/
Bob Williams wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I'm using Python 2.7.6 on an openSUSE linux system.
>
> I'm trying to convert a shell (bash) script to a python script, and
> everything's worked OK except this. The following line in the shell script
>
> btrfs subvolume
On 7/8/2014 9:44 AM, Bob Williams wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm using Python 2.7.6 on an openSUSE linux system.
I'm trying to convert a shell (bash) script to a python script, and
everything's worked OK except this. The following line in the shell script
btrfs subvo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 08/07/14 18:12, Peter Otten wrote:
> I suggest that you calculate the folder name in Python instead:
>
> # untested name =
> datetime.datetime.now().strftime("%y-%m-%d_%H-%M") destpath =
> os.path.join("/home/bob/A3/docsnaps", name) subprocess.call
On 08/07/14 16:46, Albert-Jan Roskam wrote:
I pasted the code here because it is a bit much (sorry):
Too much for me, I gave up without spotting the problem.
One thing that did strike me though was that you spend quite
a lot of code setting up scrollbars etc on your list boxes.
The Tix module
I would like to automate running virtualenv with a python script by:
opening gnome-terminal
cd to proper directory
run source /bin/activate
I found some examples of using os.system() to get gnome-terminal to open
but I can't figure out how then cd to the proper directory in the new
terminal.
You might look at:
http://askubuntu.com/questions/351582/open-terminal-window-and-execute-python-script-on-startup
http://superuser.com/questions/198015/open-gnome-terminal-programmatically-and-execute-commands-after-bashrc-was-execu
both which appears relevant to your question.
If I u
On 07/08/2014 11:51 AM, Ni Hung wrote:
> What should I do next to advance my knowledge of python? Should I
study/use libraries/modules? Which ones? Any other suggestions?
>
> Thanks and Regards
> Nii
Oops, replied to sender and not to the list ...
Sounds like you are ready to start solving r
On 08/07/14 21:45, Jim Byrnes wrote:
I would like to automate running virtualenv with a python script by:
opening gnome-terminal
cd to proper directory
run source /bin/activate
Thats almost certainly the wrong approach.
Instead of trying to automate what the user does in the terminal replace
On 08Jul2014 15:45, Jim Byrnes wrote:
I would like to automate running virtualenv with a python script by:
opening gnome-terminal
cd to proper directory
run source /bin/activate
I found some examples of using os.system() to get gnome-terminal to
open but I can't figure out how then cd to the
On Tue, Jul 08, 2014 at 03:45:42PM -0500, Jim Byrnes wrote:
> I would like to automate running virtualenv with a python script by:
>
> opening gnome-terminal
> cd to proper directory
> run source /bin/activate
Why not just run /bin/activate directly from Python?
os.chdir("the/proper/directory")
Hello All,
I have the following code. The idea is to have one list that contains
all of the items from the different iterable types and maintain the
order of the items.
Python 2.7.6 |Anaconda 2.0.0 (x86_64)| (default, May 27 2014, 14:58:54)
#!/usr/bin/python
#list_test2.py
list1 = [1, 8, 15]
l
On 09Jul2014 11:42, Steven D'Aprano wrote:
On Tue, Jul 08, 2014 at 03:45:42PM -0500, Jim Byrnes wrote:
I would like to automate running virtualenv with a python script by:
opening gnome-terminal
cd to proper directory
run source /bin/activate
Why not just run /bin/activate directly from Pyth
On 09/07/14 02:44, Robert Nanney wrote:
#!/usr/bin/python
#list_test2.py
list1 = [1, 8, 15]
list2 = [2, 9, 16]
list3 = [[3, 4, 5, 6], [10, 11, 12, 13], [17, 18, 19, 20]]
list4 = [7, 14, 21]
one_list = zip(list1, list2, list3, list4)
first_round = [one_list[x][y] for x in range(len(list3)) for y
On 09/07/14 06:58, Alan Gauld wrote:
list1 = [1, 8, 15]
list2 = [2, 9, 16]
list3 = [[3, 4, 5, 6], [10, 11, 12, 13], [17, 18, 19, 20]]
list4 = [7, 14, 21]
I'm thinking something like
result = []
for L in (list1,list2,list3):
if isinstance(L,list)
result += L
else: result.appen
24 matches
Mail list logo