« first day (1711 days earlier)      last day (3237 days later) » 

12:10 AM
ok sure ... thats how you dump a pickle
 
my problem is that this overwrites the file everytime I dump, what I want is to be able to store previous invoices and be able to load the up everytime the app is executed, this way every invoice ever created will display in a listbox I made.
 
12:26 AM
cbg
 
Does anyone know if it's possible to user Python's threading module to have two infinite while True loops running at the same time?
I haven't have any luck thus far.
It seems to just launch the first one.
 
yes, it's possible
 
Hrm...
I guess the question I should have asked first is, can you do that with asyncio? I've got a program that I'm working on that uses asyncio and websockets, in a while True loop.
However, part of the code involves the blocking websockets.recv() function.
This renders that while True loop useless for keeping track of time.
So, I need to find a way to keep track of time while still having the blocking websockets.recv() call active.
And thus far having two while True loops going at the same time has escaped me :P
 
assuming you yield in the loop, then yes, you can do that in asyncio too
 
Do I just declare it as another @asyncio.coroutine and add another asyncio.get_event_loop().run_until_complete(FUNCTIONHERE)?
 
12:40 AM
that sounds like something you'd do with asyncio
 
@JonClements cbg?
 
ohh thx for that lol
 
watermelon
:D
People don't really talk like that here, don't worry
 
1:05 AM
I'm currently using the IDLE compiler (3.4.3) to code in Python, does anyone know how I can get numpy, scipy and matplotlib packages for the compiler I'm using (3.4.3)
 
IDLE's not a compiler, it's just a shell. Python's not compiled.
 
Elaborate Davidism
 
Assuming you're on Windows, you want lfd.uci.edu/~gohlke/pythonlibs.
Elaborate on what? Python's not compiled, you're using the wrong word.
 
In terms of compilation explain the difference between Java & Python
what word should I use
what does compile mean?
I'm a noob
 
Python is interpreted: you write code and run it directly. Java is compiled: you write code, then there's an intermediate step where you compile it, then you run that compiled code.
 
1:09 AM
Thanks
Btw how do I know which one to download, there is so many numpys
Windows 64Bit
Windows 8*
 
did you install 32 bit python or 64 bit python
you download the one that's compiled against your Python version and architecture
You might find anaconda easier to use. Everything is way more straightforward on Mac and Linux too.
 
Davidism, I downloaded this one
numpy‑1.9.2+mkl‑cp34‑none‑win_amd64.whl

how do i check if it's the right one
 
it's the right one if you're using python 3.4 64 bit
read the top of the page
 
ok how do I import it in to IDLE
 
read the top of the page: you use pip to install packages
 
1:20 AM
It's getting late, I'll do this all tomorrow.
 
Hi Pythoners!
I wanna to what kind of applications can be created using python and is it has IDE like Visual Studio.
 
Use Spyder, which comes bundled with Anaconda. It's the (un)official recommendation of Aaron Hall: continuum.io/downloads
When you're really hot stuff, I'll teach you about emacs.
 
I am serious
@davidism answer please
 
So am I :D
haha, only serious
@AbhinavShrivastava did david tell you it's ok to ping him?
 
I asked in group but here somepeople are kidding that's why I asked to an individual
 
1:30 AM
Though my tone may be irreverent, I'm not kidding.
 
but that wasn't the answer of my question
 
Also, I don't recall if it's general SO chat rules or just Python room's rules, but don't @name people unless they tell you it's ok to.
It was the answer to the second part of your question
 
I just wanna to know what kind of application created using python till now and Is it have IDE like Visual Studio and is it creates mobile, android and cross platform application too.
 
Kivy is the Python cross-platform mobile system
As for what, you can do anything with Python.
We use Python for speed of development.
maybe you've heard of 2048?
Question to the room: Anyone use requests to authenticate and use StackExchange's API?
regarding @'ng someone, see Rule 3: sopython.com/chatroom
 
Aaron's such a kidder
They changed the definitions of yam and tomato
 
