G'day,
I'm currently blundering through a script that will let me configure and
then connect to PPTP VPNs from a Linux box. Just a text-based front-end
to pptp-client, really.
Adding in new VPN configurations was simple. Connecting is a little
harder. From the command-line I would normally typ
Thank you for your suggestions everyone.
I do wish to parse ifconfig, as I'm specifically after the address of
ppp0. At this stage, I'm only writing the script for my own machine,
so the downside to parsing ifconfig does not yet apply. I'm a little
curious, however. When you say 'varies depending
Hullo,
Firstly, thanks to everyone who helped me find my own IP address. That
was a big help. That bit is working now, and working very nicely. I am
now stuck on something purely aesthetic - printing a few dots across the
screen to provide a bit of feedback while the VPN tunnel is being
establ
share.
Regards,
--
"Come back to the workshop and dance cosmological models with me?"
- Peer, "Permutation City", by Greg Egan.
Simon Gerber
[EMAIL PROTECTED]
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
better way, feel free to correct me.
I've only just started to learn Python myself.
--
"Come back to the workshop and dance cosmological models with me?"
- Peer, "Permutation City", by Greg Egan.
Simon Gerber
[EMAIL PROTECTED]
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ny way to return it. Nor can I successfully pass
anything in by reference, change it into the required class, and pass it
out again.
Any help would be much appreciated.
Regards,
--
"Come back to the workshop and dance cosmological models with me?"
- Peer, "Permutation City&qu
You could probably do something like this... (Note: This example is
for Linux - but you can adapt it fairly easily to Windows.)
# E.g. Find every .inf file on a CD-ROM.
path = '/cdrom'
# 'E:\\' or whatever for Windows
inf_list = []
for root, dirs, files in os.walk(path):
for current_fi
I'd do it like this... And there's probably an even quicker way, if
you really sat down and thought about it.
n = int(raw_input("Number: "))
x = n-1
while x > 1:
n *=x
x -=1
print n
The reason why it isn't working is because of
"
while x > 1:
x -= 1
"
When your program hits this p
side from that, thanks for the interested read.
Cheers!
--
Simon Gerber - Prodigi Solutions
http://www.prodigi.com.au
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Sorry - Forgot to reply to the list as well.
-- Forwarded message --
Hi Nathan,
Let's take a look at the debugger message:
> Traceback (most recent call last):
> File "D:\Python24\exchange.py", line 84, in -toplevel-
> save_rates(rates)
> File "D:\Python24\exchange.py",
Hi William,
Just a word of warning, you should get used to using 'raw_input()'
rather than 'input()' in your
progams.
Why? Because input() attempts to run whatever you type in as a Python
program. If you want to know why that's a problem, try running your
progam. When it asks you to "Enter the nu
Hi Nathan,
> Traceback (most recent call last):
> File "D:\Python24\exchange.py", line 28, in -toplevel-
> exch = pickle.load(store)
> File "D:\Python24\lib\pickle.py", line 1390, in load
> return Unpickler(file).load()
> File "D:\Python24\lib\pickle.py", line 872, in load
> disp
Hi Nathan,
I've attached a crude hack that fixes the problem. It should give you
an idea of how to proceed. I've put comments next to the things I've
changed. Bear in mind I'm hardly more than a beginner myself, so there
are definitely better ways to do this. But it's somewhere to start,
anyway.
> Hi all,
>
> I'm a week or so into having switched from WinXP to linux (ubuntu
> breezy). There is a lot to learn about the differences in the OS'es
> and that's just fine.
Excellent! Another Ubuntu Breezy user here. If there's anything Ubuntu
I can help you with, drop me an e-mail and I'll do wh
G'day Tutors,
I watch many different TV shows on my PC, as many of us do. But I am
sick and tired of forgetting which episode I was up to. So, in a
prodigious effort to avoid ever using, say, a pen, I am working on a
script to take over some of my brain's memory handling. When complete,
I will si
Hi Danny,
Thanks for the advice.
> It might be interesting to write a function that takes an arbitrary
> directory, and returns 'True' if that directory is a bottom-level
> directory. Can you write this function?
I've got this:
---
def isBottomDir(path):
for item in os.listdir(path):
Hi Danny,
> That web site (http://thedailywtf.com) is amusing in its way, but my
> problem with it is that so many of the people there enjoy mocking others
> in a mean-spirited and immature way. Programming well is a hard thing.
> The adolescent posturing I see there isn't admirable to me. It's a
> It looks promising, although without good command line editing and the
> ability to create active GUIs it will be limited. But then, you can't do GUIs
> in
> bash either...
There's always Zenity. Which of course isn't a built in part of the
Bash shell. But it does allow you to create simple GUI
18 matches
Mail list logo