I'm trying to figure out why the following statements evaluate the way they do
and I'm not grasping it for some reason. I'm hoping someone can help me.
40+2 is 42 #evaluates to True
But
2**32 is 2**32 #evaluates to False
This is an example taken from a Microsoft blog on the topic. They say the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 03/01/2016 02:03 AM, Chris Angelico wrote:
> On Tue, Mar 1, 2016 at 6:58 PM, Anthony Papillion
> wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA512
>>
>> On 02/29/2016 11:13 AM, Chris Angelico wrote:
>>&g
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 02/29/2016 11:13 AM, Chris Angelico wrote:
> On Tue, Mar 1, 2016 at 4:08 AM, Peter Pearson
> wrote:
>> try: smtp.sendmail(message['From'], message['To'],
>> message.as_string()) except: print "Message sending has failed"
>> sys.exit(1) print "M
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Hello Everyone,
I've been trying to write a /very/ simple script that will email a
binary file to an email address when run. Pretty simple. I've done
quite a bit of research and have finally settled on the following code:
http://pastebin.com/sryj98
I would absolutely recommend you take a look at the Qt stuff. Very modern,
easy to use, and free for non-commercial products.
Anthony
On February 27, 2016 5:18:57 AM CST, wrong.addres...@gmail.com wrote:
>I have some VB forms with more than a hundred objects. If I cannot drag
>and drop text
On 02/09/2016 07:47 PM, Ben Finney wrote:
> Anthony Papillion writes:
>
>> On 02/09/2016 07:26 PM, Anthony Papillion wrote:
>>> I am using datetime.now() to create a unique version of a filename.
>>> […]
>>
>> Found the solution in strftime(). Exactly wh
On 02/09/2016 07:26 PM, Anthony Papillion wrote:
> Hello Everyone,
>
> I am using datetime.now() to create a unique version of a filename.
> When the final file is named, it will look something like:
>
> myfile-2015-02-09-19-08-45-4223
>
> Notice I'm replacing all o
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Hello Everyone,
I am using datetime.now() to create a unique version of a filename.
When the final file is named, it will look something like:
myfile-2015-02-09-19-08-45-4223
Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by
date
vely.
I'm looking for a way to get at the mail stored in Thunderbird using
Python and, so far, I can't find anything. I did find the mozmail
package but it seems to be geared more towards testing and not really
the kind of use I need.
Can anyone suggest anything?
Many Thanks,
Anthony Pa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
I'm writing a program to help migrate mail from one host to another
with a few special circumstances. I'm able to get a list off of the
source IMAP server using the .list() command but I'm not quite sure
how to create a folder on the target machine.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Does anyone know of a module that allows the wiring of Outlook PST files using
Python? I'm working on a project that will require me to migrate 60gb of
maildir mail (multiple accounts) to Outlook.
Thanks
Anthony
- --
Sent from my Android device wi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On October 13, 2015 2:04:09 AM CDT, Burak Arslan
wrote:
>
>
>On 10/13/15 00:52, Anthony Papillion wrote:
>>> Check out the email.parser module, or the convenience function
>>> > email.message_from_string - yo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 10/12/2015 3:58 AM, Chris Angelico wrote:
> On Mon, Oct 12, 2015 at 6:17 PM, Anthony Papillion
> wrote:
>> I'm writing a script that will have email with attachments passed
>> to it via Postfix. Postfix is properly p
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
I'm writing a script that will have email with attachments passed to it via
Postfix. Postfix is properly passing the email to the script but I'm not quite
sure how to get at the attachment. What I need to do is save the attachment
out to the fil
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Over the next few months, I'll be working on a project using Python on
Microsoft Windows. While I'm doing this project, I'd also like to contribute
in any way I can to making Python in Windows better.
Does anyone know if there is a Windows SIG?
in
the general direction of how to do it?
Thanks,
Anthony Papillion
- --
Phone:1-(845) 666-1114
VoIP: 17772471...@in.callcentric.com
Skype:CajunTechie
-BEGIN PGP SIGNATURE-
Version: APG v1.1.1
iQJJBAEBCgAzBQJV6FtfLBxBbnRob255IFBhcGlsbGlvbiA8Y
On 01/21/2015 04:35 PM, Chris Angelico wrote:
> On Thu, Jan 22, 2015 at 6:18 AM, Grant Edwards
> wrote:
>> On 2015-01-21, Steven D'Aprano wrote:
>>> In 2009, Robert Martin gave a talk at RailsConf titled "What Killed
>>> Smalltalk Could Kill Ruby".
>>
>> But does he answer the more important que
ldcards?
Thanks,
Anthony
--
Anthony Papillion
Phone: 1.918.631.7331
XMPP Chat: cyp...@chat.cpunk.us
Fingerprint: 65EF73EC 8B57F6B1 8C475BD4 426088AC FE21B251
iNum:+883510001190960
PGP Key: http://www.cajuntechie.org/p/my-pgp-key.html
--
https://mail.python.org/mailman/listinfo/python-list
Is there a way to read the serial number of a TLS cert my app receives?
Anthony
Sent from my mobile device
--
https://mail.python.org/mailman/listinfo/python-list
Hello Everyone,
So I've been working with Python for a while and I'm starting to take
on more and more serious projects with it. I've been reading a lot
about Python 2 vs Python 3 and the community kind of seems split on
which should be used.
Some say 'Python 3 is the future, use it for everythin
On Apr 5, 2014, at 23:21, Ben Finney wrote:
Anthony Papillion writes:
for row in r:
print row['YEAR']
This works fine. But, I am needing to do date addition/subtraction
using datetime and so I need these dates as integers.
I assume you mean you will be creating ‘datetime.dat
On Apr 5, 2014, at 23:03, Chris Angelico wrote:
On Sun, Apr 6, 2014 at 1:52 PM, Anthony Papillion
wrote:
When I try to
cast them like this:
print int(row['YEAR'])
I am told by the interpreter:
Traceback (most recent call last):
File "analyze.py", line 14, in
Hello Everyone,
I'm working with historical earthquake data and I have a tab delimited
file. I'm using the csv module with the \t delimiter to denote it's
tab separated and it's working fine. I've set things up loike this:
import csv
f = open('earthquakes.tsv')
r = csv.DictReader(f, delimiter='\
Hello Everyone,
I'm writing a little helper script in Python that will access a JSON
formatted argument from the shell when it's called. The parameter will
look like this:
{"url":"http://www.google.com"}
So, if my program is called "getargfromcli.py" the call will look like this:
getargfromcli.
On 09/13/2013 08:24 AM, Peter Otten wrote:
> Anthony Papillion wrote:
>
>> And I get a traceback that says: No JSON object could be decoded. The
>> specific traceback is:
>>
>> Traceback (most recent call last):
>> File "coinbase_bot.py", line 31,
usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object
On 09/09/2013 04:41 AM, Steven D'Aprano wrote:
> On Mon, 09 Sep 2013 02:39:09 +1000, Chris Angelico wrote:
>
>> On Mon, Sep 9, 2013 at 2:08 AM, Charles Hottel
>> wrote:
>>> I think this article is relevant althought the code examples are not
>>> Python but C:
>>>
>>> http://cm.bell-labs.com/who/k
On 09/02/2013 11:12 AM, Chris “Kwpolska” Warrick wrote:
> On Mon, Sep 2, 2013 at 6:06 PM, Anthony Papillion wrote:
>> Hello Everyone,
>>
>> I have a multi-line string and I need to remove the very first line from
>> it. How can I do that? I looked at StringIO but I can&
Hello Everyone,
I have a multi-line string and I need to remove the very first line from
it. How can I do that? I looked at StringIO but I can't seem to figure
out how to properly use it to remove the first line. Basically, I want
to toss the first line but keep everything else. Can anyone put me
On 08/31/2013 07:32 PM, Chris Angelico wrote:
> On Sun, Sep 1, 2013 at 10:19 AM, Anthony Papillion
> wrote:
>> On 08/31/2013 06:48 PM, Chris Angelico wrote:
>>> On Sun, Sep 1, 2013 at 9:44 AM, Anthony Papillion
>>> wrote:
>>>> I'm writing a proces
On 08/31/2013 07:32 PM, Cameron Simpson wrote:
> On 31Aug2013 19:19, Anthony Papillion wrote:
> | On 08/31/2013 06:48 PM, Chris Angelico wrote:
> | > On Sun, Sep 1, 2013 at 9:44 AM, Anthony Papillion
> wrote:
> | >> I'm writing a processor for Bitmessage
On 08/31/2013 06:48 PM, Chris Angelico wrote:
> On Sun, Sep 1, 2013 at 9:44 AM, Anthony Papillion wrote:
>> I'm writing a processor for Bitmessage messages and I am needing to
>> parse the following returned JSON string:
>>
>> {u'inboxMessages':
>
Hello Everyone,
I'm writing a processor for Bitmessage messages and I am needing to
parse the following returned JSON string:
{u'inboxMessages': [{u'fromAddress':
u'BM-2DBYkhiBZCyrBa8J7gFRGrFRSGqtHgPtMvwQ', u'toAddress':
u'BM-2DC7SCTj2gzgrGgMvUCARdrfrsgLyz3iMyN3', u'read': 0, u'msgid':
u'36659a44
On 08/18/2013 05:52 PM, Roy Smith wrote:
> In article ,
> Anthony Papillion wrote:
>
>> I've just started working with the Crypto library and I've already run
>> into a wall even though I'm following a tutorial. Basically, I'm trying
>> to encr
On 08/18/2013 05:29 PM, Skip Montanaro wrote:
>> When I run the code above, I am told that the IV must be 16 bytes long.
>> I'm assuming that the IV (I know that means "Initialization Vector") is
>> either the key OR something else I can set. But I don't know how or what
>> to do.
>
> Does this St
I've just started working with the Crypto library and I've already run
into a wall even though I'm following a tutorial. Basically, I'm trying
to encrypt a string using AES in CBC mode. Here is the code:
from Crypto import AES
import hashlib
text_to_encrypt = 'This is a super secret encrypted mes
(bits)
print "\nGenerated Number: ", a, "\n"
print "Number of digits: ", len(str(a))
isNumberPrime = isprime(a)
if isNumberPrime == True:
print "\nThis number is a prime.\n"
else:
print "\nThis number is not a prime.\n"
Thanks!
Hi Everyone,
So I've used Glade to build a simple UI and I'm loading it with
gtkBuilder. The UI loads fine but, for some reason, none of my signals
are being connected. For example, in Glade, I said when the button
called btnExit was clicked, execute the btnExit_clicked method. Then, in
my App() c
> I don't know anything about Glade, so I can't answer your question
> definitively. However, as a general rule, you can use the dir() builtin
> function to see what methods are defined by an object.
Hi John,
Thanks for the input and it looks like it's pretty simple. Basically, I
can access the
Hi Everyone,
So I've built a UI with Glade and have loaded it using the standard
Python code. In my UI, I have a textfield called txtUsername. How do I
get and set the text in this field from my Python code?
Thanks!
Anthony
--
Anthony Papillion
Advanced Data Concepts
Get real about
ly do not see any reasons why there isn't anything.
> Please help me understand it. Any insights?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Anthony Papillion
Advanced Data Concepts
Get real about your software/web development and IT Services
Phone: (918) 919-4624
Hello Everyone,
So I figured out the last problem about why I couldn't load my UI files but
now I've got something that has be totally stumped. I've worked on it most
of the day yesterday, Google'd it, and fought with it today and I'm
admitting defeat and coming to the group with hat in hand askin
Hi Everyone,
So I'm tackling designing a non-CLI program using Glade. I went through some
tutorials and it seems like I'm doing things right but I'm my UI won't load.
Python keeps griping about "could not create glade XML object".
I have a .glade file called MainWindow.glade and my main window is
Just wanted to thank you guys for taking the time to respond. Looks like my
'limited resources' aren't so limited after all!
Cheers,
Anthony
--
http://mail.python.org/mailman/listinfo/python-list
m-pc-in-a-power-outlet-2011022/)
which isn't too shabby but I wonder if it will work.
Thanks!
Anthony Papillion
--
http://mail.python.org/mailman/listinfo/python-list
So I want to execute some code when the user double clicks an item in
a ListBox. The documentation says I should use the listbox.bind()
method, specifying the Double-l event to detect the double left mouse
button click. My code is this:
gsItems = Listbox(root, width=76, height=30, selectmode="brow
I'm writing an application that uses the Google Storage Python
library. When an error occurs, the error is printed on the terminal.
What I need to do is intercept that text into a variable so I can run
a re.search() against it and find out what's going on.
I thought doing a output_text = method_n
Thank you, RantingRick and EB303. Much appreciated and it looks like
it works fine now. Still learning but I am amazed every single day how
simple Python is!
Thanks Again,
Anthony Papillion
--
http://mail.python.org/mailman/listinfo/python-list
So I'm trying to add a Listbox to my window. I want it to be the width
of my window and the height of my window. I'm using the following
code ('root' is my toplevel window):
gsItems = Listbox(root, width=root.winfo_width(),
height=root.winfo_height())
gsItems.pack()
While you would think this co
Thank you gentleman for your input. I'm starting to look at Python/GTK
for desktop development and was hoping there might also be something
for Android. Oh well, like Simon said (pardon the pun), it is open
source so... :-)
Anthony
--
http://mail.python.org/mailman/listinfo/python-list
you say
you were. IMHO, your posts serves no purpose but to hurt the community
and scare away newbies.
Anthony Papillion
--
http://mail.python.org/mailman/listinfo/python-list
I know Python is growing in popularity and some of Palms devices
already let you run Python apps in a VM environment. I'm wondering if
anyone knows (or can make an educated guess) if there are any plans
for Python to come to the Android environment? I'm not talking
backend stuff here but full fro
Someone helped me with some code yesterday and I'm trying to
understand it. The way they wrote it was
subjects = (info[2] for info in items)
Perhaps I'm not truly understanding what this does. Does this do
anything different than if I wrote
for info[2] in items
subject = info[2]
Thanks!
Anth
Thank you Emile and Thomas! I appreciate the help. MUCH clearer now.
--
http://mail.python.org/mailman/listinfo/python-list
Thomas,
You have been my savior on this journey twice now and I appreciate it.
What you did totally makes sense (and I had forgotten the list was
zero based) and I'm going to try it out right now. Thank you SO much
for your patience. I'm coming from a near pure .NET and PHP background
so I'm stil
Hello Everyone,
Thanks to help from this group, my statistical project is going very
well and I'm learning a LOT about Python as I go. I'm absolutely
falling in love with this language and I'm now thinking about using it
for nearly all my projects.
I've run into another snag with nntplib I'm hopi
> I just had a quick look at the documentation. It looks like you should
> re-read it.http://docs.python.org/py3k/library/nntplib.html#nntplib.NNTP.xhdr
Thank you for the help Thomas. I did reread the doc and I see what you
mean. I think this will work now. Much thanks for the help!
Anthony
--
Hi Tim,
Tried both and neither works. While I really believe it's simply the
wrong code, I'm wondering if my news server might be throwing
something invalid into the header or not conforming to RFC standards.
Thanks for taking a shot at this anyway though.
Anyone have any other thoughts on why th
I'm new to NNTPLib (and Python) and I'm experiencing some behavior I
can't understand. I'm writing a program to analyze newsgroup subject
which will then produce statistics on topics discussed. For my
example, I'm using this group (comp.lang.python) and trying to simply
print out all of the subject
On Jun 6, 10:16 pm, Ben Finney wrote:
> Anthony Papillion writes:
> > import os
>
> > os.path.append('$HOME/gsutils/boto')
>
> > thinking I could then successfully do the import boto statement.
> > Nope.
>
> You'll need to give the liter
On Jun 6, 10:33 pm, Chris Rebert wrote:
> On Sun, Jun 6, 2010 at 8:16 PM, Ben Finney wrote:
> > Anthony Papillion writes:
>
> >> import os
>
> >> os.path.append('$HOME/gsutils/boto')
>
> >> thinking I could then successfully do the import b
Hello Everyone,
I'm brand new to Python and have been finding it really easy to get
into. But I've run into my very first problem that I'm hoping someone
here might be able to help me with.
I'm working with the Google Storage API and all of their Python
library is under a directory called $HOME/g
62 matches
Mail list logo