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
Dirty Frank
Jul 8, 2004

lufty posted:

i'm not quite sure how this fits in?

Its literally the answer to your question.

In your code you have
Python code:
while True:
    RollFunc()
    RollRepeat()
In which you perform two actions forever because True is always true, you want it to stop when the user says something other than yes.

If you change RollRepeat to return True if the user says yes and False if the user says anything else, how could you use that in your loop?

Adbot
ADBOT LOVES YOU

lufty
Jan 26, 2014

Dirty Frank posted:

Its literally the answer to your question.

In your code you have
Python code:
while True:
    RollFunc()
    RollRepeat()
In which you perform two actions forever because True is always true, you want it to stop when the user says something other than yes.

If you change RollRepeat to return True if the user says yes and False if the user says anything else, how could you use that in your loop?

idk this?

Python code:
while True: #completes the loop
    RollFunc()
    RollRepeat()
    return
    true if UserInput.lower() in ("Yes", "yes", "y")
    return
    false if UserInput.lower() in ("No", "no", "n")

Dirty Frank
Jul 8, 2004

Look again at SurgicalOntologist's post,

Python code:
def RollRepeat():
    UserInput = input("Do you want to try again? Type Yes or No.\n")
    return UserInput in ("Yes", "yes", "y")
The last line returns a value, in this case either True or False, which he then uses in the while loop.

If I rewrite the SO's loop as this is it more clear?

Python code:
carryon=True
while carryon:
    RollFunc()
    carryon = RollRepeat()

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

lufty posted:

idk this?

Python code:
while True: #completes the loop
    RollFunc()
    RollRepeat()
    return
    true if UserInput.lower() in ("Yes", "yes", "y")
    return
    false if UserInput.lower() in ("No", "no", "n")

Dirty Frank was trying to get you to assume that RollRepeat() is the function responsible for checking what the user says. In which case you could use it in place of the True in "while True".

code:
while RollRepeat():
    RollFunc()
The code you posted there won't work because you're using return statements at the top level (i.e. not inside a function). return is used to end execution of a function and optionally send a value (the "return value") back as the value of the function call. Additionally, the return keyword can't be used on a different line to the value you want to return. When you write

code:
return
true if (conditions)
That's the same as writing

code:
return None # return without a value is the same thing as "return None"
true if (conditions)
The line starting with true is a separate statement (and it never executes, because the return statement is hit first).

If you have a long return value that you want to split onto two lines then you do have options:

code:
return (
    true if (conditions)
)
code:
return \
    true if (conditions)
Also, true should be True.

lufty
Jan 26, 2014

Hammerite posted:

Dirty Frank was trying to get you to assume that RollRepeat() is the function responsible for checking what the user says. In which case you could use it in place of the True in "while True".

code:
while RollRepeat():
    RollFunc()
The code you posted there won't work because you're using return statements at the top level (i.e. not inside a function). return is used to end execution of a function and optionally send a value (the "return value") back as the value of the function call. Additionally, the return keyword can't be used on a different line to the value you want to return. When you write

code:
return
true if (conditions)
That's the same as writing

code:
return None # return without a value is the same thing as "return None"
true if (conditions)
The line starting with true is a separate statement (and it never executes, because the return statement is hit first).

If you have a long return value that you want to split onto two lines then you do have options:

code:
return (
    true if (conditions)
)
code:
return \
    true if (conditions)
Also, true should be True.

okay I'm just trying to fit this all together in my head

if I gave you the code:
Python code:
#Dice Roller
import random #imports the random feature, allows randomisation of given values

def RollRepeat(): #inserts a loop into the code allowing repeatiblity of the dice roller
    UserInput = input("Do you want to try again? Type Yes or No.\n")
    if UserInput.lower() in ("No", "no", "n"):
        exit(0) #this exits the program