1:52 AM
I got pinned for that? Go read the rules and ask a better question.
I changed them to be more general. Yam it, it just makes more sense!
 
user1277936
I'm getting:
 
user1277936
running build_ext
 
user1277936
building 'first' extension
 
user1277936
error: Unable to find vcvarsall.bat
 
user1277936
I tried pasting vcvarsall.bat in various places to no avail
 
user1277936
1:57 AM
It's for a hello world c extension module
 
Install visual studio compiler
 
user1277936
I have 3 of them installed
 
user1277936
Windows 8
 
Windows sucks, use Linux, problem solved
 
user1277936
yes true
 
2:00 AM
Try anaconda instead
 
Three "try anaconda"'s in a row. It's now the (un)official recommendation of the Python room.
 
The windows and science people here seem to like it.
 
user1277936
my anaconda don't want none unless you got. buns. hun.
 
user1277936
does anaconda have a PyQt lib that works with it?
 
My meetup group refuses to make it official since Continuum is not a non-profit.
But I'll happily tell people about how we use it and it works every time.
lol
 
user1277936
2:11 AM
All I want to do is use Qt5, Python and write C extension modules. Which python distro is then best suited? I will randomely try some otherwise
 
user1277936
I've already got a working app with CPython, but can't find vcvarsall for some reason and no solution to this particular not-finding-it instance
 
user1277936
on google
 
user1277936
:Xj
 
ah, (?) have you tried IRC?
wait... I'm presuming you asked about this on the site and got no help... like 24 hours ago...
 
user1277936
2:15 AM
No haven't asked on a forum yet
 
Try asking on the site, that's where the really serious people looking to answer something for the upvotes are.
 
user1277936
Yeah, but I got banned a long time ago >.<
 
user1277936
Can you unban me?!
 
user1277936
Or could someone ask the gods to unban me... I have matured some.
 
user1277936
^_^
 
cbg
 
If it's not in the jargon file I don't recognize it.
 
@EnjoysMath If it's a question ban you're talking about, no-one can unban you ... but you might find this useful:
 
My wife toasted some bread. It smells like pot in here.
 
209
Q: What can I do when getting "We are no longer accepting questions/answers from this account"?

ArjanDo not repost the question you were about to ask until you have READ EVERYTHING WE ARE ABOUT TO TELL YOU. While trying to ask a question, one could get: We are no longer accepting questions from this account. See the Help Center to learn more. Likewise, for answers: We are no longe...

 
2:38 AM
And I am not 420 friendly.
now it smells like almonds
 
Almonds smell good
 
yeah, but there's a bit of burntness in the air still
anyways
 
You shouldn't go to burlington, vt then
 
nope, I'm not going to Vermont.
 
@EnjoysMath the number of downvotes on your questions is impressive. What did you do to annoy the entire community enough to do that?
 
2:41 AM
lol; when i was there, people were smoking it in the streets.. I'm not a fan
 
Yeah, downvotes on questions are free. Never annoy when you're the one with the questions.
We went to the park to watch fireworks and the NY Philharmonic, and my wife was fit to be tied because of the people around us smoking pot.
 
I updated pycharm, and now it loads pretty fast
 
try Spyder yet?
 
Anaconda is the easy way out, I'd rather suffer my way into knowledge
Windows + Python builds character
4
 
Scientific PYthon Development EnvironmenteR
Well, that's the way I choose to think of it.
 
2:48 AM
EnvironmenteR?
 
Dogs are weird
They just sit there.. sleeping, or sniffing and licking random stuff
 
That's because we lock them up and don't let them go out and kill and eat whatever they want.
We steal their killer instinct and make them be lovable furballs.
Then we yell at them for rolling in poo.
What did we expect?
Lassie was a TV show.
Hmm... I want to find and watch Leave it to Beaver now... then maybe go even further back and watch some Dobie Gillis
 
