« first day (1530 days earlier)      last day (3433 days later) » 

10:00 PM
Can I use distutils to handle installing my entire application? Not just the Python parts, I mean.
 
Yeah. Well you can with setuptools so I assume you can.
1
Q: I don't understand python MANIFEST.in

NeilReading this: http://guide.python-distribute.org/creation.html it tells me to include doc/txt files and .py files are excluded in MANIFEST.in file Reading this: https://docs.python.org/2/distutils/sourcedist.html#manifest-template It tells me only sdist uses MANIFEST.in and only includes file ...

I think you can use MANIFEST.in for this.
 
@Ffisegydd Is there a way to run a command to, for example, run a SQL script on MySQL to set up the users and tables?
 
@Soviero I dunno mate, that's outside of my league. I'd assume it's possible though.
 
@Ffisegydd Ok, thanks for what you posted
 
Possibly using subprocess or such. Remember you can put Python code in your setup.py.
 
10:07 PM
@Soviero There is a way, indeed (to setup users and tables). I was on a team that used this before. But I can't remember the commands off the top of my head. You should be able to find it with some searching, though
 
We use regex to get the version from the Python package. And open the requirements file as well. So you could put a subprocess command in there to run a MySQL command.
 
@inspectorG4dget Well, I know how to do it with subprocess, i.e., mysql -uroot -pXXXX database < database.sql
 
I don't know if it's possible (but I assume it is) to have some Python code that runs after the install.
 
@Ffisegydd Is this considered acceptable use for distutils, or am i stretching its abilities. For example, how will it handle upgrades in the future?
:20637975 It's not, it's fine. I was saying I know how to do it that way, so that'll work.
 
@Soviero I think it's acceptable, you're setting up your package after all. You don't want to modify too much though, or do anything that a user wouldn't reasonably expect it to do.
 
10:11 PM
ahh. Then I'm done
 
Also remember that the code needs to be runnable without root privileges.
(don't know if that's an issue for what you want)
 
@Ffisegydd I want to do something akin to how Zimbra does it. Where I have a directory in /opt with my own web server, packages, etc. Leaving as few OS level deps as possible. (I know the OS package manager is there for a reason, but enterprises are weird about that.)
@Ffisegydd If the user running it is root, doesn't it run as root?
 
Ah ok, well if it's not a "normal" package then you could have root.
I was just thinking, for a "normal" package (say numpy) you want to be able to install it in a virtualenv (which is typically non-root).
But if what you're doing is more specialist then that's not an issue so much.
 
@Ffisegydd Ya, it's a little specialized. ;)
 
Hmm ... I think probably not, but: dupe?
-2
Q: In Python, why can I multiply a string by a number, but I can't add a string and a number?

user2666425In Python, we can do: 'a' * 4 to get 'aaaa'. We can not do: 'a' + 4 We first have to cast 4 to a string. Is this just an arbitrary choice to overload * with a definition for a String and Int arg, and to not overload + for a String and Int? I'm trying to understand how this fits into Pyt...

7
Q: How can I concatenate str and int objects?

Zero PiraeusIf I try to do the following: things = 5 print("You have " + things + " things.") I get the following error in Python 3.x: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: Can't convert 'int' object to str implicitly ... and a similar error in Python 2.x: ...

 
10:16 PM
@ZeroPiraeus I'm more interested in what the first guy would expect 'a' + 4 to do... 'a4' perhaps?
 
@Zero not really a dupe. It's asking "why can't we do this?"
 
10:53 PM
weird question: anyone see theFourthEye around these parts lately? Haven't talked to him in a while...
 
Yeah he's about a fair bit, usually quiet though.
 
ahh. He's in the same city as I am, at the moment. Was weird not seeing him...
 
You're up at insane times though :p
 
I'm up through the day, too. But I'm only on SO/chat at late o'clock, so I get your point
My schedule:
wake up between 12PM and 2PM; breakfast
Lunch 7-10PM
Dinner 2-4AM

I guess I don't really follow the schedule for any timezone
 

« first day (1530 days earlier)      last day (3433 days later) »