Dear Guys,
I have to run the next regexp change in a stream:
import re
wrongcode = re.compile(r'(.*)b24704T')
f = open('testfile.txt')
while 1:
sequence = f.read(1024)
sequence = wrongcode.sub(r'\1b24700T', sequence)
print sequence
My original solution was to keep the last p
Hi,
Which is the best location to install Python in Linux? Should it be under one
directory or different (like lib, doc, bin etc.)?
I followed installation instructions in "inst.pdf" from python documents. I can
see that Python 2.4.1 has been installed in /user/lib/local by standard
installati
>I just started attempting to program and thought i would try python
>as my
> first tool. However following the beginners guide on their page it
> says to insert python as a command and that it should come up with
> the program information.
Have you downloaded Python and installed yet?
You nee
Hello,
I'm creating a script that will rename directories and files (hence
the regular expression thing I asked about last week). I just wanted
to ask if there is a recommended order to rename stuff, because I want
to avoid any potential problem.
What I mean:
I traverse some areas of the file ser
Bernard Lebel wrote:
> Hello,
>
> I'm creating a script that will rename directories and files (hence
> the regular expression thing I asked about last week). I just wanted
> to ask if there is a recommended order to rename stuff, because I want
> to avoid any potential problem.
>
> What I mean:
Thanks! That did the trick after very modest head scratching.
-Rob
On 9/9/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
> >
> > What's a nice, clean way to recursively scan through directories with
> > an arbitrary number of subdirectories?
>
> Hi Rob,
>
> You may want to look at os.walk():
Thanks Kent!
Bernard
On 9/12/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Bernard Lebel wrote:
> > Hello,
> >
> > I'm creating a script that will rename directories and files (hence
> > the regular expression thing I asked about last week). I just wanted
> > to ask if there is a recommended ord
On Mon, 12 Sep 2005 07:35:52 -0500
"Andy Dani" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Which is the best location to install Python in Linux? Should it be under one
> directory or different (like lib, doc, bin etc.)?
>
> I followed installation instructions in "inst.pdf" from python documents. I
I've tried running that function, with a little Main
method like this:
import os
def run_mame_selection(selection):
os.system("C:\\mame096b\\mame.exe"+""+selection)
#main
mine = "pacman"
run_mame_selection(mine)
What I get is like a brief flash of the CMD prompt
like it is trying it and
I am working on a project that we have built a C Text interface previously. We
want to be able to move this to a graphical interface, and after some studying,
we decided to use a python-based interface. We want to use as much of the old
code as possible, so we have decided to try an interface with
I think there is some software out there call SWIG that will create an
interface to your C code within python...
On Monday 12 September 2005 01:59 pm, [EMAIL PROTECTED] wrote:
> I am working on a project that we have built a C Text interface previously.
> We want to be able to move this to a gr
> import os
>
> def run_mame_selection(selection):
>os.system("C:\\mame096b\\mame.exe"+""+selection)
>
> #main
> mine = "pacman"
> run_mame_selection(mine)
>
> What I get is like a brief flash of the CMD prompt
Open the command prompt first and run it from there.
(Or add a raw_input() l
[EMAIL PROTECTED] wrote:
> I am working on a project that we have built a C Text interface previously. We
> want to be able to move this to a graphical interface, and after some
> studying,
> we decided to use a python-based interface. We want to use as much of the old
> code as possible, so we ha
On Mon, 12 Sep 2005, Alan G wrote:
> > def run_mame_selection(selection):
> >os.system("C:\\mame096b\\mame.exe"+""+selection)
Hi Max,
If you're getting really stuck here, skip below for a hint.
Hint: in the defintion of run_mame_selection, there's some string
concatenation going on he
Hi,
I'm a Garfield fan and I thought that I'd make a program that would
enable me to read the online comics without opening firefox and typing
the url and waiting for all the other junk to load. Here's my code:
# import modules
import time
import urllib2
class data:
# Define time and date
Hi pythonistas!
Recently I've encountered a very annoying problem when developing a
program - more exactly a module - of several hundred lines using Idle.
Of course I have a __name__=="__main__" section to test my classes,
which ran successfully every time, (except when there were bugs :-( in
t
ZIYAD A. M. AL-BATLY wrote:
>Since you're running some kind of Unix (maybe Linux or FreeBSD), all
>these command are available for you. By commands I mean: "cron",
>"wget", and "date".
>
>
>
Wow. That's a good idea.. however this is a "gift" for someone who wants
me to make a program to do it
Hey Guys,
I am trying to pick an IDE, and it seems to me that Boa-Constructor has great potential. However, in searching google looking to see what others have said, I am reading that the latest version of Boa-Constructor is unstable at best and crashes a lot.being said, at least, by those
Terry Kemmerer wrote:
> Hey Guys,
>
> I am trying to pick an IDE, and it seems to me that Boa-Constructor
> has great potential. However, in searching google looking to see what
> others have said, I am reading that the latest version of
> Boa-Constructor is unstable at best and crashes a lot..
ZIYAD A. M. AL-BATLY wrote:
>Since you're running some kind of Unix (maybe Linux or FreeBSD), all
>these command are available for you. By commands I mean: "cron",
>"wget", and "date".
>
>
>
Wow. That's a good idea.. however this is a "gift" for someone who wants
me to make a program to do it
Joseph Quigley wrote:
> Hi,
> I'm a Garfield fan and I thought that I'd make a program that would
> enable me to read the online comics without opening firefox and typing
> the url and waiting for all the other junk to load. Here's my code:
>
> # import modules
> import time
> import urllib2
>
>
Nephish,
I run Mandriva Linux with Gnome, but also have the KDE desktop set up as one of my optional desktops that I can log into for a session, and in fact, I do run a lot of KDE stuff on gnome, like Konqueror, etc.
I urpmi-ed Eric and will check it out. Thanks!
I liked the idea of Boa-Con
Tutor,
Good evening! The goal is to parse a simple file and grab column one.
Then print each value horizontally separated by a comma.
Why is Python adding a space padding between each value? Please see below.
Thanks ahead of time.
INPUT_FILE # unwanted lines removed
##
On Mon, 12 Sep 2005, Tom Tucker wrote:
> Good evening! The goal is to parse a simple file and grab column one.
> Then print each value horizontally separated by a comma. Why is Python
> adding a space padding between each value? Please see below. Thanks
> ahead of time.
Hi Tom,
The 'print' s
Also SPE is great.
http://www.stani.be/python/spe/blog/
Hugo
Terry Kemmerer wrote:
> Hey Guys,
>
> I am trying to pick an IDE, and it seems to me that Boa-Constructor has
> great potential. However, in searching google looking to see what others
> have said, I am reading that the latest versi
25 matches
Mail list logo