3:15 AM
Saved by the Bell was this generation's Dobie Gillis.
Screech was Maynard.
Kelly Kapowski... wowski.
 
googles ... it might be a stretch to call a show cancelled over twenty years ago "this generation's" anything. If I were to be unkind, I could see it being analagous to Dobie Gillis in the sense that I'm definitely last generation, and I've no idea who that is ;-P
 
3:35 AM
It was in reruns quite a lot even when I was in college, and I graduated in 2002, so... relevant to me.
I'm trying to figure out how to add tokens and whatever other authentication to headers. Looks straightforward, but now I gotta get my tokens/keys/whatevers...
 
Fair enough. I've vaguely heard of SBTB, but never seen any of it. From the UK, though, and AFAIK it never crossed the pond.
 
Best teen show ever.
 
 
1 hour later…
5:03 AM
cabbage all
Any python brain teasers
 
5:22 AM
@Dracunos Indeed but I found that after ten years I had enough character. Cbg, all
 
Cabbage :-)
@holdenweb How was the flight?
 
LHR-IAH was OK. IAH-PHX was delayed, rather tedious. I then had to stop off on the way to the hotel for an Apple power brick, having left my regular one at home.
Left home at 7:45am Monday, got to the hotel about an hour ago :-(
So technically it's still Monday for me
Otherwise, uneventful
 
Ah... Overall, its okay, right? Enjoy the TX :-)
 
AZ, in fact. Temperature was 113°F yesterday
 
Well it would still be better than India I guess
Just step out of office and you will take bath in sweat
 
5:37 AM
Guess so. Apparently Pakistan is also having a terrible time of it. Anyway, having been up for 24hrs, my primary need now is sleep (and I have ot get up in the morning to discuss the offer I receieved earlier today)
 
 
1 hour later…
6:56 AM
Cbg :)
 
7:09 AM
Cabbage @RobertGrant
 
ǝbɐqqɐɔ
 
7:33 AM
hello
 
Cabbage!
 
7:49 AM
Hey up
 
8:48 AM
morning all. dumb question incoming! I haven't used Python for a webapp before and I'm using Flask to create a little api this morning. I want to use mysql but I'm a bit bewildered about my options, there appear to be a few drivers - which one is most popular?

also an assumption, is it fair to say that most pythonistas use postgres over mysql? seems that way. thanks!
also, cabbage? :)
 
@Darragh cbg
 
haha! clearly I'm a python chat newbie. but I concur: cbg :D
 
@Darragh One of the more popular options is probably sqlalchemy.org
 
9:15 AM
Can you write the function, please? — Jimmys 29 secs ago
 
@Darragh I've used MySQL and postgres databases and talked to them via SQLalchemy. I get the same sense that a lot of pythonistas prefer to use postgres, but am not expert enough to offer an opinion as to why. For my uses (databases <= ~ 100GB) they've apparently been very similar
 
As an aside, if you're on Windows I think MySQL is your only option
 
I am doing offline data analysis, though, so not too bothered about super quick response times
@RobertGrant Incorrect, Bobby G
My Windows 8 box is running as a postgres server as we speak
 
As an aside, I think @JRichardSnape hates me
 
(not an invitation to try and hack it)
@RobertGrant Surely not
 
9:19 AM
Yeah it can run it, but can you connect from python on Windows?
 
for why?
 
@RobertGrant yes - I'm doing that too
 
There are plenty of Python users using MySQL too. I don't think there is a clear winner here.
 
Oh okay, I couldn't when I tried it
 
9:20 AM
Both databases have their pros and cons.
 
bows out as expert appears ;)
Ooh - do emoji break italic highlighting?
 
:)
It's the spaces
 
obviously not
I put the leading space in as an edit as I thought that was the error. Must be the trailing space
Indeed it was
@RobertGrant I haven't tried connecting to a remote box running postgres from a windows box running python/SQLalchemy. I can't see why that would fail, but is is a combination I can't vouch for that may apply to your situation.
 
No, I meant local->local
 
