Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
duck monster
Dec 15, 2004

Help me i'm trapped in a php hole and i cant get out.

:(

Adbot
ADBOT LOVES YOU

duck monster
Dec 15, 2004

Sab669 posted:

So a buddy of mine is going back to college to get a BS in Comp Sci in a few months, and I have a really dumb question. He decided to start with the MIT lecture last night and I guess it starts off having him use Python. I don't know the first thing about Python or the Python Shell application it was having him use (Or any scripting language for that matter, I'm a newbie C# guy). He was having a problem trying to "understand" how he would actually use this in the real world. By that I mean, if he saved a file and ran it, a command window would pop up and immediately disappear, even though the script requests user input.

I also think part of it for him is he expects to be creating full blown desktop applications, but you need to learn to walk before you can run. Most day-to-day users would poop themselves if they had to deal with the command line in any way.

He was just texting me about it this morning as I was getting ready for work, so I didn't have a chance to sit down and try to learn anything, though I figured while he's taking this course I probably should too :)

http://kivy.org/

Its got a few rough edges in terms of the fact its a young project and evolving fast, but its very actively maintained and actually achieves cross platform (including ios(!) and android) really well.

And the apps look pretty nice if you like black things.

duck monster
Dec 15, 2004

Nybble posted:

Just a end-of-day frustration I just found in our code:

code:
sql = '''
   SELECT %s FROM table_number_%s 
   WHERE agency_id = %%s
''' % column, number

result = self._query(sql, (agency_id))
Resulting SQL:
code:
 SELECT vehicle FROM table_number_4 WHERE agency_id=16 
Yes. That's two string substitutions in a row, with no other instructions inbetween. The Double Percentage (%%) which is commonly used to do a literal '%' is in place so it can be substituted later.

:smithicide:

This is tame. Some of the PHP I've been forced to maintain stuff, has had these sorts of substitutions, pulled directly from the command line using register globals and no cleansing. Its.... terrifying, and worst of all, the boss doesn't understand why its bad and is incredibly resistant to me refactoring it ("Every time you code, the files actually get shorter, thats not productive!")

duck monster
Dec 15, 2004

MeramJert posted:

Is this a real quote because :laffo:

It's not the first time it's happened to me either. An older job had me dragged before management to explain why I had "negative sloc".

Overly complicated and hard to understand code is almost always poorly conceived code.

duck monster
Dec 15, 2004

Thermopyle posted:

What did you tell them, and did they accept what you had to say?

Pretty much that SLOC is an idiot measurement for retards and that if they want me to stop refactoring and improving code, then tell me so and I'll quit and go work for some place NOT doomed by stupidity.

I kept the job, but later they folded.

duck monster
Dec 15, 2004

evensevenone posted:

It probably also has to do with the backends. It's ok to have a super fast nosql database that isn't 100% consistent and sometimes loses data when it's Facebook, less so when it's government records.

That and they can't really hire rock star engineers and use bleeding edge technologies.

Complexity in the name of security is fine. Validation and general sanity making can be complex. Complexity arising out of makework, pattern madness, incompetence, obsfucation or bad design, not so much.

For what its worth my first coder job was doing Cobol poo poo in the early 90s. Some of those codebases had literally millions of lines of turgid horrible code. And it was *never* complex, because honestly its such a loving primative language you just avoid complexity at all costs because Cobol isn't any good at it. In a way thats also sort of the appeal, its a very workman like simplistic but verobose language that rewards simple readability over terse cleverness. But its also RSI inducing and you become sad that all that cool poo poo like OO/functional/etc you learned at school is completely out of place in that world. Its like prostitution, you can get rich off cobol (Theres a LOT of it still out there that needs maintaining, but all the cobol greybeards either moved on to make java terrible or retired/died of old age.) but you'll hate your life doing so.

edit: lol I just noticed a COBOL job on seek offering $58 an hour. Theres about $100/h missing off that number there buddy, cos gently caress doing that for jr coder wages. The job will still be open in a year, my prediction.

duck monster fucked around with this message at 23:50 on Jun 9, 2013

duck monster
Dec 15, 2004

yellowjournalism posted:

I actually hate teaching Python and transition to Java as soon as possible (for a variety of reasons). As you said, Python feels more like a really convenient language for prototyping, getting quick little things done, and whatever web/scripting/etc stuff that I don't know about but am aware is quite useful for others.

Half the time Python honestly builds in a lot of arbitrary and confusing training scars for kids that can be annoying to deal with when they learn the more popular industry languages.