def RollFunc():
    DiceRoll = input("Which sided dice would you like to roll, a 4, 6 or 12 sided dice?\n") #asks the user for their choice of dice

    if DiceRoll in ("4", "four", "Four"):
        FourVar = random.randint (1, 4)
        print("You have rolled a four sided dice, resulting in {}".format(FourVar))

    elif DiceRoll in ("6", "six", "Six"):
        SixVar = random.randint (1, 6)
        print("You have rolled a six sided dice, resulting in {}".format(SixVar))

    elif DiceRoll in ("12", "twelve", "Twelve"):
        TwelveVar = random.randint (1, 12)
        print("You have rolled a twelve sided dice, resulting in {}".format(TwelveVar))

    else:
        print("Not a valid input.")
        RollFunc()

while True: #completes the loop
    RollFunc()
    RollRepeat()
    return
    true if UserInput.lower() in ("Yes", "yes", "y")
    return
    false if UserInput.lower() in ("No", "no", "n")
could you edit it in so I can relate it to what you're saying, I'd appreciate it.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
OK, I notice that the code you posted is different in at least one important respect, which is that you changed the behaviour of RollRepeat() so that it calls exit() if the user types "No". If you go with that, then you actually don't need to change the while loop (although you do need to get rid of the "return" line and everything after it):

code:
while True: #completes the loop
    RollFunc()
    RollRepeat()
Having said that, I think that using exit() in this way is a bad idea, because it makes it harder for someone reading the code (which could include you at a later date) to understand what it does. It is probably better to end Python programs by allowing execution to reach the end of the code. So I think you should change the RollRepeat() function to this:

code:
def RollRepeat(): #inserts a loop into the code allowing repeatiblity of the dice roller
    UserInput = input("Do you want to try again? Type Yes or No.\n")
    if UserInput.lower() in ("No", "no", "n"):
        return False
    else:
        return True
and change the loop (the code that starts with "while True:") to this, like Dirty Frank suggested in his most recent post:

code:
carryon = True
while carryon:
    RollFunc()
    carryon = RollRepeat()
Then test your code, i.e. see whether it does what you expected. If there's anything that isn't clear to you, please ask about it.

lufty
Jan 26, 2014

Hammerite posted:

OK, I notice that the code you posted is different in at least one important respect, which is that you changed the behaviour of RollRepeat() so that it calls exit() if the user types "No". If you go with that, then you actually don't need to change the while loop (although you do need to get rid of the "return" line and everything after it):

code:
while True: #completes the loop
    RollFunc()
    RollRepeat()
Having said that, I think that using exit() in this way is a bad idea, because it makes it harder for someone reading the code (which could include you at a later date) to understand what it does. It is probably better to end Python programs by allowing execution to reach the end of the code. So I think you should change the RollRepeat() function to this:

code:
def RollRepeat(): #inserts a loop into the code allowing repeatiblity of the dice roller
    UserInput = input("Do you want to try again? Type Yes or No.\n")
    if UserInput.lower() in ("No", "no", "n"):
        return False
    else:
        return True
and change the loop (the code that starts with "while True:") to this, like Dirty Frank suggested in his most recent post:

code:
carryon = True
while carryon:
    RollFunc()
    carryon = RollRepeat()
Then test your code, i.e. see whether it does what you expected. If there's anything that isn't clear to you, please ask about it.

okay

now I'm getting a traceback error
Python code:
Traceback (most recent call last):
  File "C:\a\b\c\d\e\f\g.py", line 30, in <module>
    carryon = true
NameError: name 'true' is not defined

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

lufty posted:

okay

now I'm getting a traceback error
Python code:
Traceback (most recent call last):
  File "C:\a\b\c\d\e\f\g.py", line 30, in <module>
    carryon = true
NameError: name 'true' is not defined

It's True, not true.

lufty
Jan 26, 2014

Thermopyle posted:

It's True, not true.

okay, it's working fine now, thanks a lot

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How come these produce different results?

code:
>>> from datetime import datetime
>>> from pytz import timezone
>>> timezone_la = timezone('America/Los_Angeles')
>>> datetime(2014, 4, 2, 23, 30, tzinfo=timezone_la)
datetime.datetime(2014, 4, 2, 23, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>)
>>> timezone_la.localize(datetime(2014, 4, 2, 23, 30))
datetime.datetime(2014, 4, 2, 23, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PDT-1 day, 17:00:00 DST>)

