Because the regular expression means “match an angle-bracket character,
zero or more H characters, followed by a close angle-bracket character” and
your string does not match that pattern.
This is why it’s best to check that the match succeeded before going ahead to
call group() on the result
st paragraph for the above link.
>
> Thanks,
> santosh
>
>
>
> On Tue, Feb 18, 2014 at 11:33 PM, Steve Willoughby wrote:
> Because the regular expression means “match an angle-bracket character,
> zero or more H characters, followed by a close angle-bracket character” and
&
Reuben wrote:
>I want to implement a python script on machine A to do telnet/ssh into
>machine B (this might be easy)and then run the Test.py (this is
>challenging)
>On 11-Dec-2013 1:05 AM, "Danny Yoo" wrote:
>
>> On Tue, Dec 10, 2013 at 11:28 AM, Reuben
>wrote:
>> > Hi,
>> >
>> > There exists t
On your first question, make sure you have the right version of Tcl/Tk for your
system (usually a tar.gz file is for Unix-like systems, although some programs
like WinZip can read those files too). You may be able to get help from a
Tcl/Tk forum on specifics of building that. However, doesn't
On 18-Oct-2013, at 17:13, Corinne Landers wrote:
> self.grid_x = x
> self.grid_y = y
> self.grid_z = z
>
> self.grid = []
> self.grid2D = []
>
So here you create a list, self.grid2D.
> for i in range(self.grid_y):
> row = [0]*x
> self.grid2D.append(row)
>
Here you a
On 04-Sep-2013, at 14:28, Alan Gauld wrote:
> On 03/09/13 08:25, Ismar Sehic wrote:
>> help with postgres and csv:
>> i solved my problem by playing with the sql line a little.
>> it looked like this : sql = " UPDATE hotel SET path_picture =
>> "+"';"+hotel_url+"'
>> WHERE code LIKE '"+"%"+hotel
Note, however, that changing environment variables only affects the environment
of your script and it's child processes. Once your script exits, the original
shell you called it from is NOT changed.
Sent from my iPad
On 2013/6/23, at 14:35, Amit Saha wrote:
> Hello,
>
> On Tue, Jun 18, 2013
On 16-Jun-2013, at 11:35, Steven D'Aprano wrote:
> On 17/06/13 03:59, Steve Willoughby wrote:
>>
>> On 16-Jun-2013, at 10:49, Jim Mooney wrote:
>>
>>> On 16 June 2013 01:43, Roel Schroeven wrote:
>>>
>>>> Can't you disable tha
On 16-Jun-2013, at 10:49, Jim Mooney wrote:
> On 16 June 2013 01:43, Roel Schroeven wrote:
>
>> Can't you disable that behavior somewhere in the settings of your IDE? I
>> know IDEs do that to be helpful, but I don't like it and so far I've been
>> able to disable it in all IDEs I've used.
>
On 16-Jun-2013, at 09:21, Mark Lawrence wrote:
> On 16/06/2013 16:55, Chris “Kwpolska” Warrick wrote:
>> On Sat, Jun 15, 2013 at 7:22 AM, Patrick Williams wrote:
>>> Hi so I am making a bit of code to extract a bit of numbers data from a file
>>> and then find the average of that data, however
On 12-Jun-2013, at 05:48, Manigopal Vepati wrote:
> Hi,
>
> I need scripts for the following .
>
> 1) check whether username and password fields are present in Gmail
> 2) Code to access the system which doesn’t have ip address
>
And what have you found as you've started writing those scripts
int('blah') is not a type error because the int() function is expecting to be
given a string, and it was given a string. The 'blah' is of the correct type.
The problem is that int() couldn't do anything useful with the value of that
string.
Steve
On 12-Jun-2013, at 14:41, Jim Mooney wrote:
>
or if you try to take the square root of a negative number, etc.
On 12-Jun-2013, at 14:06, Sander Sweers wrote:
> On 06/12/2013 10:49 PM, Jim Mooney wrote:
>> Raised when a built-in operation or function receives an argument that has
>> the right type but an inappropriate value, and the situatio
On 2013-5月-25, at 上午11:56, Jim Mooney wrote:
> I thought tuples were immutable but it seems you can swap them, so I'm
> confused:
>
> a,b = 5,8
>
I think you're confusing mutating the tuples with assigning the immutable
tuples different names. The variable names are just labels you attach
For example, making
a function that asks each question and handles all the different ways the user
might answer other than typing precisely "yes". Or putting the choices in a
list instead of repeating the choice-asking code over and over.
--
Steve Willoughby| Using billion-dollar s
None of these are C/C++ things. They are basic building-blocks of Computer
Science and data structures you'll use regardless of language. I'd really
recommend investing some time reading up on these and other fundamental
data structures.
--
Steve Willough
On 2013-1月-7, at 下午3:31, Dylan Kaufman wrote:
> Greetings,
>
> I take Computer Science in school and for a Python program, I have:
>
> from winsound import Beep
>
The first thing I notice is "from winsound import …" Could that be a WINDOWS
library which might not work on a Macintosh?
> Bee
Although it is probably too obvious to be the answer you're looking for, why
can't you just add them in order in the source code?
This way, you can arrange them however you want them to appear, instead of
python arbitrarily enforcing its own order. Python likes being explicit about
things like
ight. Although Java here doesn't necessarily mean the JVM is running
on the embedded machine; it could be Java source code compiled down to
something a compact runtime can execute.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for.&q
d by something. Maybe it would help
to start by describing your grammar to YACC, getting it to work, and
then expressing that back out as BNF (or just leaving it in YACC code).
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for.&q
l!" factor when you
first discover recursion. When it naturally applies to a problem, it's
still a powerful thing, but yes, it's often misapplied by beginners.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
to be concerned with efficiency for a hangman
game?
Not the game per se, but if you're searching a file of thousands of
words one at a time, randomly picking words and recursing if they're not
what you intended, the hit--worst case--could be catastrophic.
--
Steve Willoughby / st...@alch
rint word
[/code]
Sample output :
$ python hangman.py
How long word can you guess (number of alphabets) : 6
Should return inarch
None
$
The problem is that the last line "print word" always prints None. I
know I am doing something wrong in the recursion part of the function
"pick_ra
interrupted in the middle of something?
I think the block above will do what you're asking for, but I'm not sure
what you're asking for is what will help you best.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for.&q
ating other string
values.
a="hello"
b="world"
a+b# will yield "helloworld" but
a b# is a syntax error
Using + is arguably preferable when you have a choice to make, since it
works in all cases, including constants.
--
Steve Willoughby / st...@alchemy.com
On 21-Mar-12 11:03, Abhishek Pratap wrote:
Hi Guys
I am in the process of perl to python transition for good. I wanted to
Why? Perl is still a perfectly good tool. Just not, IMHO, good for
exactly the same things Python is good for.
1. stitch pipelines : I want python to act as a glue
lling a function bound to a
particular object, so by saying self.TakeTurns(), Python knows that the
object "self" is invoking that method, not some other instance of the
Play class. That method then can access all of that specific object's
attributes as necessary.
--
Steve Willough
On 07-Feb-12 03:15, Steven D'Aprano wrote:
Steve Willoughby wrote:
If you need lots of precision, you might consider using the decimal
class. It'll cost you speed vs. the native floating-point type but
won't cause you round-off errors.
I'm afraid that's not correct.
python which can at least repeat
previous command with a key stroke
I use vim, which has that feature. I suspect any editor worth its salt
does, or could be programmed to.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
ge IN ALL CAPITAL LETTERS; it gives the
impression you are shouting at your audience.
HTH,
HAND
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29
th integers like 0, it will either be >= 0 or < 0, so
the condition will always be true. If "number" contains something that
doesn't make sense to compare like that, then it just won't work (i.e.,
it'll likely throw an exception). (usually :)
--
Steve Willoughby / st
nterpreter, PATH
notwithstanding.
steve
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
___
Tutor maillist - Tutor@python.or
ulting in:
[[str(x+1), x+1] for x in range(size)]
Also, if you didn't like the repeated x+1 in there, you could just
change the range call to go from 1..size directly:
[[str(x), x] for x in range(1,size+1)]
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, b
r), you'll
destroy them by killing the null bytes and won't handle the case of that
high-order byte being something other than zero.
Check out Python's Unicode handling, and character set encode/decode
features for a robust way to translate the output you're getting.
Ch
hon.org <mailto:Tutor@python.org>
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman
Where did the string come from? It looks at first glance like you have two
bytes for each character instead of the one you expect. Is this perhaps a
Unicode string instead of ASCII?
Sent from my iPad
On 2011/11/20, at 10:28, dave selby wrote:
> Hi All,
>
> I have a long string which is an
ion window.
To test, I made a "G" image and installed it. Here's a screenshot of
the app window with and without that code.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29
ords.
(Substitute "Perl" and "Python" with arbitrary languages of your choice.)
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
e is:
root = Tkinter.Tk()
root.iconbitmap(default=ico_image_filename)
(on Linux I use root.iconbitmap(bitmap='@'+xbm_filename))
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615
On 01-Nov-11 13:24, Steve Willoughby wrote:
On 01-Nov-11 13:19, Alexander Etter wrote:
I like than .png image! It does appear vi biased though!
Not quite, notice the initial steep climb. :) Yes, it's tongue-in-cheek,
Oops, my mistake. If the y axis is productivity and x is time usin
operations involving
text files.
You think emacs is bad, though? Try TECO.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
_
r the duration. Everything else is
handled by the application's logic.
For example, you'd display the login toplevel window, and when it's
satisfied, it can trigger the functionality which creates (or displays
the pre-created but hidden) application window and dismisses the login
t
o respond to that by yielding up
a line from the file for every iteration.
You could, theoretically, write a variation of the file object class
which iterated over characters, or logical blocks (records of some sort)
within files, and so forth.
--
Steve Willoughby / st...@alchemy.com
"A sh
comprehensions.
Does that nudge you in the right direction?
If you're still stuck, let us know.
--steve
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 69
behind the scenes for you.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
___
Tutor maillist - Tutor@python.org
To
g over a detail about
how Python variables realy work, but that's another topic).
> >>> s = "Second"
> >>> print s
> Second
Now you created a new string object with the value "Second" and stored THAT
into s, replacing the original
;re new to
programming) to step through the instructions you've written for the
computer, one at a time, and repeat to yourself what each step is
accomplishing.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP F
On 25-Aug-11 01:37, Christian Witts wrote:
Good catch, it should be `if child.exitstatus != None and
child.exitstatus == 0:`
It's better form to say
if child.exitstatus is not None
instead of comparing for equality to None with the != operator.
--
Steve Willoughby / st...@alchem
he special character.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
___
Tutor maillist - Tutor@pytho
On Mon, Aug 8, 2011 at 9:41 AM, Steve Willoughby mailto:st...@alchemy.com>> wrote:
Either way, once you have the list of the keys you want to display,
print them out once as column headings
--
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde
--
Steve Willoughby / st
to a class. That way
you can define the attributes of each object and even implement a
print() method (or at least define __str__() and/or __repr__() methods)
to print each object sensibly.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are bu
On 07-Aug-11 09:17, Steve Willoughby wrote:
First of all, that's not a dict. It's just a tuple of strings.
so, when you say:
#loop through and get the keys of each
for k,v in x:
You'll get one iteration, where k=the first string and v=the second.
However, you ignore k and v
but printing its last value after the loop exits. Is that what you
intended?
You're expecting Python to take a string that looks like Python source
code and know that you want it to be interpreted as source code.
Instead of using string values, use actual Python syntax directly, like:
will take the extra step of
printing the value of that expression for you.
That's not otherwise how Python works. Normally you have to use a print
command (or print() function in Python 3.x) to actually see the output.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is
quot;
Okay, based on that bill, a 15% tip would be ${0}, and
a 20% tip would be ${1}.
""".format(percent15, percent20)
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA0
t does this for column 3's value.
Now run through the column 2 data you saved, print that data row,
then look up the value in the other dictionary and print that after it.
On Mon, Jul 11, 2011 at 7:55 PM, Steve Willoughby wrote:
On 11-Jul-11 16:50, Edgar Almonte wrote:
Thanks for the
? Does it matter which
ones you match up? If so, how do you decide?
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
___
be weird I tried
using an old OCR font and kind of got to like that too. A little weird
but the glyphs are certainly distinct :)
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01
tting happier to see the improvements to what you can do
with just plain Tkinter since the last time I used it seriously.
Tkinter and ttk do have the advantage of already being right there in
the standard library.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is
two values from it.
For more sophisticated argument handling, you could look at the optparse
or argparse modules (but that's beyond the beginner level--something to
keep in mind for later).
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are b
On 16-Jun-11 09:52, Steve Willoughby wrote:
I'm probably just doing something stupid, but I can't spot the error. I
hope someone here can see what I'm looking past, or knows of a known
issue with these widgets.
I think I solved it, actually.. as I was typing this up, I wonde
xt is inserted simply by:
f.insert(END, text, 'rm')
and yet some of the time, even though the 'rm' tag is there, I get one
of the other fonts I configured for the other tags. Do I need to keep
other references to the tkFont objects somewhere else or something?
--
Steve W
ed and
the output substituted back on the command line. The < bracket means to
take what follows it as a file NAME (not a data stream). So unless
writer.py outputs a filename, you really want something like
python writer.py | python reader.py
--
Steve Willoughby / st...@alchemy.com
"
ogram, and have a
file-like object on which it can write data, which the child program
will see as its standard input (and read in to raw_input).
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0
e and the other.
of course, if you are on a Unix-like system, there's already a command
for that, to convert a file "E" from EBCDIC to a file "A" in ASCII:
$ dd if=E of=A conv=ascii
or the other way:
$ dd if=A of=E conv=ebcdic
--
Steve Willoughby / st...@alchemy.com
On 08-Jun-11 23:33, Ashwini Oruganti wrote:
On Thu, Jun 9, 2011 at 11:31 AM, Steve Willoughby mailto:st...@alchemy.com>> wrote:
The value 5 is an integer-class object.
But now what is "Integer-class"? Isn't integer a data type? I mean there
is no concept of "c
That has nothing to do with what an "object" means.
So does the term *Object * change its meaning when we shift the context
from C++ to python?? This is a little confusing, can someone clear it up??
Not really. I think your confusion was about variables.
--
Steve Willoughby / st..
he
application. Where in the application, though, this is dealt with is
not where I think we disagree. In my original response, I clarified
that, although as a short parenthetical note:
On 12-May-11 02:25, Peter Otten wrote:
Steve Willoughby wrote:
Actually, yes, that's exactly what Pyt
.py /temp/myfile
That works because Windows hands ALL of the argument strings, as-is,
with NO interpretation, to the application to deal with. In this case,
the application is Python, and Python is going to the extra work to
interpret the / characters as \ characters when you try to use them in
open
ry separators).
Core windows commands don't generally accept it, including native
Windows applications (although sometimes they're lenient in what they
accept). It'll work for command-line Python script usage because it's
*python* that allows them, not *windows*.
--
Steve W
side ""
quotes and ignore the commas. Or split on ',' then strip quotes, or...
CSV is easiest if that's a match for your problem domain.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint
y...except block to do the typecast.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
___
Tutor maillist - Tutor@pyt
y.
If your question has more to do with the particulars of managing
chroot()ed mountpoints or preparing LiveOS images, you'd need to look to
a forum devoted to that.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built f
what you think they mean, or I'm missing
what you're trying to do here. halting the root filesystem? pivot? code
base?
You're not trying to talk about jail/chroot, perhaps?
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are bu
ut usually indentation errors say that they are indentation errors.
Look carefully at your parentheses. Does every ( have a matching )?
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01
has the >>>s in it.
How, exactly, does what I just described differ from what happened to you?
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
__
On 22-Apr-11 15:48, Brad Desautels wrote:
Ya, I did try to run it and I am getting a syntax error before it runs.
and the message said? Where did it point to as the syntax error?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change s
On 22-Apr-11 15:37, Brad Desautels wrote:
Hello, I am just learning Python 3.0 and I am working on this problem. I
need to know what the output would be.Can anybody help
What is your question? If you want to see what its output would be...
run it and see the output. Is there more to your que
ve things like "Python 2.7.1" or ">>>" showing up in
your source code.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
___
t you probably want this to be a
permanent change, so you need to edit the start-up file for your shell
(.cshrc, .bashrc, .profile, whatever) and add an instruction to set that
variable everytime you open a shell.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not
a blending of "variables", "pointers" and "references"
which just "do the right thing" most of the time due to how Python
manages variable access. But they are not quite the same as any of
those in other languages.
--
Steve Willoughby / st...@alchemy.com
is impossible because that would be altering the string
object named by "message" in-place, which is disallowed for strings.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
inputData = inputFile.readlines()
inputFile.close()
os.chdir( r'%s' % inputData[0] )
newNames = []
oldNames = glob.glob( '*.*' )
for index, item in enumerate( oldNames ):
print index, item
if __name__ == '__main__':
mdf()
th platforms. Are you
running the same code on both platforms?
The correct name is "Tkinter" (capital T) for Python 2.x,
and "tkinter" (lower-case) for Python 3.x, regardless of platform.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that
On 06-Apr-11 02:03, JOHN KELLY wrote:
I need help.
Can you be a little more specific? :)
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 48A3 2621 E72C 31D9 2928 2E8F 6506 DB29
onary step to take. Especially so
if your formats are configurable or generated by code which may want to
reorder the values.
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 48A3 2621 E72C 31D9 2928 2E8F
eans to
replace the second match.
This can be yet simpler by using raw strings:
r"\2'"
Since in raw strings, backslashes do almost nothing special at all, so
you don't need to double them.
I should have thought of that when sending my original answer to your
questi
object:
pattern = re.compile(r'(l|L|n|N)')
and then substitute by calling its sub() method:
text = pattern.sub('\1e', text)
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what s
g
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 48A3 2621 E72C 31D9 2928 2E8F 6506 DB29 54F7 0F53
_
On 25-Feb-11 20:26, Bill Allen wrote:
On Fri, Feb 25, 2011 at 21:33, Steve Willoughby mailto:st...@alchemy.com>> wrote:
On 25-Feb-11 19:27, Steve Willoughby wrote:
Or are you saying you want to, from a remote Unix system, reach out
to a Windows system and see that W
On 25-Feb-11 19:27, Steve Willoughby wrote:
Wait.
Are you trying to figure out how, on a Unix system, to read Unix system
environment variables as you're accustomed to doing on Windows?
Or are you saying you want to, from a remote Unix system, reach out to a
Windows system and see
python.org <mailto:Tutor@python.org>
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
Stev
your script to be
executed in that environment. Finding the environment of a running
process can be done easily, too. Look at the output of "ps" with
certain options set, or the contents of files in /proc. However,
remember that there are as many environments are there are processes
Tutor maillist - Tutor@python.org <mailto:Tutor@python.org>
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist - Tutor@python.org
To unsubscribe
hanks!
It seems like the ideal case would be to run a remote desktop session
onto the target system and develop there (e.g., run Eclipse or your
favorite IDE on the Linux box, using it via VNC or something).
Then you're running the real code on the real system.
--
Steve Willoughby / st...@alch
s a digit character. \d+ matches one or more digit characters.
Nothing in your regex matches a sign character. You might want something like
[-+]\d+
which would require either a - or + followed by digits. If you want the sign
to be optional, maybe this would work:
[-+]?\d+
--
Steve Wil
On 14-Jan-11 09:03, Jason Staudenmayer wrote:
Don't build you sql separate from the execute (or so I was told when I
was doing something similar)
cur.execute(INSERT INTO tkindbtal (kommune, komnr, i2005, i2006, i2007 \
, i2008, i2009, i2010) VALUES (%s, %s, %s, %s, %s, %s,\
%s, %s)% (cols[0], col
is the quit() method actually defined?
--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 48A3 2621 E72C 31D9 2928 2E8F 6506 DB29 54F7 0F53
___
Tutor maillist - T
as the up-arrow command history feature and is also good for Python
coding in general?
If you use the up-arrow to move your cursor to previous lines in the
IDLE window and hit ENTER, you recall that line where you can edit and
re-enter it.
--
Steve Willoughby / st...@alchemy.com
"A ship in
On 25-Oct-10 15:19, Abhijeet Rastogi wrote:
subprocess.call("ls -l "+mydir,shell=True)
will do the job. In python, we can simply concatenate the strings like that.
How do I replace /usr/local/bin in the subprocess call with the
mydir variable?
It's often preferable (for reasons ranging
1 - 100 of 278 matches
Mail list logo