:bravo:

Have you actually worked outside of high school education before? We actually blacklist people infected with java madness where I work. The 9 level deep pattern factory singleton visitor blah blah sort of crap encouraged in Java is completely incompatible with the agile techniques the industry is moving in. Hell its not even that compatible with where computer science is heading anymore (protip: Shits getting functional).

If your trying to teach kids to be good Bank programmers who 30 years ago would be slitting their wrists to millions of lines of turgid cobol and now are slitting their wrists to hundreds of thousands of lines of turgid java, then sure thing.

But if your actually trying to teach kids to have a love of computer science, why the gently caress would you be moving from python TO java?

duck monster fucked around with this message at 12:33 on Jul 12, 2013

duck monster
Dec 15, 2004

QuarkJets posted:

I would like to create a GUI with PyQt that displays a 2D numpy array. Is this relatively straightforward? Is it better to convert the image to a QPixMap or a QImage? Or is it better to try to embed matplotlib into my PyQt GUI? I'm creating a slider so that the displayed image can be switched rapidly, so I was imagining that refreshing matplotlib over and over might be suboptimal, but maybe not?

I'm still fond of Kivy for doing GUIs. Its all bleeding edge stuff, but its cross plaform as hell, and very pretty.

Personally I'd be trying to prerender those images as much as possible,, and just load up a background buffer with the next (and previous if the slider goes both ways) images so you can just blit them across.

edit: If these datasets are really big, you might even want to consider setting up your bitmaps using something like cython with static typing which can win you some pretty huge speed-ups if done right.

duck monster
Dec 15, 2004

Lumpy posted:

With Apple introducing it's own 2d game framework for iOS, cocos2d for iOS is all but dead. I know they had a big push to make javascript it's primary focus, so maybe that will keep it around, and the tutorials may all start switching to JS... :iiam:

That I doubt. Cocos2d for ios has the lionshare of the market, is conceptually multiplatform via cocos2s-x and its html5 spin-off and has zynga as the 700lb gorilla backing it.

Apple could make a big impact by bringing scene kit across to the ipad which would pull the rug out from cocos2d feet by delivering proper 3d, (There is cocos3d but its a bit of a mess and doesnt support shaders making it pretty ancient and lovely), but at the moment gamekit is the minority platform for the iphone right now. Its not widely used, hasn't the tooling cocos2d has, nor is it as capable. Or as easy actually.

Cocos2d python is very nice by the way.

duck monster fucked around with this message at 19:39 on Jul 29, 2013

duck monster
Dec 15, 2004

Suspicious Dish posted:

I actually recommend you check out JS. For all you may have heard otherwise, it's actually fairly Python-like and I often feel like I'm writing Python in JavaScript.

That said, I tend to use Mozilla JS in most of my projects which gives me fun stuff like destructuring assignment, let, and list comprehensions / generator expressions:

JavaScript code:
let foo = ["a", {"b": "c"}, "d"];
let [a, {"b": c}, d] = foo;

let bar = [x*2 for (x of [1,2,3,4,5])];
for (let a of bar)
    print(a);

Yeah and then it goes and does something stupid like telling you that 2 + 2 = 22 requiring one to bounce a chair off a wall in a fit of rage. Its a pale immitation at best, albeit one with some neat chops for closures and prototype OO

duck monster
Dec 15, 2004

Thermopyle posted:

Or just do it the way the whole Python community does.

I'd argue that
code:
if x not in ['', None]:
is technically more correct then measuring the length of something that might not exist.

If len(None) = 0 , thats a convenience but its not necessarily coherent (It SHOULD raise an exception).

duck monster
Dec 15, 2004

Presenting......... The worlds most ill-concieved web framework, Appy!

http://appyframework.org/principles.html

quote:


appy.gen works at a higher level of abstraction than most other frameworks or approaches. With gen, you are not going to write a function that returns dynamic HTML when some URL is hit. You are going to define classes and relationships, and methods will be like hooks that will react when some events occur (an object is created, edited, deleted, etc). You don't have to write a single line of HTML, CSS or Javascript to write basic Appy applications. Only pure Python. This is what I call conceptual. But unlike most conceptual approaches, you will not draw any diagram or anything that is not Python code. Pure Python, pure simplicity, no repetition, no transformation: optimal efficiency, optimal maintainability. Other conceptual approaches like the idea of starting from some abstract vision like a (graphical) model (boxes, arrows...); from it, tools generate code skeletons that need to be completed in a subsequent "development" phase. Such "transformational" approaches may even count more than two phases and manipulate different models at different abstraction levels before producing code (this is what I have learned at the university). Such approaches spread the information in several places, because every model or representation has limited expressivity. In my opinion, it produces redundancy and eventually leads to maintenance problems. It violates the DRY principle, which is closely related to our Null-IT principle (see above) On the contrary, gen knows only about code. The "model" you write is a Python package. Being written in a high-level programming language, it does not constrain your expressivity in any way. More important: this code is the running code, and thus the only place where you describe your software. Simply, "wrappers" are added to it in order to plug him into the low-level Zope machinery. A gen-powered Python program acts like a comedian manipulating a tuned marionette: simple moves from the comedian produce complex, cascading and funny behaviours at the puppet level.

quote:


Design patterns are elegant low-level constructs used to overcome the limitations of programming languages (ie statically-typed languages like Java) or frameworks. Using them implies adding classes just for making the plumbery work; it augments code complexity and, again, spreads information at several places. Separating code describing data from code presenting it produces the same problem. appy.gen takes the approach of grouping everything at the same place. For example, information that dictates how a given field will be displayed is part of the field definition.

All-in-one objects.

:downsbravo:

duck monster
Dec 15, 2004

Just won an old client back, and some old django I worked on about a year has been returned to me for updates, well, in updated form.

The coder they hired was a very special person.

code:
    supplierName_one = models.CharField(
        max_length=30, null=True, blank=True
    )
    supplierPrice_one = models.DecimalField(
        max_digits=11, decimal_places=2, default=0,     
    )
    supplierName_two = models.CharField(
        max_length=30, null=True, blank=True
    )
    supplierPrice_two = models.DecimalField(
        max_digits=11, decimal_places=2, default=0,     
    )
    supplierName_three = models.CharField(
        max_length=30, null=True, blank=True
    )
    supplierPrice_three = models.DecimalField(
        max_digits=11, decimal_places=2, default=0,     
    )
    supplierName_four = models.CharField(
        max_length=30, null=True, blank=True
    )
    supplierPrice_four = models.DecimalField(
        max_digits=11, decimal_places=2, default=0,     
    )
    supplierName_five = models.CharField(
        max_length=30, null=True, blank=True
    )
    supplierPrice_five = models.DecimalField(
        max_digits=11, decimal_places=2, default=0,     
    )
    supplierName_six = models.CharField(
        max_length=30, null=True, blank=True
    )
    supplierPrice_six = models.DecimalField(
        max_digits=11, decimal_places=2, default=0,     
    )
    supplierName_seven = models.CharField(
        max_length=30, null=True, blank=True
    )
    supplierPrice_seven = models.DecimalField(
        max_digits=11, decimal_places=2, default=0,     
    )

...... and so on up to 20
This was latched , along with an incredible amount of other unrelated poo poo on the *User profile* model.

One problem the client has is that when someone else logs on the supplier data isn't there.

