I read the documents on scope in python and I obviously didn't understand it. I have class abc: Then in that I have def one:\n my_var=False\n def two:\n (inside of def one). How do I reference my_var from inside def two when my_var has a scope local to def one?
adamchainz has quit
orf_ has quit
jessamynsmith has quit
l2pythan joined the channel
schinckel
ctjctj: dpaste your code, it will be easier to reason about.
ctjctj
schinckel, thanks. Google says "nonlocal" is my answer and it was. Python allows you to *reference* a variable outside of the local scope but if you *set* that variable then it becomes local to the inner most scope. Weird but nonlocal fixed it.
schinckel, thanks for offering.
the_rat has quit
fission6 joined the channel
Koterpillar joined the channel
splendor joined the channel
OskrGrme has quit
shangxiao joined the channel
hutch34 has quit
codingonweekend has quit
jcp_ has quit
tsukasa_ has quit
tsukasa__ joined the channel
FreedomFighter joined the channel
mcspud
limbera - have you tried 16.04 yet?
I'm still running on 14 for the same reasons
limbera
only in dev
the most annoying part is that it doesn't come preconfigured with python
so you gotta bake your own AMI
but that's a tiny inconvenience
i'm considering going down the amazon linux route tbh, give ol mate yum a go over apt
Koterpillar
limbera: dnf
dnf > yum
mcspud
You need to bake your own AMI anyway if you are using autoscaling groups
You should be using ASGs!
Koterpillar
as for Python, aren't you getting Python 3?
maryokhin has quit
theparadoxer02 has quit
tsukasa__ has quit
Debnet has quit
whaack joined the channel
eperzhand has quit
Electrom_ joined the channel
tsukasa_ joined the channel
tsukasa__ joined the channel
javawolfpack has quit
ziyangtian has quit
OskrGrme joined the channel
tsukasa_ has quit
zanric joined the channel
OskrGrme has quit
hutch34 joined the channel
eperzhand joined the channel
eperzhand has quit
dardevelin_ joined the channel
splendor joined the channel
ziyangtian joined the channel
milardovich joined the channel
milardovich has quit
sonpython has quit
rgenito
Koterpillar: i figured it out -.-
that whole django admin error, "HEY! you don't have this field!" and i'm like, "...ya i do. in fact, we've had that field for months now........."
DAMN... i know what happened man. i ran "pip install -r requirements.txt", and i bet you ANYTHING that the previous version of django was indeed updated!! @.@
sneaky bastards
Taylor_Umisk joined the channel
lejedi76 has quit
Greench has quit
Taylor_Umisk has quit
ironfroggy joined the channel
FreedomFighter has quit
shangxiao has quit
detseg has quit
zanric has quit
thenames3li_ joined the channel
fission6 has quit
jas02 joined the channel
beastDivision joined the channel
Croves joined the channel
jessamynsmith joined the channel
Croves has quit
jessamynsmith has quit
ziyangtian has quit
OtherAllan has quit
ironfroggy has quit
hutch34 has quit
aavrug joined the channel
splendor joined the channel
archangelic joined the channel
beastDivision has quit
ycon_ joined the channel
hutch34 joined the channel
nurulwai has quit
jeffspeff joined the channel
beastDivision joined the channel
ycon_
Hi all, I'm trying do to a simple filter by URL for an API end point
I basically want to write xyz.com/tag/?level=40 to only see items that have the value 40
beastDivision has quit
l2pythan
hey
um
i'm trying to use postgres as my db for django and i'm getting an "image not found" error related to psycopg2
however i've done a couple things like set my DYLD_LIBRARY_PATH to the openssl 1.0.0 bin and i can import psycopg2, however i get that error above when i try to use ./manage.py migrate
o_O
venv/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: libssl.1.0.0.dylib
jas02 joined the channel
jeffspeff
anyone familiar with pycharm? i'm setting up a mysql database for django to use on my server and coding pycharm locally on my workstation. in the settings.py file i can put the information for my db, but the server only accepts connections from localhost. is there a way in pycharm to point those db requests to the remote server via ssh? thanks
l2pythan
what do you mean it only accepts connections from localhost?
change HOST to a diff ip?
rather than local host?
o_O
shangxiao joined the channel
jeffspeff
I connect to that network via vpn and get a different IP each time. I don't want to expose the mysql db to the entire vpn network used by everyone