evilentity
Jun 25, 2010

fletcher posted:

How come these produce different results?

code:
>>> from datetime import datetime
>>> from pytz import timezone
>>> timezone_la = timezone('America/Los_Angeles')
>>> datetime(2014, 4, 2, 23, 30, tzinfo=timezone_la)
datetime.datetime(2014, 4, 2, 23, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>)
>>> timezone_la.localize(datetime(2014, 4, 2, 23, 30))
datetime.datetime(2014, 4, 2, 23, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PDT-1 day, 17:00:00 DST>)
Python code:
>>> timezone_la = timezone('America/Los_Angeles')
>>> tz = timezone_la.localize(datetime(2014, 4, 2, 23, 30))
>>> dt = datetime(2014, 4, 2, 23, 30, tzinfo=timezone_la)
>>> timezone_la.dst
<bound method America/Los_Angeles.dst of <DstTzInfo 'America/Los_Angeles' PST-1
day, 16:00:00 STD>>
>>> tz 
datetime.datetime(2014, 4, 2, 23, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PD
T-1 day, 17:00:00 DST>)
>>> dt 
datetime.datetime(2014, 4, 2, 23, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PS
T-1 day, 16:00:00 STD>)
I guess __repr__ of DstTzInfo accounts for daylight savings time?

Looks like it
Python code:
    def __repr__(self):
        if self._dst:
            dst = 'DST'
        else:
            dst = 'STD'
        if self._utcoffset > _notime:
            return '<DstTzInfo %r %s+%s %s>' % (
                    self.zone, self._tzname, self._utcoffset, dst
                )
        else:
            return '<DstTzInfo %r %s%s %s>' % (
                    self.zone, self._tzname, self._utcoffset, dst
                )
source

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Is there a reason (beyond not wanting to have yet more numeric magic methods to define) why there is no __riadd__() (or __iradd__()), etc.?