And there is so much more of this sort of horseshit. He pulled out all the nato-standard django auth I used and made his own homebaked one that stores all the user data (username/non hashed password/email/etc in profile because "cant find User model" (according to the #comment). And on it goes.

:fuckoff:

I informed the client I'm rolling that poo poo back 6 months and spending the week rewriting it and creating migration scripts to renormalize, resane-ify, and generally unfuck the whole thing.

Its like having my beloved child return after a year on the run and she's now a meth-head pregnant to corrupt cop and a rampant STD infection. Just horrible.

duck monster
Dec 15, 2004

Is there a way to stop OSX from nuking my god drat python setup every time it patches the loving operating system. I swear to god I'm going to bust a nut if I have to rebuild my setup one more loving time.

edit: Oh ok, just reinstalled command line tools and its all good again. gently caress knows what was going on then?

duck monster fucked around with this message at 16:25 on Jan 2, 2014

duck monster
Dec 15, 2004

Dominoes posted:

I don't think this means what you think it means.

Point taken lol

duck monster
Dec 15, 2004

"Hi after spending nearly $30K on a 3 month long intranet development project written in Django, we cant afford to spend $70 a month on a decent server system and IT has deemed you have to use this lovely shonkyhost PHP3 cpanel account. What do you mean its not compatible? Our IT guy says it even supports squirrelmail so its plenty advanced, sorry its been decided".

"Well it was in the loving spec document, and without it this can't be deployed, but you'll still be required to pay your loving bill. You cunts."

I loving hate this industry with the fire of 1000 suns.

edit: "And no you can't upload the ipad client that will be used by only 30 people all in your staff to the app store! Yes you can't refund the dev account, no I won't change my mind its not up to me"

duck monster fucked around with this message at 08:12 on Jan 9, 2014

duck monster
Dec 15, 2004

John DiFool posted:

Yes, hi mr. duck monster what is your question sir? You must please with asking the question.

I'm just venting dude. Feel the hateflames with me. Clients are hell.

duck monster
Dec 15, 2004

Lumpy posted:

Someday we will be able to harness Duck Monster's impotent rage into a source of energy for the entire planet.

Stay in this god forsaken industry long enough and you too will lie at wake imagining various ways to murder rich people using their neckties.

duck monster
Dec 15, 2004

Having Apple bludgeoning my Python module directories to death (and homebrew repos.. seriously wtf apple?) everytime I upgrade my os is getting pretty loving old.

:sigh:

duck monster
Dec 15, 2004

pmchem posted:

dear bigreddot please include pylint by default in anaconda installers, I have to fill out paperwork that gets signed by several people each time I want a tiny little change in my software

I'm so glad I'm not working govt science anymore. This was literally the bane of my existence. I managed to cause an interdepartmental shitfight that lead to a senior bureacrat resigning in protest after I committed an urgent code change live to fix an error in wind speed calculation without going through UAT and all the blah blah committees and change request and bulshit ITIL juggling since loving firefighters where in danger by the calculation being wrong, but when your a bureacrat having your triplicate filled CRF go through the proper channels and get stamped by middle managers in all 7 circles of hell is more important than not having dead firemen. gently caress that poo poo!

duck monster
Dec 15, 2004

Liam Emsa posted:

So all of my experience in Python is in data analysis, numerical analysis, mathematical computation, etc. It isn't proving good for landing Python development jobs. Where would be a good place to start learning that side of Python?

I dunno. Where I worked last (In australia) they where always on the hunt for people who could understand what the loving physicists where trying to do and make it into proper code.

That said the government went cutback crazy and dumped our whole department, because science is for nerds and not conservatives apparently.

duck monster
Dec 15, 2004

Brotato Broth posted:

All I could find that remotely matched the filename was libaa.a and symlinking to that doesn't seem to cut it. Am I not supposed to use Homebrew to install aalib or something?

libaa.a is no a .so file, but it can be linked into one. Uh, my C chops are probably not good enough enough to tell you what to link it to though.

You could try something like gcc -shared -o aalib.so -laalib.a but I'm not sure how well that will work if its not positition independent code. -fPIC or something like that I guess? There might also be some mac specific things needed I dunno

edit: Beaten to it. ^^^^ That version looks more plausible than mine.

duck monster
Dec 15, 2004

The pyserial library has some really good examples along the lines your pursuing (Including select based)

duck monster
Dec 15, 2004

Honestly, even if its just to keep a list around of how you set up your build, requirements.txt is a bloody useful thing to do. I've totally wrecked builds before and being able to reanimate the corpse with requirements.txt is valuable.

Hell I put it on a precommit hook, just to be sure.

duck monster
Dec 15, 2004

I've honestly never had that problem, though I tend to stick to known and trusted libraries. Where an upstream goes *missing* pip will scream about it. (Protip: Make backups of ~/.virtualenvs , its *really* useful when upstream throws a giant poo poo and disapears the repository)

duck monster
Dec 15, 2004

Just found an old game I wrote in about 2006-2007 and it has super calls like this:
code:
class Thingo(sprite):
    def __init__(self,parameter):
           <some stuff>
           sprite.__init__(self,parameter)
Which still works. From memory it might have been the old way of calling super methods?

Any idea why its not done that way anymore? It strikes me as a less boilercode-ish way of calling super.

duck monster
Dec 15, 2004

I tend to use map, reduce and filter quite a bit, but honestly it has a tendency to make the code harder to explain other than "this is the effect, but how it works might take some time".

Be careful with it, good python is about being able to just glance at the code and see how it works. That is not always the case with some of the functional primitives in python.

duck monster
Dec 15, 2004

Or invert the problem

tech['jim'] = ('WA','CA','TX <etc>)
tech['bill'] = ('AK','AZ',<etc>)

Then just iiterate over the techs looking for the state.
code:
for guy,states in tech.items():
     if state in states:
          email('guy')

duck monster fucked around with this message at 00:05 on Mar 21, 2015

duck monster
Dec 15, 2004

Karthe posted:

I have to be honest, I was out of the web dev game for so long that I'm scrambling to get back to up to speed for work. At the moment I've got enough on my plate learning AngularJS as well as Single-Page-App architecture and all the craziness that entails (the last time I did any web app development it was still cool to render stuff on the server). I'm just looking for something I can bang on and get an API up and running, so I think I'll roll with Flask and Flask-JWT for right now and look into Django-Rest-Framework later on down the road.

That said, what exactly does a web-facing Python host look like? As in, I'm familiar with the LAMP stack but I'm still not sure how Python and Apache work together to enable me to execute Python like I would PHP. I know that Python's WSGI functionality has something to do with it, and that there's such a thing as a webserver with WSGI support. I just don't know how to build a server that'll play API host with a Python backend. Is Apache still needed if frameworks like Flask can handle HTTP connections? Do I just to expose a port and run Flask on that port? :confused:

Its *still* cool to render on the server. The whole serve-a-blob-of-js style of web development is hopelessly misguided in my opinion. Sure google parses javascript these days, but its not that bright about it, and its still going to favor HTML5 over "poo poo all over the browser with javascript".

And yeah AngularJS is insufferable. Check out Ractive, hook it up with JQuery, and it'll do 90% of what you'll want out of Angular, with a half-day learning curve instead of a few weeks of tearing your hair out fighting with Angulars bizzare and opaque ways.

If I never have to develop an "enterprise" Angular app again, I'll be a very happy man.

edit: :goonsay:

duck monster
Dec 15, 2004

Dominoes posted:

Have you considered Regex?

http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags

This should tell you everything you need to know about constructing regex html consumers. tl;dr ALL IS LOST the pony he comes.

Seconding beautifulsoup. Selenium can be handy for some things (Like trying to parse the insane mess facebook shits into your browser) but its brittle as hell, and frankly not as flexible.

At my old job we spidered about 500 different travel agents on a small cluster running stackless python greenlets (This was back in the mid 2000s) and beautifulsoup. Writing scrapers is never fun, writing LOTS of scrapers especially so. But bs takes the pain out of a lot of it.

duck monster fucked around with this message at 14:27 on Apr 7, 2015

duck monster
Dec 15, 2004

SurgicalOntologist posted:

And I honestly think that parsing web pages in a functional style using a pipe makes a lot of sense. For the record. And a functional style is the claimed goal of soupy but I'll take pipe over chained method calls, personally.

That might be so, but its *completely* unidiomatic python, and harms readability immensely.

The thing with python is, if theres a clever way to do something, and an obvious way to do something, you go with the obvious way. Thats the python way.

duck monster
Dec 15, 2004

Suspicious Dish posted:

Please don't use pickle in user-facing code! pickle is absolutely insecure and I can hose your computer with it. It uses a bunch of hacks so if you use it with too complex of a Python object, it can fall down and break.

Basically, a pickle object is only valid if you're running the *exact* same code that created the pickle. If you change a class, or even move it around, pickle will fail to load.

Fun fact: Eve Online either does or did use pickle in its network code. Don't ask me how I know or I'll be forced to eat this cyanide tablet! Its pretty much public knowledge

duck monster
Dec 15, 2004

Its spectacularly stupid, and in the case of Eve Online, I believe it was behind various code injection attacks (and the eventual bannings that ensued)

duck monster
Dec 15, 2004

an skeleton posted:

Hi! I'm a novice (primarily web) developer/student with experience in javascript (and html/css)/php development at an internship. I want to learn a different backend language that isn't nodejs (too new) or php (too lovely). Is Python a good choice? I'm going to be working on mobile stuff at my next job so it might be more important to start learning java. Kind of interested in whatever random bits of input y'all might have. Thanks!

Yes yes and yes. Even though I primarily program mobile, *all* my back-end work uses django and django-rest-framework. Its the ultimate glue language, imho.

You can learn Java as well I guess, but ehhhhhh.........

duck monster
Dec 15, 2004

pip install ipdb


Then wherever you want a break point;-

import ipdb; ipdb.set_trace()

I prefer ipdb, as it uses iPython which has nice color coding and tab completion and stuff, assuming your using a platform that supports readline

duck monster
Dec 15, 2004

Spaseman posted:

A class is the constructor or blueprint that is used to create instances that can be edited but the constructor itself is not actually changed in any way, correct?

Not quite but close

Think of it as the difference between a concept and an object. The class *defines* something. The object is an *instance* of it.

Dog is a class. Fido is an object of type Dog.

A constructor is specifically code that runs when the an instance of the class is made. Its a function that sets the new object up. Conversely a destructor pulls it down, but we dont really use destructors in python typically.

duck monster
Dec 15, 2004

Hed posted:

Python 3.5 is out go get some! :toot:

I haven't hosed with async io but I'm looking forward too the new unpacking generalizations

I still havent evolved from 2.7 yet. I probably should update my thinking. async seems to be the selling point to my line of thinking.

As to why? Lotta legacy, and I've been hacking on python since the late 90s and old dogs/new tricks/etc

duck monster
Dec 15, 2004

Reposting this here because it might be of interest to those who also believe Python is the language of the master race, and javascript on mobile devices needs to die:

code:
********* Start testing of TestPyOtherSide *********
Config: Using QtTest library 5.5.1, Qt 5.5.1 (i386-little_endian-ilp32 static debug build; by Clang 6.0 (clang-600.0.56) (Apple))
PASS   : TestPyOtherSide::initTestCase()
PASS   : TestPyOtherSide::testEvaluate()
PASS   : TestPyOtherSide::testQVariantConverter()
PASS   : TestPyOtherSide::testPyObjectConverter()
PASS   : TestPyOtherSide::testPyObjectRefRoundTrip()
PASS   : TestPyOtherSide::testPyObjectRefAssignment()
PASS   : TestPyOtherSide::testQObjectRef()
PASS   : TestPyOtherSide::testConvertToPythonAndBack()
PASS   : TestPyOtherSide::testSetToList()
PASS   : TestPyOtherSide::cleanupTestCase()
Totals: 10 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestPyOtherSide *********
I'm in the process of testing something very very awesome. Theres about to be a new sheriff in town for dynamic languages and cross platform mobile dev...

I'll let you all know more when I finish, but my gently caress javascript quest is heading towards glory right now.

edit: BAM
code:
********* Start testing of TestPyOtherSide *********
Config: Using QtTest library 5.5.1, Qt 5.5.1 (arm64-little_endian-lp64 static debug build; by Clang 6.0 (clang-600.0.56) (Apple))
PASS   : TestPyOtherSide::initTestCase()
PASS   : TestPyOtherSide::testEvaluate()
PASS   : TestPyOtherSide::testQVariantConverter()
PASS   : TestPyOtherSide::testPyObjectConverter()
PASS   : TestPyOtherSide::testPyObjectRefRoundTrip()
PASS   : TestPyOtherSide::testPyObjectRefAssignment()
PASS   : TestPyOtherSide::testQObjectRef()
PASS   : TestPyOtherSide::testConvertToPythonAndBack()
PASS   : TestPyOtherSide::testSetToList()
PASS   : TestPyOtherSide::cleanupTestCase()
Totals: 10 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestPyOtherSide *********
On the simulator it was using the macs system PYTHONPATH. So I threw in a zip of the standard python library into the test suite and passed a PYTHONPATH environment variable in, and it worked. Well, sort of worked.

Remaining tasks:
1) Scour the zip etc for dylibs or .so files to make sure I'm not being apple violating.,
2) If there are any, modify my build chain to statically link them, or if they look apple violating , remove them all together.
3) Integrate this all into QT Designers tool chain.
4) Party. Hard.

None of this is made easier by the fact that QT's brand of C++ is completely perplexing, but I'm getting there.

duck monster fucked around with this message at 13:43 on Nov 25, 2015

duck monster
Dec 15, 2004

Its basically importing pyotherside which is a QT binding to python that works with QT5 , and hence works on mobile devices, and isnt PyQt (GPL or $$$$$). The basic difference is, PyQt hosts QT in a python program, pyotherside hosts python in a QML program. There where Android ports and a port to "SailfishOS", whatever that is. But no IOS

So I've been hacking away trying to get it to work on the iphone. I'm basically at the "Hello world" stage of it passing unit tests. Now its just a case of getting it to work with QT Designer projects.

Because gently caress javascript. This is a project fueled by hate. (I've spent the last month staring into the abyss of Angular.JS gently caress.that.poo poo its time for python on the telephone)

duck monster fucked around with this message at 14:58 on Nov 25, 2015

Adbot
ADBOT LOVES YOU

duck monster
Dec 15, 2004

Munkeymon posted:

Could this also be made to run on Android with NDK? You could have a neat cross-platform kit if you got that figured out, but just getting it working on iOS would be plenty cool all on its own.

I believe it already runs on Android.

  • Locked thread