Hello to all :-)
I'm writing a CGI script (one of my first ever CGI programs and I'm
using this tutor to learn CGI: http://www.oreilly.com/openbook/cgi/
This isn't a python tutor, but the introductions says that any
language will be good for this tutor.
Anyway, I got to the Using Environment Varia
> Morning Mark,
>
> Happy New Year, Merry Christmas, and a jolly Winter Solstice Season!
>
> Whenever you're talking about how to do something in Windows it REALLY
> helps when you include WHICH windows you're working with.
>
> I believe the following wi
Been a long time since I last posted to the list so this is only my
third program in as many years :(
Anyway the basic idea is to look through two csv files (seperated by
tabs) enter both of them into dictionaries and compare the keys of the
"polished" version with the "rough" one. If I've already
Wow - List comprehensions does make the problem one heck of a lot
easier on the eye and doesn't really remove much of it's comprhension.
Thanks for the tips Jacob and Alan - It's always fascinating to see
what seems like complicated problems set out so neatly and clearly on
the list :)
I'm learning python for a few months now, and I would like to get some
experience by participating in a good, open source, and small
python-CGI project.
I searched freshmeat.net but couldn't find anything interesting
(except __ but I think its dead...).
Anyone knows of a good small and open source
HI all !
I started to read the following code (I will start working on it when
this problem is fixed) and it looks OK while I read it. But for some
reason it doesn't work...
Here is the code:
# MailList is copyright (c) 2000 of Programmed Integration
# You may use this code in any way you see fit,
On Fri, 7 Jan 2005 11:16:29 -0800 (PST), Danny Yoo
<[EMAIL PROTECTED]> wrote:
>
>
> On Fri, 7 Jan 2005, Mark Kels wrote:
>
> > I started to read the following code (I will start working on it when
> > this problem is fixed) and it looks OK while I read it. But
Hi all.
How can I send SQL querys to a MySQL database with a python-CGI program ?
Thanks.
--
1. The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners.
2. Unix is user friendly - it's just picky about it's friends.
3. Documentation is like sex: w
Hi all,
I want to make an IRC bot with python...
The problem is that I cant find any good information about this topic
(not even documentation for the irclib module).
Does anyone here have some experience with python programming for IRC
(clients, bots, etc) and can give me some simple source code
Test, please disregard.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hello,
I got some Tkinter questions that I need the answer for to complete a
little project of mine:
1. How can I make the program to open in a X*Y sized window ?
2. How can I open another window from the first one (without closing it) ?
3. How can I add a file browser for my app (like the one you
Hi all.
Whats wrong here ?? :
from Tkinter import *
def p_text():
print text.get()
root=Tk()
text=Text(root).pack()
button=Button(root,text="Click here!!",command=p_text).pack()
root.mainloop()
I get an error that says that nontype object has no attribute 'get'...
whats wrong ??
Thanks.
--
Hi all.
As I understand, .get() has to get an index argument to get the text
from the Text index...
The problem is that I dont realy understand what is this index thing
and what index do I need to give to the function so I'll get all the
text in the widget.
Any ideas ??
Thanks !
--
1. The day M
Hi,
I'm a newbie and was wondering which of these IF conditions is better
structure:
if not os.path.exists('filename'):
if os.path.exists('filename') == False:
They both work so if one preferred over the other?
Thanks
Mark Brown
Hi list.
How can I download a file from an HTTP server ?
I checked the documentation but couldn't find what I need.
Thanks!
--
1. The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners.
2. Unix is user friendly - it's just picky about it's frien
On Sat, 12 Feb 2005 09:25:10 -0500, Jacob S. <[EMAIL PROTECTED]> wrote:
> urllib or urllib2 or maybe httplib maybe?
>
> urlopen( url[, data])
>
> Open the URL url, which can be either a string or a Request object.
> data should be a string, which specifies additional data to send to t
On Sun, 13 Feb 2005 08:03:45 -0800, Lobster <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> i'm interested in building a gui for some code we have. I'm after
> pointers on gui programming, and a recommendation on a cross platform
> gui library, wxpython? pythoncard, qt? What do people use. Ideally i'
Hi all.
I'm trying to build a simple port scanner (just to learn sockets).
here is the code (doesn't work) :
import socket
sk=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host=raw_input("Enter name of host to scan: ")
start_port=input("Enter the start port: ")
end_port=input("Enter the end por
Hi all.
First, here is the code I have a problem with (I got same problem in
my project) :
from Tkinter import *
def go():
e.get()
print e
main=Tk()
e=Entry(main)
e.pack()
b=Button(main,text='OK',command=go()).pack()
main.mainloop()
For some reason the function is called before I click th
Hi list !
Here is a small port scanner I made to practice sockets and GUI
programming ( WARNING: the program crash when scan button is clicked):
#--Imports--
from Tkinter import *
import socket
#--The result GUI window function-
def result():
global result_t #I
On Mon, 21 Feb 2005 13:21:35 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
> How far does it get? How do you know?
>
> I would put some debug print statements in. Also you should call sk.close()
> in the else clause of
> scan(). Finally, I don't think you will see any output in the result window
Hi list.
Here are the questions (-:
1. How do I make a progress bar in Tkinter ?
2. I got a while loop which does the port scan itself. How can I end
it while its working ?
3. For some reason the scan is too slow (2-3 seconds for a port). Is
there a way to make it faster (other port scanner work a
On Sun, 27 Feb 2005 03:24:07 -0800 (PST), Shitiz Bansal
<[EMAIL PROTECTED]> wrote:
>
> The ports which do not respond are the ones which take
> most of the time.You can use the timer object to fix
> the time for each port.For eg. if a port does not
> respond within .1 sec it can reasonably be expe
On Sun, 27 Feb 2005 16:00:12 -, Alan Gauld <[EMAIL PROTECTED]> wrote:
> One option:
> Use a set up gif images and update the image periodically
> OR
> Use a canvas and redraw a rectangle slightly larger every
> time through the scanning loop.
Thats think this is the easy part...
The hard part
Can anyone give me a very simple example on thread programming ?
I looked at some tutorials but they don't really make sense...
Thanks in advance
--
1. The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners.
2. Unix is user friendly - it's just
On Tue, 1 Mar 2005 12:25:37 -0800 (PST), Shitiz Bansal
<[EMAIL PROTECTED]> wrote:
>
> Here is a simple program
>
> class abc(threading.Thread):
> def __init__(self):
> threading.Thread.__init__(self)
> self.x=1 etc. etc.
> self.cont_flag=1
> def run(self):
>
On Wed, 2 Mar 2005 14:48:11 -0800 (PST), Shitiz Bansal
<[EMAIL PROTECTED]> wrote:
> The thread finishes when:
> 1.The run method finishes.
> 2.In case of the loop- you may -
>
> >>> import threading
> >>> class abc(threading.Thread):
> def __init__(self):
> threading.Thread
On Thu, 3 Mar 2005 14:31:55 +, Gwyn Evans <[EMAIL PROTECTED]> wrote:
> Hi,
> The one thing that stands out is that when you subclass Thread as
> you do, you need to override the 'run' method, which will get called
> as a result of you calling 'start()'.
> You're calling start(), but you've
On Thu, 3 Mar 2005 16:36:05 +, Gwyn Evans <[EMAIL PROTECTED]> wrote:
> How are you trying to start another scan? You'd have to create a
> new instance, you can't just call app.start() again.
Thanks allot !!
This is exactly what I was doing wrong.
Now it works :)
--
1. The day Microsoft ma
Hi list !
I want to know whats so great in OOP...
I have learned some of it, but I don't understand why everybody like
it so much...
Can anyone give me an example for a task that could be done only with
OOP or will be much simpler to do with it ?
Thanks in advance.
--
1. The day Microsoft makes
Hi list.
I have downloaded some code from useless python that was writen buy a
guy named Sammy Mannaert. The code should show that python can be
unreadable, and it really is...
Can anyone explain to me how does this thing works ??
Here is the code (it prints "python readable ?"):
f=lambda x="8<:47
Does anyone have some examples on the use of A.M. Kuchling's Python
Cryptography Toolkit? I've tried his examples but get "AttributeError"
and "TypeError". What I'm trying to do is encrypt/decrypt a file. I'm
using Python 2.3 on xp pro.
Thanks
--
_
( )
t;bhxupds&oo`g'uou`z`" <== *confused by this output*
Close but no cigar!! *grin*
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ncrypt
>
> xored = obj_xor.encrypt(str_encrypt)
> print xored
>
> obj_xor = XOR.new("string")
> print obj_xor.decrypt(xored)
>
> Kent
Excellent !!
Many thanks Kent.
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Hi list !
Does anyone here knows of a way to connect to ICQ with Python?
Thanks in advance.
--
1. The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners.
2. Unix is user friendly - it's just picky about it's friends.
3. Documentation is like sex:
On 4/29/05, tanja pislar <[EMAIL PROTECTED]> wrote:
> try pyICQ-t, (it's an ICQ transport for jabber implemented in python)
> http://pyicq-t.blathersource.org/
>
> regards,
> tanja
Thanks, but its to complicated for my needs. What I need is a simple
module that will allow me to connect to ICQ and
Does anyone know of a Web Calendar written in Python?
TIA
Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
GAAATTGCAAATTAACTGTG
ScerACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
SparACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
SmikACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
SbayACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
--
_
( ) Mark Thomas ASCII ribb
Hi list.
I want to make a program to lock folders (so the user can only access
them if he knows the password) under win32, the only problem is that I
have no idea how to start or what to do. Do you guys have any ideas of
how to do it?
Thanks!
--
1. The day Microsoft makes something that doesn'
On 7/6/05, Michael Huster <[EMAIL PROTECTED]> wrote:
> In python under windows, how can I create and access a file on the Desktop?
> The following do NOT work:
How about...
>>> userp = os.getenv('USERPROFILE') + '\\Desktop\\MyFile.txt'
>>> fo =
Hi list.
I want to make a virtual keyboard with Tkinter.
Can I have some pointers on how to do it?
Will it be hard (it doesn't look so hard...)?
Thanks.
--
1. The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners.
2. Unix is user friendly - i
On 7/14/05, luke <[EMAIL PROTECTED]> wrote:
> I don't think it will be hard, but it depends what you want to pass
> keypresses to.
> If you want your virtual keyboard to type in any program you will have to
> deal with
> focus issues and it seems to me that would be hard, if possible.
> but if you
On 7/14/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> You would need some way of getting a handle for the widget you want to type
> into.. I don't know how to do this (or even if you can), but I wonder if you
> might have more luck if you used PythonWin and the Microsoft factory classes
> to
some variant and what libraries people find useful, such as
UnitTest and Logging.
What follows are some links and excerpts I found looking for information on
this topic.
Cheers,
Mark
===
*Open Embedded*
OpenEmbedded is a tool which allows developers to cre
\" \' ()*&^%$# << '
>>> [x.strip('\' \" () * & ^ % $ # < ') for x in str.split()]
['this', 'has', 'special', 'characters', '', '', '', '']
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
nge(6):
while True:
draw = random.choice(range(1,50))
if not(numbers.count(draw)):
numbers.append(draw)
break
print numbers
elif q == '2':
break
else:
print "Read the in
ormation for us newbies.
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
entirely what I am doingcan someone help? I don't really understand what setting properties does and how I access the defined get/set functions in this object.
Any info would be wonderful, thanks in advance!--Mark
___
Tutor maillist -
I think this will answer your question:
http://www.python.org/doc/faq/windows.html#how-do-i-run-a-python-program
-under-windows
Mark
This email and any attachment may contain confidential, privileged information
for the sole use of the intended recipient. If you are not the intended
On 1/26/07, OkaMthembo <[EMAIL PROTECTED]> wrote:
> how useable is vim on Windows?
Very! I've used Vim on Windows since the 5.3 version, it only gets
better. Like Alan said there is a learning curve, but once you've "got
it" there is no going back.
> i wish i could learn Unix. which distro do you
lustration" pdf files to certain
folders than deletes
the left over pdf files when done. Yes, I could move them instead of copying
them.
I'm no asking for anyone to write this for me but if someone could lead me i
the right direction, I
would be gr
Wow! Got a lot of responses to my post. Thanks everyone. After reading all of
them, I may have to
learn by example after all. I'm going to try Alan Gauld's tutorials first.
Mark
Alan Gauld wrote the following on 2/15/2007 12:39 PM:
> "Mark Bystry" <[EMAIL PROTECTED]&
You guys are great! I'm not sure how I found this mailing list but I'm glad
that I subscribed.
Mark
Rob Andrews wrote the following on 2/15/2007 1:23 PM:
> We're good like that. heh
>
> On 2/15/07, Mark Bystry <[EMAIL PROTECTED]> wrote:
>> Wow! Got a
Well, immediately I am having problems. Be patient with me.
This what I have...
copy_file.py
import os
import shutil as sh
sh.copy('C:\testing_it.txt', 'D:\')
raw_input("Done!")
...and it's not working.
Jeez! I'm retarded. It works like a charm now.
Thanks for that Rob
Mark
Rob Andrews wrote the following on 2/15/2007 2:29 PM:
> Ahh, yes. Your main trouble seems to be the use of \ instead of / in
> 'C:\testing_it.txt'
>
> Windows uses \, whereas python us
Ahh. Great tip Eric. Thank-you.
Mark
Eric Walstad wrote the following on 2/15/2007 2:58 PM:
> Hey Mark,
> Mark Bystry wrote:
>> sh.copy('C:\testing_it.txt', 'D:\')
>
> Also have a look at the os.path module. Because you want these scripts
> to work
ith my
checkbook. Hoping to
pick up some pyhton for complete n00bs reading)
Keep up the great work, Alan.
Mark
Alan Gauld wrote the following on 2/16/2007 4:45 AM:
> "Alan Gauld" <[EMAIL PROTECTED]> wrote in
>
>> After a very long delay I finally got some wo
I'll look for it. Perhaps I should pick up one of the "Dummies" book too.
Mark
Kent Johnson wrote the following on 2/16/2007 8:35 AM:
> Mark Bystry wrote:
>> Well, I'm new here and for the most I haven't got a clue as to what I'm
>> doing, however,
. Can someone
provide sample code
that maybe I could expand upon or point to a link somewhere so I can read up on
the subject?
I would appreciate it.
Thank-you,
Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
obviously affects all files giving them all the
same attribute. I can
continue doing it this way but I thought perhaps a script would be best. Maybe
it isn't, I don't know.
Anyway, thank-you for the links.
Mark
Tim Golden wrote the following on 2/22/2007 12:28 PM:
>> H
help of dsofile.dll the above reads the "Category" attribute of
test.txt.
Mark Bystry wrote the following on 2/22/2007 1:01 PM:
> Actually no. I want to change the Windows metadata. This is the same metadata
> that is on all files.
> It isn't PDF specific. (I wonder if Lin
getting even closer. figure out how to write to a file but still in vbscript.
dsofile_write.vbs
code:
Set objFile = CreateObject("DSOFile.OleDocumentProperties")
objFile.Open("D:\test.txt")
objFile.SummaryProperties.Category = "CAT54"
objFile.Save
Mark
Mark Byst
1), None)
code:
import win32com.client
props = win32com.client.Dispatch ("DSOFile.OleDocumentProperties")
props.Open (r"C:\test.txt")
props.SummaryProperties.Category = "CAT69"
props.Save ()
Maybe this is the same com error that you're getting
Mark
Tim Golde
python basics
but I'm no programmer.
Thanks everyone for your help.
Mark.
Tim Golden wrote the following on 2/22/2007 4:06 PM:
> Tim Golden wrote:
>> Slightly bizarrely, it works fine for me on a different
>> computer (my laptop). Both are Win2K. The only help I
>> could
erver):
filenumber = 1
class MyThread(threading.Thread):
def run(self):
listen=
server = MyServer(('',listen),MyHandler)
server.serve_forever()
t=MyThread()
t.setDaemon(True)
t.start()
--Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
nce. Anyone know why?
http://www.python.org/doc/faq/general/#why-are-floating-point-calculations-so-inaccurate
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
simple DLL functions that take
integers and return integers. If your APIs deal with pointers and
read/write buffers it is somewhat more complicated, but still easier to
write your bindings in Python than using the Python C APIs.
-Mark
___
Tutor mai
would add title, text,
and images.
Has anyone done this with openoffice UNO?
Thanks for your comments,
Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
sorted(L,key=lambda x: (x[1],x[2]))
[[3, 2, 1], [1, 2, 3], [2, 3, 1], [1, 3, 2]]
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
and
later) or should use xrange instead of range (on Python 2.5 or earlier,
especially for large lists).
Another option is:
myList = [1,2,3,4]
for index,value in enumerate(myList):
myList[index] = value + 1
-Mark
___
Tutor maillist - Tutor@python.or
.compile(r'^_{0,3}[A-Z](?:[A-Z0-9]|-(?!-))*(?single-letter strings are allowed
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
;> L
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0,
0, 0, 0, 0]]
>>> L[0][0]=1
>>> L
[[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0,
0, 0, 0, 0]]
Use a list comprehension to construct five different lists.
--Ma
; until print displays the correct filenames :^)
Also, "list" and "file" are Python built-ins, so avoid using those names in
code.
import os,fnmatch
patterns = '*.ini *.db'.split()
for root,dirs,files in os.walk('/home/saad'):
for pattern in patterns:
.fibsseq = [0, 1]
def __getitem__(self, key):
for i in xrange(key - len(self.fibsseq) + 1):
self.fibsseq.append(self.fibsseq[-1] + self.fibsseq[-2])
return self.fibsseq[key]
-Mark
"Emil" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hey
re
D_H = 'D 5 10 15 20 25 30 35 40 D Upper D Lower'
print re.split(r'\s(?![UL])',D_H) # split on spaces not followed by U or
L.
['D', '5', '10', '15', '20', '25', '30', '35', '40',
with an
editor that can display utf-8 (such as Notepad on Windows).
python testfile.py 2>error.txt # this redirects stderr to a file.
Hope that helps,
Mark
"Oleg Oltar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
The code
# -*- codi
nal that display those
characters? Can you change your terminals encoding preference via an
environment variable?
--
Mark
"Oleg Oltar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
And in case:
# coding: utf-8
import traceback
try:
r
You get the "D" characters when decoding Russian encoded in UTF-8 using Latin-1
instead.
# coding: utf-8
x=u'Зарегистрироваться'
print x.encode('utf-8').decode('latin-1')
ÐаÑегиÑÑÑиÑоваÑÑÑÑ
Check that your html encoding is declared corr
tual characters in the file end up
in the string. No backslash interpretation is performed. So in your
example, just read in the file and perform your operations:
sample.txt contains:
c:\abc\123.txt
Code:
>>> import os
>>> pathname = open('sample.txt').read()
>>> pathname
'c:\\abc\\123.txt'
>>> print pathname
c:\abc\123.txt
>>> print os.path.dirname(pathname)
c:\abc
>>> print os.path.basename(pathname)
123.txt
>>> os.path.dirname(pathname)
'c:\\abc'
>>> os.path.basename(pathname)
'123.txt'
Does that clear up the confusion?
--Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
7;,encoding='utf-8')
for i in xrange(32,0x1): # skip control chars
if i < 0xD800 or i > 0xDFFF: # skip surrogate pair chars
f.write(u'%04X: %s\t' % (i,unichr(i)))
f.close()
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ck and dirty, if example.mp3 isn't too big to fit in memory at once:
import urllib
fin = urllib.urlopen('http://www.example.com/example.mp3')
fout = open('example.mp3','wb')
fout.write(fin.read())
fin.close()
fout.close()
-Mark
r'(?ms)Contact Candidate\s*\n(.*?) -.*?\nTel: (\d+)')
print record.findall(data)
--cut
Output:
[('Jyoti Soni', '09975610476'), ('Minal', '9890498376')]
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
rFormatting()
>>> find.Replacement.ClearFormatting()
>>> find.Text = 'fox'
>>> find.Replacement.Text = 'cat'
>>> find.Forward = True
>>> find.Wrap = win32com.client.constants.wdFindContinue
>>> find.Execute(Replace=win32co
f16') adds a BOM every time, and the space wasn't encoded.
utf-16-le and utf-16-be don't add the BOM. This works:
import codecs
s = u"The cat sat on the mat"
f = codecs.open("utf16.txt","wb","utf-16-le")
f.write(u'\ufeff') # if yo
"Alan Gauld" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
Something like
L = [[0,0,0] *3]
I think you meant:
[[0,0,0]]*3
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
-Mark
Now L contains 3 copies of the same list so when you change
any one copy it is
that works for your example:
MyPattern =
re.compile(r'(.*?Start.*?)((\n\s*comment.*?)*\n)(\s*comment.*?)(\n.*?end)',
re.S)
You might look into something like pyparsing instead of a complicated re.
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
x1,x2=Positions
I know this does not work. Is there a direct way to get my x1 and x2
values.
line = '[2.5,2.8]'
x1,x2 = eval(line)
x1,x2
(2.5, 2.7998)
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
. yield L[i:i+n]
...
for n in shift(L,2):
... print n
...
[1, 2]
[2, 3]
[3, 4]
[4, 5]
[5, 6]
for a,b,c in shift(L,3):
... print a,b,c
...
1 2 3
2 3 4
3 4 5
4 5 6
[sum(n) for n in ishift(L,2)]
[3, 5, 7, 9, 11]
[sum(n) for n in ishift(L,3)]
[6, 9, 12, 15]
-Mark
g var?
Thanks,
Basu
mod = __import__(var)
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
b
[12, 21, 35, 47, 56, 94]
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
E and PATTERN are first case-normalized
if the operating system requires it.
If you don't want this, use fnmatchcase(FILENAME, PATTERN).
-Mark
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
oints, which are the entities
that underlie junction points
c.. Aimed primarily at developers who create reparse points
d.. Location: Microsoft Windows 2000 Resource Kit
Linkd or Delrp sound like what you may need. If you want to fix the problem
programmatically, try looking up:
DeviceIoControl
FSC
lly). The dates all have
the following RFC2822 format:
Eg. is d1 < d2?
d1 = "Tue, 13 Jan 2009 03:27:29 -0800"
d2 = "Tue, 13 Jan 2009 02:40:00 -0600"
Check out the email.utils module, specifically the parsedate_tz and
mktime_tz functions.
-Mark
Since you are updating the principal value each year, use the following to grow
the principal by the interest rate each year:
principal = principal * (1 + apr)
-Mark
"bob gailer" wrote in message
news:49761fdc.5020...@gmail.com...
Donna Belle Ibarra wrote:
Hi! I need
given how this works:
>>> def function(**kwargs):
... print kwargs
...
>>> function(one=1,two=2,three=3)
{'three': 3, 'two': 2, 'one': 1}
One can guess how the shortcut is implemented.
-Mark
"wormwood_3" wrote in message
news:4543
Ctrl+M isn't bound to anything in particular in wxPython (the 'enter' key or
otherwise).
Drop down menus will auto-bind menu items if you include the shortcut keys
on the menu's line item; Ctrl+N for New, for example.
The OS could also be catching the event and doing something unwanted.
Ctrl+M wo
7;|', the following code will
produce the same result in openPOs:
import csv
with open('open_pos.txt','rb') as f:
reader = csv.reader(f,delimiter='|')
openPOs = list(reader)
print openPOs
Note you may have to specify some more paramet
Is there a reason you don't want to use the newer, already pre-installed
version?
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/python.1.html
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscrip
wx.Panel provides better cross-platform reliability, so it's fairly standard
practice to go with a Panel in a Frame, and place the buttons, etc. on the
panel.
On Tue, Apr 19, 2011 at 11:59 AM, Eric Stevens wrote:
> I've been noticing that in all the example codes I have seen, when someone
> cre
Assertion Failed!
Program: C:\Python27\pythonw.exe
file: fread.c
line: 93
Expression: (buffer != NULL)
Whats the problem? Any idea?
"windll" requires the function called to be __stdcall calling convention.
The default is normally __cdecl. Try "cdll" instead.
-Mark
__
101 - 200 of 1119 matches
Mail list logo