__add__() is so that you can do self + other
__radd__() is so that you can do other + self (if the class of other doesn't know how to add instances of your class)
__iadd__() is so that you can do self += other
but you can't customise other += self?...

SurgicalOntologist
Jun 17, 2004

Is there a situation where that would make sense? It seems to me like you'd always want to use the radd behavior here. Since other += self is (supposed to be) equivalent to other = other + self, from the perspective of self these are both the same: radd.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

SurgicalOntologist posted:

Is there a situation where that would make sense? It seems to me like you'd always want to use the radd behavior here. Since other += self is (supposed to be) equivalent to other = other + self, from the perspective of self these are both the same: radd.

But surely you can use the same logic to argue that __iadd__ is also not needed.

SurgicalOntologist posted:

Is there a situation where [__iadd__, as it currently exists] would make sense? It seems to me like you'd always want to use the add behavior here. Since self += other is (supposed to be) equivalent to self = self + other, from the perspective of self these are both the same: add.

Now re-reading over that transformed post, I see that I haven't really done it right. Specifically, in the last sentence "from the perspective of self" would need to be "from the perspective of other". I guess then the question might be why is the perspective or role of self key. If we can provide a special method for in-place alteration of self, why not provide a way to alter other in place too?

On another note, it is annoying that it is standard to use "self" for the self parameter in Python. "(self, other)" is clearly not as good as "(this, that)"...

SurgicalOntologist
Jun 17, 2004

I would answer your question and say that one motivation for having __iadd__ in addition to __add__ is to avoid the unnecessary instantiation of a new object. You could make the same argument for __riadd__, of course, but I can't think of an example where you wouldn't be better off putting the behavior in the other class's __iadd__ method. Yes, the same argument could be used against __radd__ but the augmented case requires more knowledge of the object's internals. So I think __riadd__ doesn't make sense because you need to know more about other than is (meant to be) public. I'm just thinking this through though, I'd be curious what someone more experienced thinks.

This got me thinking about a related issue... is there a way to define an attribute of a class, and say "when something tries to use an arithmetic operation on me, use this" or "when someone tries to use the sequence protocol on me, use this".

I guess it could work something like:

Python code:
class NumberedBag:
    def __init__(self, contents=None, number=1):
        self.contents = contents or []
        self.number = number

        for method in ('__iter__', '__next__', '__getitem__', '__setitem__',
                       '__delitem__', '__len__', '__bool__'):
            setattr(self, method, getattr(self.contents, method))

        for method in ('__add__', '__mul__'): # etc.
            setattr(self, method, getattr(self.number, method))
Not sure if that would work but I think you get the idea. Is there syntactic sugar for this currently, or some sort of OO magic that I haven't figured out yet?

SurgicalOntologist fucked around with this message at 23:20 on Apr 7, 2014

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer
It sounds like that sort of behavior extends the addition logic of an object beyond its scope. The more explicit method of subclassing the other object and overriding it's add functionality would reproduce the same results, wouldn't it?

On a side note, I've now deployed our first Python project as a Markdown -> Sharepoint management tool but there is one Windows user in our otherwise Linux/Mac. Has anyone had any experience cross-compiling pip wheels for the Win platform or should I just skip the headache and distribute an exe?

lufty
Jan 26, 2014
Python code:
def RollRepeat(): #inserts a loop into the code allowing repeatiblity of the dice roller
    UserInput = input("Do you want to try again? Type Yes or No.\n")
    if UserInput.lower() in ("No", "no", "n"):
        exit(0) #this exits the program
    elif UserInput.lower() in ("Yes", "yes", "y"): 
        return True
    else:
        print("Not a valid input.")
        return False
carryon = True
while carryon: #completes the loop
    RollFunc()
    carryon = RollRepeat()

invalidcarry = False
while invalidcarry is False:
    invalidcarry = RollRepeat()
what would the correct coding be to ensure a correct error message and return to "Do you want to try again?"

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

lufty posted:

Python code:
def RollRepeat(): #inserts a loop into the code allowing repeatiblity of the dice roller
    UserInput = input("Do you want to try again? Type Yes or No.\n")
    if UserInput.lower() in ("No", "no", "n"):
        exit(0) #this exits the program
    elif UserInput.lower() in ("Yes", "yes", "y"): 
        return True
    else:
        print("Not a valid input.")
        return False
carryon = True
while carryon: #completes the loop
    RollFunc()
    carryon = RollRepeat()

invalidcarry = False
while invalidcarry is False:
    invalidcarry = RollRepeat()
what would the correct coding be to ensure a correct error message and return to "Do you want to try again?"

Assuming I understand what you are asking, this will prompt the user if they want to continue after an error:

Python code:
  1 def roll_func():
  2     print("Buttes!")
  3 
  4 
  5 def roll_repeat():
  6     user_input = raw_input("Do you want to try again? Type Yes or No.\n")
  7     if user_input.lower() in ("no", "n"):
  8         print("Well screw you then!")
  9         exit(0)  # this exits the program
 10     elif user_input.lower() in ("yes", "y"):
 11         return True
 12     else:
 13         print("Not a valid input.")
 14         return roll_repeat()  # <- THIS IS DIFFERENT
 15 
 16 carryon = True
 17 while carryon:  # completes the loop
 18     roll_func()
 19     carryon = roll_repeat()
You simply call the function that asks them if they want to continue again if you didn't understand the input.

Ahz
Jun 17, 2001
PUT MY CART BACK? I'M BETTER THAN THAT AND YOU! WHERE IS MY BUTLER?!
I asked this in Djagno thread, but it should probably go here:

Does anyone know the best go-to library or whatever to generate custom QR codes?

I'm looking to generate and then store the GIF or whatever they create as a binary in postgres.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Ahz posted:

I asked this in Djagno thread, but it should probably go here:

Does anyone know the best go-to library or whatever to generate custom QR codes?

I'm looking to generate and then store the GIF or whatever they create as a binary in postgres.

I used this: https://pypi.python.org/pypi/qrcode with much success in a project. I have no idea if it's the "Best" but it generated QR codes really fast and didn't blow up, and somebody as dumb as me could figure out how to use it.

Dren
Jan 5, 2001

Pillbug
I tried using twitter's pants tool to build a pex file yesterday and couldn't even get the hello world tutorial to work.

It might be python 3 only or something? I dunno.

Sirocco
Jan 27, 2009

HEY DIARY! HA HA HA!
I've been mucking about with tkinter to make a user interface for a small film producer Tycoon like game. I've figured out getting images and buttons to appear on the same window, but I cannot for the life of me make the button appear to the right of the image. I've messed with column, row, columnspan, rowspan, pad, sticky, etc. every which way 'til Sunday and the button just stays above the image. Any pointers?

FoiledAgain
May 6, 2007

Sirocco posted:

I've been mucking about with tkinter to make a user interface for a small film producer Tycoon like game. I've figured out getting images and buttons to appear on the same window, but I cannot for the life of me make the button appear to the right of the image. I've messed with column, row, columnspan, rowspan, pad, sticky, etc. every which way 'til Sunday and the button just stays above the image. Any pointers?

Double-check that the button and image are in the container widgets you expect them to be in. Something along these lines should normally work (with the usual tk importing stuff cut out):

code:
popup = Toplevel(root)
button = Button(popup, text='I\'m a button!')
canvas = Canvas(popup)
canvas.create_image(0,0,image=your_image)
canvas.grid(row=0,column=0)
button.grid(row=0,column=1)
If the Canvas and Button are in different containers, then you have to make sure to grid those containers relative to each other:

code:
popup = Toplevel(root)
button_frame = Frame(popup)
button = Button(button_frame, text='I\'m a button!')
image_frame = Frame(popup)
canvas = Canvas(image_frame)
canvas.create_image(0,0,image=your_image)
canvas.grid()
button.grid()
canvas_frame.grid(row=0,column=0)
button_frame.grid(row=0,column=1)

Sirocco
Jan 27, 2009

HEY DIARY! HA HA HA!
Thanks, I'll have a look into that - the solution I eventually ended up with worked nicely but it's probably gonna break the moment I start adding the other widgets I've still got to include.

BeefofAges
Jun 5, 2004

Cry 'Havoc!', and let slip the cows of war.

Just got home from pycon. Lots of good talks. They're all available online at http://www.pyvideo.org/category/50/pycon-us-2014

Scaevolus
Apr 16, 2007

BeefofAges posted:

Just got home from pycon. Lots of good talks. They're all available online at http://www.pyvideo.org/category/50/pycon-us-2014

Sweet, Fast Python, Slow Python answers some questions I was just wondering about how to write efficient code for PyPy. I'm trying to do Google Code Jam with PyPy, so knowing how to write well-behaved code is helpful.

Drone
Aug 22, 2003

Incredible machine
:smug:


I lost a bunch of my bookmarks recently, and I'm looking for a github repository that someone had linked here ages ago of a bunch of project ideas (of varying degrees of complexity) that someone learning Python could use to give them some more "practical" experience with coding besides doing CodeAcademy prompts. Does anyone remember what I'm talking about and happen to have a link handy, since I'm not seeing it in the OP?

If I remember right, the repository started with a beginner coder keeping track of her little projects, and it gradually snowballed into a place where people could post coding challenges and she'd meet them, and then post examples of her code.

Chosen
Jul 11, 2002
Vibrates when provoked.

Drone posted:

I lost a bunch of my bookmarks recently, and I'm looking for a github repository that someone had linked here ages ago of a bunch of project ideas (of varying degrees of complexity) that someone learning Python could use to give them some more "practical" experience with coding besides doing CodeAcademy prompts. Does anyone remember what I'm talking about and happen to have a link handy, since I'm not seeing it in the OP?

If I remember right, the repository started with a beginner coder keeping track of her little projects, and it gradually snowballed into a place where people could post coding challenges and she'd meet them, and then post examples of her code.

Is it this one? https://github.com/karan/Projects

nonathlon
Jul 9, 2004
And yet, somehow, now it's my fault ...
One for the the swarm mind / "what was that thing where":

About 18 months - 2 years ago, i used a Python reproducibility / literate programming package to write a bunch of webpages. It was fairly simple and lightweight - write a file of text (restructured text?) with chunks of embedded Python within, and process to get the page with the executed results within. It was just the right level of complexity for doing how-tos and webpages. But I can't remember what it was and googling fails me.

It was not:

* knitr (although it _like_ that)
* Jug
* Sumatra
* Ipython notebooks
* IpEdit
* Active Papers
* Dexy
* Bein
* Snakemake

Any ideas?

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

outlier posted:

Any ideas?

Sphinx? http://sphinx-doc.org/

SurgicalOntologist
Jun 17, 2004

Anyone have suggestions for representing events in a pandas DataFrame? I have a DataFrame with a datetime index and I'd like to mark discrete events. Is there a built-in option I can't seem to find or is a separate data structure my best bet (e.g. a dict mapping event types to lists of datetimes). The latter is intuitive enough but it would be nice to pass around just a dataframe rather than a (data, events) tuple.

E: :doh: why didn't I think of making a column for each event type? My first plan was to a make an 'events' column with values of either None or an event type, but I ran into a problem with simultaneous events. I guess I'll just make separate columns. It will be very sparse but it should work.

Sirocco
Jan 27, 2009

HEY DIARY! HA HA HA!
I feel like I must be missing something obvious here, but how do I change the font of a tkinter menubar? I've got all the cascade options in Arial but can't get the option headers off default.

Dren
Jan 5, 2001

Pillbug
I want to parse a pretty simple BNF. Is pyparsing the way to go? I kind of hate that the main documentation source is "buy the oreilly quickstart guide" or slog through a bunch of other people's examples.

nonathlon
Jul 9, 2004
And yet, somehow, now it's my fault ...

Nope. Simple framework - think it processed just a single page.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
I'm making an application that's thin back-end on Django, thick front end client. While ideally most of the time they're going to be hosting it on a proper server instance, they want it to be easily distributable if required.

I would like to find a decent reliable way to package up python, dependencies and code so the server can be run in a one click executable or installer. Its not a big deal if its running on the Django dev server seeing as it would only be used in very light circumstances (1-5 users). Anyone done something similar before and knows some good tools for repeatably bundling it all, ideally I want to set up a largely automated build process for it. Executable size is not a big deal either.

accipter
Sep 12, 2003

Maluco Marinero posted:

I'm making an application that's thin back-end on Django, thick front end client. While ideally most of the time they're going to be hosting it on a proper server instance, they want it to be easily distributable if required.

I would like to find a decent reliable way to package up python, dependencies and code so the server can be run in a one click executable or installer. Its not a big deal if its running on the Django dev server seeing as it would only be used in very light circumstances (1-5 users). Anyone done something similar before and knows some good tools for repeatably bundling it all, ideally I want to set up a largely automated build process for it. Executable size is not a big deal either.

Are you trying to target one or multiple operating systems? Which?

accipter
Sep 12, 2003

outlier posted:

Any ideas?

Pweave?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

accipter posted:

Are you trying to target one or multiple operating systems? Which?

Ah sorry, ideally Windows, Mac and Linux, just recent versions to begin with but if I can get more birds with one stone I'll take it. Mac & Linux less of a priority cause the majority of targets will be Windows.

accipter
Sep 12, 2003

Maluco Marinero posted:

Ah sorry, ideally Windows, Mac and Linux, just recent versions to begin with but if I can get more birds with one stone I'll take it. Mac & Linux less of a priority cause the majority of targets will be Windows.

Would something like cx_freeze work for you? http://cx-freeze.sourceforge.net/

Adbot
ADBOT LOVES YOU

SurgicalOntologist
Jun 17, 2004

https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt

quote:

Variable, module, function, and class names should be written between single back-ticks (`numpy`).

Doesn't it have to be :mod:`numpy`? At first I thought that the line above implied that numpydoc automatically figures out what your references are, but all it's doing for me is italiczing with single back-ticks. Am I missing something? Is there some setup required to avoid having to explicitly use :class:, :mod:, etc?

  • Locked thread