Thanks guys! I was reading about SQLAlchecmy there. I thought it was a bit overkill for my purposes at first (I thought it was just an ORM layer originally) but it looks great. I think I'll give it a whirl.

I also realised that one of my problems was that python couldn't actually see libmysql on my machine. SO to the rescue there: http://stackoverflow.com/questions/6383310/python-mysqldb-library-not-loaded-libmysqlclient-18-dylib
 
9:29 AM
Cool - enjoy :)
 
I'm still in the dark about "cabbage" though... one thing at a time I guess :)
 
@Darragh read about Salad Language here: sopython.com/salad
 
@ReutSharabani Melon!
 
9:52 AM
cbg
 
10:23 AM
Quiet in here today.
 
We're all hiding for the surprise party.
 
Aw, shucks, you're throwing me a surprise party?
oh
I wasn't invited... trails off
 
user559633
10:48 AM
 
user559633
Google put a binary blob into Chromium (upstream chrome browser dev) to allow reading from its machine's microphone
 
user559633
hidden by default, opt-in by default
 
Not opt-in by default
 
user559633
Yes it is.
 
Looking at my Chrome, it's disabled
And I haven't seen that setting before
 
user559633
10:51 AM
This is Chromium -- give it a few weeks for the stable build to roll into Chrome
 
Bah and/or humbug
 
user559633
'"Once the blob is on the system the security risks have been increased". From our perspective, the blob is just another part of the Chrome codebase (just with a weird delivery mechanism).'
 
BAHBUG!
 
user559633
This is actually a pretty big deal
 
If true, naughty.
 
user559633
10:53 AM
Is true.
 
"Audio Capture Allowed Yes"
Uh, not liking that setting Google
chrome://voicesearch/
 
user559633
The dev in the mailing list is dancing around the fact that they installed the module in a non-standard way, pushed a binary blob into an open source project, and are refusing to address criticisms of it being enabled by default.
 
user559633
The claim that "oh don't worry it only activates when you push a button on a website" is such bullshit
 
Hmm - my use of "true" was incorrect. I sorta meant - if not a mistake / rolls out to chrome etc. goes off to find chrome install and update to check it out
 
user559633
You won't see it in the chrome installation yet. This is chromium.
 
10:55 AM
I reiterate my advocacy for firefox
 
Firefox all the way, baby
 
user559633
It's just not as good of a browser, which is depressing.
 
Chrome > FF.
 
user559633
This is particularly shit because you can tape over your webcam, but almost all microphones in laptops are hardwired/no switch
 
Welp - if it goes through, I'm switching to Opera (pending investigation)
 
10:56 AM
I get the difference chromium to chrome, so you're saying it hasn't got to chrome yet
 
Chrome is the Officially Endorsed Browser For Room 6 FYI.
 
Opera all the way, baby, except it's just another webkit wrapper now
 
user559633
@JRichardSnape Yeah, not everything in the chromium mailing list is pertinent to Chrome yet
 
@tristan Yep - allows someone to hijack it and listen in. Government or otherwise
gets the itch to write custom hardware drivers again
 
I like the memory management of chrome better and it handles large numbers of tabs better than FF, but FF is free, baby, free.
 
10:57 AM
FF is doing the process-per-tab thing, slowly
I think it's turned on by default now
 
@IntrepidBrit resist, resist. Before you know it, you'll be responsible for the gnicrophone driver
 
I always pondered the possibility of creating a driver which has to be authorised for use on a per caller basis
 
yeah - I think it is on by default in FF, but it's still not bug free - occasional lockups still observed here - resolved by close and reopen session with exactly the same tabs, which implies bad memory management (I have very poor tab management).
 
But that'd end up slow, even for driver magicians
 
Interesting thought, though
security wise
 
user559633
11:00 AM
You could authorize it on a per application "session", but yeah, mother-may-i for every operation would be expensive
 
@JRichardSnape yeah it's not 100% yet, but much better than the bad old days when the content of certain tabs would turn into black screens
 
