Hello Dears,
I solved the problem: There are two underscore key strokes required.
Marcus.
Hello Dears,
1)I am trying to do this:
>>> dir(_builtins_)
I am getting this:
Traceback (most recent call last):
File "", line 1, in
dir(_builtins_)
NameError: name
ceback (most recent call last):
File "", line 1, in
-3 .abs()
AttributeError: 'int' object has no attribute 'abs'
4) finally, after printing
>>>abs._doc_()
I am getting this (and so on) :
Traceback (most recent call last):
File ""
It's not that hard to find a program that does this already. But I'm trying to
learn how to use these modules to create this. I've started it and now i want
to complete it so I can create another program and learn more about other
stuff, maybe a Twitter script or something. How do I learn when n
Yes, it's only for my own use on my local WordPress installation. Only
educational use.
--
https://mail.python.org/mailman/listinfo/python-list
This is the code right now: http://pastebin.com/pE1YZX2K
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I'm trying to use urllib and urllib2 to open an url + login_data in a for loop.
How can I display when successfully logged in and how to show when the login is
denied?
I've tried use this:
html_content = urllib2.urlopen(url).read()
re.findall('ERROR: The password you entered for the us
On Tuesday, 19 August 2003 15:01:01 UTC+12, Marcus Liddle wrote:
>
>
> Hi
>
> I'm trying to get a really simple python program to
> run a bash testing script and kill itself if its
> been running to long (ie infinite loop)
>
> create the thread object
See also
http://docs.python.org/dev/3.0/whatsnew/2.6.html#pep-3110-exception-handling-changes
--
http://mail.python.org/mailman/listinfo/python-list
uap12 wrote:
> When i givet the program away i like to pack it, so the enduser
> just run it, i don't like to tell the user to install Python, and/or
> som GUI package. is this possible.
So Tkinter would be your choice, cause its shipped with Python ...
> In the beginning it is okej to code the
Someone Something wrote:
> > from Tkinter import *;
Try to avoid this. Better import Tkinter. And don't forget to import
Tkconstants too!
> > rate=Frame(root)
> > income=Frame(root)
> > result=Frame(root)
Why do you use three frames? You only need one. And you can make your
class TaxCalc inherit
On 8/5/2009 10:56 AM, nn wrote:
On Aug 5, 7:13 am, Marcus Wanner wrote:
On 8/4/2009 6:09 PM, MRAB wrote:
>>> parts = [(5, 9, "a"), (7, 10, "b"), (3, 6, "c"), (15, 20, "d"),
(18, 23, "e")]
>>> parts.sort()
>>&
parts[pos - 1 : pos + 1] = [(p[0], max(p[1], q[1]), p[2]
+ "." + q[2])]
else:
# They don't overlap, so try the next pair.
pos += 1
>>> parts
[(3, 10, 'c.a.b'), (15, 23, 'd.e')]
That's th
ghly recommend scons. At dolphin-emu, we use it to daily compile
a project containing over 500,000 lines of c/c++ code, which is
modified very frequently. It works like a charm, and is seamlessly
cross- platform (in my experience). However, it might not be exactly the
thing you're looki
You might try posting to this thread:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/58df7b77394e4666/f4c13766a1e09380
I don't know much about the question myself, though.
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
On 8/4/2009 2:46 PM, Ann wrote:
On Aug 4, 11:31 am, Marcus Wanner wrote:
On Aug 4, 2:15 pm, Jay Bird wrote:
Hi everyone,
I've been trying to figure out a simple algorithm on how to combine a
list of parts that have 1D locations that overlap into a non-
overlapping list. For example,
#x27;')
listofvaluepairs = string.split(values, ',')
listofvalues = []
for pair in listofvaluepairs:
twovalues = string.split(pair, '-')
listofvalues.append(int(twovalues[0]))
listofvalues.append(int(twovalues[1]))
return listofvalues
v
On 8/3/2009 3:45 AM, Diez B. Roggisch wrote:
Marcus Wanner schrieb:
On 8/2/2009 10:43 AM, Christian Heimes wrote:
Marcus Wanner wrote:
I believe that python is buffer overflow proof. In fact, I think
that even ctypes is overflow proof...
No, ctypes isn't buffer overflow proof. ctype
On 8/2/2009 10:43 AM, Christian Heimes wrote:
Marcus Wanner wrote:
I believe that python is buffer overflow proof. In fact, I think that
even ctypes is overflow proof...
No, ctypes isn't buffer overflow proof. ctypes can break and crash a
Python interpreter easily.
Christian
I s
= random.rand())
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
probably by design and raises the topic in question.
Am curious to see the opinions of people who know.
TIA.
I believe that python is buffer overflow proof. In fact, I think that
even ctypes is overflow proof...
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
On 8/1/2009 9:31 PM, sturlamolden wrote:
- Python and C programmers use lists and arrays similarly.
I'm guessing that's because of the brackets...
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
l with Sockets (directly
anyway).
If memory serves correctly, it's where the system can't name resolve
the required address.
So best guess is it's either a temporary glitch, or an issue with your
routing.
Jon.
Jon.
'getaddrinfo failed' means that the nameserver can't be found, or that
it has no records of that address (I'm 90% sure of that).
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
tcp or udp? Is it a local socket or a remote one? What is
controlling the socket? Define "open".
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
\w+)-is-listening", text)
print "Captured '%s'" % m.group(1)
print "Matched from %d to %d" % (m.start(), m.end())
Ok, thank you all, it was very helpful!
Wow, I really need to learn more about regexp...
Any tutorials you guys can recommend?
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
userspace environment and
pyusb which uses that and provides an interface to Python.
iicr pyusb uses a c interface to libusb, not python...
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
ed by gcc)
If you're talking about a c program, almost certainly not. What you
should do is just use gdb and disas each function and look at what it
subtracts off of %esp at the third instruction in the function.
I can explain it to you if you are not very experienced in gdb and
assembly..
On 7/28/2009 11:58 PM, NighterNet wrote:
I am trying to make a simple splash screen from python 3.1.Not sure
where to start looking for it. Can any one help?
Trying to make a splash screen for python?
Or trying to do image processing in python?
Marcus
--
http://mail.python.org/mailman/listinfo
if this counts as help, but you're welcome!
Gregor
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
t useful, because the latter can be got with
len(str(42)). However, the former can also be (/slightly/ less)easily
got with len(bin(42))-2...
I also think that "Explicit is better than implicit." says that there
should be no return value in this case, as any return value would be
On 7/25/2009 5:34 AM, Hendrik van Rooyen wrote:
On Friday 24 July 2009 22:09:15 Marcus Wanner wrote:
First one to correctly decompress the value 0 into an ASCII character
wins the title of the world's most capable hacker :p
that is easy.
the xor of 0 and 1 is 1, which is ASCII soh,
On 7/24/2009 4:18 PM, Mark Lawrence wrote:
Marcus Wanner wrote:
On 7/24/2009 3:04 PM, Roy Smith wrote:
In article <0279f596$0$5185$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
On Fri, 24 Jul 2009 16:50:03 +0200, superpollo wrote:
Nah. 7 contains three bits, so le
bit is easy. It's the uncompressing that's
tricky.
I assume you mean ord("7")%2?
First one to correctly decompress the value 0 into an ASCII character
wins the title of the world's most capable hacker :p
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
On 7/21/2009 12:13 PM, Stef Mientki wrote:
hi Marcus,
That sounds like a very specialized type of thing,
Well from an application point of view,
with the current netbooks,
this looks like a perfect tool for any conversation or meeting.
which only the few people with experience with wxPython
x27;t think of any real-
world cases where you'd use something like that.
Actually, that would be very useful in the program from "any suggestions
to synchronize typed text and speech ?"...i.e. have a dictionary key of
(hour, minute, second).
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
in there
with them, then that would be good. But if you put bicycle and car and
adjustbrakes() in the module with the fruits, or mixed the two groups in
several modules, that would be bad.
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
On 7/20/2009 5:34 AM, Stef Mientki wrote:
thanks Marcus,
Marcus Wanner wrote:
On 7/19/2009 4:15 PM, Stef Mientki wrote:
hello,
I'm using Scintilla as a wxPython widget with great pleasure.
I now have an application where I want to make notes during a
conversation,
but also want to r
On 7/20/2009 2:13 AM, Paul Rubin wrote:
Steven D'Aprano writes:
Besides, one can legitimately disagree that 2/3 => 0 is the wrong thing
to do. It's the right thing to do if you're doing integer maths.
I wonder whether 2/3 => ValueError is preferable.
Not for me :(
--
http://mail.python.org/m
just give each note a four-digit ID number at the beginning of it
when it's entered and use that in the dictionary (to keep keys shorter).
Or you could just do a little hack and increase the number of bookmarks
allowed (seeing as source is available) :p
Marcus
--
http://mail.python.org/m
le in that session
again. If the second one is imported, it will not do anything until you
call the main() function, and then you can call it again as many times
as you want:
{{{
>>> import thefile
>>> for i in range(5):
... thefile.main()
...
hello world
hello world
hell
Excellent. From a very brief look it seems like it will be quite simple to
use.
Pete
Yes, it was fun to work with (for me at least).
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
Can someone explain to me, why the behaviour below is different when u
remark "lister" and unremark "self.lister"?
#--
class abc :
# remark this later and unremark "self.lister"
lister = []
def __init__ (self, val):
#se
Opps here is the mail again, incase my formatting is lost, can someone
explain to me why this code behaves differently when "lister" and
"self.lister" is swap remarked.
class abc :
# remark this later and unremark "self.lister"
lister = []
def __init__ (self, val):
#self.lister
Duh,
Ok here is the file again ...attached. I give up doing this via the
email editor. Sorry! new to the mailing list.
Marcus
Marcus Low wrote:
Opps here is the mail again, incase my formatting is lost, can someone
explain to me why this code behaves differently when "lister
Hi
I was trying to install PyQt, but things don't work as promised.
I'm working on OS X 10.5, didn't install another version of Python -
so it's 2.5.1 -, installed the latest "qt-mac-opensource-4.3.3.dmg"
and the latest sip 4.7.3. But when I then try to run python
configure.py for PyQt 4.3.
I'm writing something that has to invoke an external program, and every
time the external program prints something, update a UI. How would I go
about doing this?
signature.asc
Description: This is a digitally signed message part
--
http://mail.python.org/mailman/listinfo/python-list
oving "if EXIT" all works fine again.
Thanks all
Regards
Marcus Alves Grando wrote:
> I make one new version more equally to original version:
>
> --code--
> #!/usr/bin/python
>
> import os, sys, time
> import glob, random, Queue
> import threading
&
hon -V
Python 2.5.1
# uname -r
2.6.9-42.0.8.ELsmp
# python test.py /usr
test:0:1311:0
# python test.py /usr
test:0:1486:0
# python test.py /usr
test:0:1520:0
# python -V
Python 2.3.4
I really don't know what's happen.
Another ideia?
Regards
Chris Mellon wrote:
> On Nov 13, 2007 1:06
Diez B. Roggisch wrote:
> Marcus Alves Grando wrote:
>
>> Diez B. Roggisch wrote:
>>> Marcus Alves Grando wrote:
>>>
>>>> Hello list,
>>>>
>>>> I have a strange problem with os.walk and threads in python script. I
>>
Diez B. Roggisch wrote:
> Marcus Alves Grando wrote:
>
>> Hello list,
>>
>> I have a strange problem with os.walk and threads in python script. I
>> have one script that create some threads and consume Queue. For every
>> value in Queue this script run os.wa
ports/*'):
POOL.put(i)
while not POOL.empty():
time.sleep(1)
EXIT = True
while (threading.activeCount() > 1):
time.sleep(1)
except KeyboardInterrupt:
EXIT=True
--code--
If someone can help with this i appreciate.
Regard
updates over time, rather than
big updates all at once.
Any guidance or suggestions are very much appreciated.
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
Will McGugan wrote:
> Thanks for the explanation. It happens when I'm debugging a wxWidgets
> application with Komodo, but I can't trap it. I'm guessing it must be a
> Komodo issue, because I dont get it if I run it without the debugger.
The error happens in PyDev for Eclipse also -- only while de
y into Python's subdirectories... is that correct?
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 6, 3:19 pm, [EMAIL PROTECTED] wrote:
> Marcus> I'm looking for useful starting points, suggestions, and sample
> Marcus> code, to implement a calendar iterator.
>
> Have you looked at dateutil?
>
>http://labix.org/python-dateutil
>
> &
Oops-- the iter needs to work better than I do! :)
> > iter = calendarIterator("03-12-2006")
> > print iter.next()
>
>03-12-2006
^^
03-13-2006
> > iter = calendarIterator("03-12-2006 01:00:00", "minutes")
> > print iter.next()
>
>03-12-2006 01:01:00
^^
Hi,
I'm looking for useful starting points, suggestions, and sample code,
to implement a calendar iterator. Simply, the iterator is seeded with
an initial calendar date, e.g., "03-12-2006", and then subsequent
calls to next return subsequent dates. The seed could be a standard
calendar/datetime
fo/python-list
Stef,
Can you provide more context on your use-- are you receiving binary data
sequentially, or do you have a list or array of binary values? Are you
using numpy/scipy?
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
orm? Will Moinmoin be able to keep up with the heated
evolution of wikis for corporate and PIM usage? Is there a sense of
moinmoin momentum (developer or user)? Is the lack of moinmoin
advocacy a consequence of a weak product, or something else?
Thanks,
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
exe" jython_21
> Exception in thread "main" java.lang.NoClassDefFoundError: jython_21
>
> C:\Jython>"c:\Program Files\Java\jdk1.5.0_09\bin\java.exe" jython-21
> Exception in thread "main" java.lang.NoClassDefFoundError: jython-21
>
> Any hel
Goodness, you're a nice friendly lot aren't you!? I saw that and I
realise that ActivePython COMES with support for Windows. But it
doesn't say that it forces scripts you create with it to load modules
you haven't implicitly imported yourself! It doesn't say that a
script might run in PythonWin
Hi,
Sorry, I'm not trying to make things hard! I just can't figure why it
works when run from PythonWin and not from Python - PythonWin MUST load
some extra library.
Anyway, I have finally fixed it by adding import win32com to the top of
the script. Am guessing the DLL uses COM and PythonWin mu
Unfortunately not. Is there any doc anywhere that shows how to make
the script run from the command line the same way it does within
PythonWin?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
This is all I get:
error 250477278
Traceback (most recent call last):
File "script1.py", line 5, in ?
Inst = lib.Initialize(0)
WindowsError: exception code 0xeedfade
I get this when running python.exe script1.py
** When run from inside PythonWin it runs beautifully and returns with
no
I'm using ctypes and loading a DLL and running a DLL function. As I
say it works perfectly with no errors when I run from PythonWin but
gives the following exception when run from command line.
WindowsError: exception code 0xeedfade
I can use the DLL with no issues in other languages too. It wo
Hi,
I have a script that runs fine when I run it from within PythonWin but
causes a WindowsError: Exception when I try to run it from the command
line using python.exe. What is PythonWin doing differently?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hello All,
>
> I have a problem with the program that should generate x number of txt
> files (x is the number of records in the file datafile.txt).
>
> Once I execute the program (see below) only one file (instead of x
> files) is created. The file created is based on th
python -v command, ie the embedded way. Thanks very much.
Marcus.
--
http://mail.python.org/mailman/listinfo/python-list
ry. Then try
/usr/sbin/sendmail, /usr/libexec/sendmail and /usr/lib/sendmail. You
could try using exitcode 127 to detect "program could not be found or
executed" but I don't know how portable that is.
I can't comment on the Windows side of things.
Regards,
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
Thank for the detailed reply John! I guess it turned out to be a bit
tougher than I originally thought :-)
Reading over your links, I think I better not attempt rewriting the
zipfile.py program... a little over my head :-). The best solution,
from everything I read seems to be calling an unzip
ans I need some
form of buffered io wrapper, but I'm not sure where to start
with this.
Thanks!
Marcus
Ps -- this seems like a general stream processing problem… if anyone
can recommend good refs (web) on stream processing
--
http://mail.python.org/mailman/listinfo/python-list
> does anyone have any ideas as to how to go about creating a plugin/toolbar
> for both/either the IE/Firefox browsers?
For IE, checkout Browser Helper Objects (BHOs). Sample python code
can be found at:
http://aspn.activestate.com/ASPN/Mail/Message/ctypes-users/2263094
Marcus
-
a web site could read or destroy your
> files.
Slightly off-topic, it is possible to use browser helper objects
(bhos) with Internet Explorer:
http://starship.python.net/crew/theller/moin.cgi/CtypesLinks
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
our larger design.
So what do you consider when making this decision, and do these
factors differ between python and C#/Java?
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
ones be made into full-fledged properties
and validated? Should number have no validation? Is it more pythonic
to encapsulate tightly, or rely on "responsible use."
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
defense = [6, 8, 6]
# construct players list here
Can you recommend an efficient way to construct the player list?
Thanks!
Marcus
--
http://mail.python.org/mailman/listinfo/python-list
Arrghh, I forgot about case sensitivities sorry about that
guys, I'm so used to not having to think about that. Thanks for having
patience with me and thanks for the explanations.
import cPickle
hehe... damn... tricky getting used to that :-)
Thanks again,
Marcus
--
Thanks Marc, but... I've searched the file directories for cpickle (not
specifying file type) and only came up with test_cpickle.py. Also, if
cPickle.so were the correct file and existed in my lib then the
following would not happen.
>>> import cpickle
Traceback (most recent call last):
File ""
l, or in the previous version (pickle.py is present and
imports correctly). Is there a seperate module package that must be
downloaded and installed... or am I overlooking the obvious.
Would appreciate any suggestions on how to acquire/load the module.
Regards,
Marcus
--
http://mail.python.org/ma
78 matches
Mail list logo