@RobertGrant Absolutely.
 
@tristan Maybe a global "switch" might be better...
Right! Who's up for writing PyOS?
haha
 
user559633
Oh god a Python OS would be terrible
 
You mean SOpyOS?
 
11:02 AM
Or CabbageOS
@tristan ye of little faith :P
 
user559633
@IntrepidBrit me of much experience
 
It's not like it'd be an inherent security threat or anything
xD
 
@IntrepidBrit Unsafe / More Unsafe?
 
user559633
i can't wait to cash out and use a computer only an hour a week or so
 
@tristan we'll just write everything in C and call it with Python
 
11:04 AM
Python would be a great OS. All objects stuck in globals :P
 
user559633
@RobertGrant And so the inefficient path of just writing it in C begins
 
Hey, it worked for Python
 
ASIDE: fellow Brits - thoughts on the Anderson report?
 
morning everyone
 
@IntrepidBrit I'm a fan of curbing surveillance, but looks as though the conclusions will be watered down and quarter-implemented later this year
 
11:19 AM
@RobertGrant Bloody Tories. You're not wrong, but I welcome the report. Gives me a piece of paper to wave around whilst ranting.
 
Yeah it's good to have these things documented
 
I always like an order paper to wave as I rant
 
Oh you silly British people
 
delusions of power
we say eccentric @corvid. You eccentric British people ;)
that's just the form old boy
 
oi ill hook u in the gabba m8
 
11:25 AM
u wot m8?
 
You squarin' pal? I'll yammin' smash yer pus.
 
You havin' a giraffe?
 
More seriously, I've only heard third hand reports of what's in the report, so can't really comment. An observation - interesting that we always attribute reports to the name of the reviewer, not their contents. An obsession with personality over substance?
 
Possibly, although also with accountability
 
11:27 AM
Also, it's easier to say the Anderson report than the full name and the original creators?
 
And definitely easier than reciting the contents as the name of the report
chat.stackoverflow.com/transcript/message/24040099#24040099 - that's about the only thing that builds
 
obviously, as a humourless left-ist, I advocate for careful recitation of the full abstract for all but the most cursory references ;)
 
The problem with these reports is they're often too easily watered down. They need to say these are our conclusions, and nothing less than this will implement them successfully
It's like if you send someone an email with two questions in it; they'll answer the easy one quickly, and ignore the other one
 
I just think we often get bogged down in the credentials of the reporter (say in the reported news) and don't get to hear much of the actual recommendations
 
@JRichardSnape His name is Neo
 
11:31 AM
@RobertGrant True that. Particularly if they are in any form of powerful position
@RobertGrant ♪ and he dances on the sand ♪
I like the ideal of a minimal set of conclusions that must be implemented. e.g. implementing anything with less than (all of this) will leave X system still flawed in some way.
 
Yeah
Maybe it's impossible
And in practice, maybe it's unenforceable
 
wat report?
 
I don't particularly have a problem with the reports themselves, or the way they're structured. I think we're let down by our Fourth Estate (going the way of Fox News) and the British public seem to staunchly reject the idea of holding our politicians to account
Preferring the age old political method of "moaning down at th'pub"
 
Don't make me tell you some more SA stuff
 
Just because something is worse doesn't mean we're good enough ;)
 
11:36 AM
Yes it does :)
 
I also advocate moaning at'pub . I would even do it with you, should the opportunity arise
 
@IntrepidBrit I saw that
 
coughs. I didn't edit anything
 
And I totally agree; that (post-modification) statement is the fundamental difference between here and the UK, I think
 
I agree that our 4th estate is worsening. It was reasonable, I think, but we shouldn't be complacent just because we started high
 
11:38 AM
Thought of the day. What the hell is happening to the Beeb?
 
@JRichardSnape Looking forward to SOpyCon
 
@IntrepidBrit they lost Clarkson and now they have no money
 
@IntrepidBrit dangerously close to the start of a Farage-ian rant
 
Tl;DR: What's occurring then?
 
11:39 AM
@IntrepidBrit me too. although I cannot read SOPyCon without misreading is soapyCon
 
@JRichardSnape I don't like the way your cult of personality names the rant instead of describing it :)
And yeah, same. Soapycon.
 
Indeed. I am flagrantly inconsistent
 
"I'm a man of the people! Watch me wave around this pint glass dangerously.... I'm a bit of a bam and BLOODY IMMIGRANTS! Hm?"
 
Oh, sure. You are.
Not just "flagrantly inconsistent rants are flagrantly inconsistent"
 
hey does anyone here work with Amazon S3? How am I supposed to send images externally from my site: https://s3.amazonaws.com/<bucket>/<url> or MySite.absolute_url(<url>)?
 
11:40 AM
@Ffisegydd Report says: "Oi! We need to sort out the law with respect to digital rights. I don't necessarily condone mass surveillance, but we need to have a better legal and operation structure in place so mass surveillance argument can properly be made."
Imho
 
Anyway, I think I've massively overshot my aim, which was to make a joke
 
@RobertGrant Stupid bloody Clarkson.
 
What I'd like is not-mass surveillance, just normal person-level surveillance
But done with all sorts of fun tools
 
On a mass scale?
 
And it stopping as soon as the person no longer needs to be surveilled, and records being deleted if the person isn't being charged with anything
 
11:44 AM
Sounds reasonable. I also don't like how ISPs are now forced to act as part of the judiciary with no proper oversight/warrants.
 
Of course the problem is: we need person X's records to incriminate person Y, so please don't delete them yet
And it all becomes messy again
 
See, I'm fine with that. As long as there's a paper trail and someone can be held to account for it.
 
That's probably where we are now though, within an order of magnitude
But I guess it's better to have some rules, so we don't move any further in the wrong direction than we are now
 
Yep.
As long as we don't end up with some kind of constitution, then I'm happy
 
11:50 AM
@RobertGrant I have a neighbour who uses a tape measure
I kid you not, I left the house one day to find him in my garden... measuring it
I still do not know why. In typically British fashion, I said nothing, he mumbled something and left.
 
What is the difference between process.platform and os.platform? (several languages)
 
I don't know how that's relevant, but I like it :)
 
fun tools
 
@JRichardSnape Did you apologise to him?
 
11:51 AM
fun? Maybe not. Unusual
 
Oh, sorry I always miss the reply arrow
 
@IntrepidBrit probably. It's so reflexive I wouldn't remember either way
 
guys im confused! is there evaluation speed difference between "dirs=os.listdir("/path"); for dir in dirs: ..." AND "for dir in os.listdir("/path")" ?? because when I changed a pattern of my code to first example my code started to work like... idk... a jet? :D
 
@corvid pass (not ignoring, I just don't know)
 
@PYPL Like a millionth of a second change in speed. You absolutely would not notice it.
 
11:54 AM
@Kevin but it now runs extremmaly faster than before! that makes me confused...
 
Unless you do it a million times!
 
Yet you imply you have noticed it. Are you sure it was this change and only this change you made?
usually in that situation it is because in the function call (e.g. os.listdir()) is expensive in time. With pattern 1 you call only once, in pattern 2 you potentially call many times. Typically though, I thought that was optimised away...
 
Dunno if it's implementation dependent, but 99% sure it's only called once in CPython
 
I wonder if os.listdir() has something special because, potentially, the contents could change under your feet.
@Kevin yeah - I'd have thought that too. I'm going to try it on a directory with thousands of files.
 
Perhaps. But iterating over it in either way could permit changing under one's feet
>>> def noisy():
...     print "GENERATING LIST."
...     return [1,2,3]
...
>>> for x in noisy():
...     print x
...
GENERATING LIST.
1
2
3
Conclusion: the expression of a for loop evaluates only once.
 
11:59 AM
Excellent educational example
 

« first day (1711 days earlier)      last day (3237 days later) »