[Tutor] Code runs in interpreter but won't output to stdout

scurvy scott stopitscurvy at gmail.com
Sat Feb 1 16:21:30 CET 2014


Please always reply to the tutor list so we can all play with your question.

--sorry about that Bob, I've now hit reply all.

I am stuck at "import requests". Where did you get that module?

--requests is a third party webscraping module.

I signed up at Dogehouse. What the heck is it? There is no explanation as
to what it does or what I'd do with it!

--dogehouse.org is a dogecoin mining pool that allows users to pool CPU/GPU
resources to make mining cryptocurrency more efficient.


Scurvy Scott: There's nothing really special about printing stuff, so
there's something you're not telling us or that you're not aware of
that's causing your program to behave differently between running it
"in the interpreter" and otherwise (from the command line,
presumably.)  Do you for example have multiple versions of Python
installed?  Are you sure for example you're using the same version of
Python interpreter? (print syntax changed between Python 2.x and 3.x.)
 How are you running it from the command line exactly?

Best regards,

Walter

--I'm only using Python 2.7 and yes either running the code live in the
interpreter, which works just fine, or running from command line using
"python programname.py". In this instance, I've named the program
dogeScrape.py, so python dogeScrape.py . I've been messing with python for
a while and have never had this problem before. I've also tried using the
different print syntax for 3.x just to be sure, to no avail.

I've also tried running the code without it being in functions, and just
running it I guess "straight through" or whatever you'd call it, also to no
avail.
The site is implementing its own API in the next week or so, so I just
figured I'd work out these bugs when that happens and maybe some magical
unicorn will cure whatever is ailing me.

Thanks for y'alls help.
Scott


On Sat, Feb 1, 2014 at 5:05 AM, Walter Prins <wprins at gmail.com> wrote:

> Hi Bob,
>
> On 31 January 2014 21:59, bob gailer <bgailer at gmail.com> wrote:
> > On 1/29/2014 8:59 PM, scurvy scott wrote:
> > I signed up at Dogehouse. What the heck is it? There is no explanation
> as to
> > what it does or what I'd do with it!
>
> I don't know if you're familiar with BitCoin and the concept of the
> "pooled mining", but Dogehouse appears to be a bitcoin mining pool.
> Basically instead of mining for bitcoins directly alone by yourself,
> you pool your mining efforts with a pool of others and then share the
> return with the pool: https://en.bitcoin.it/wiki/Pooled_mining
> https://en.bitcoin.it/wiki/Why_pooled_mining
>
> Also, I'm not entirely sure if you were being facetious with your
> "import requests" comment -- I suspect you were and if so I should not
> be commenting on that ;) (and in thaat case please ignore this entire
> paragraph), but in case not -- it's a third party module for doing web
> interaction that's actually been mentioned a couple of times on this
> list: http://docs.python-requests.org/en/latest/
>
> Scurvy Scott: There's nothing really special about printing stuff, so
> there's something you're not telling us or that you're not aware of
> that's causing your program to behave differently between running it
> "in the interpreter" and otherwise (from the command line,
> presumably.)  Do you for example have multiple versions of Python
> installed?  Are you sure for example you're using the same version of
> Python interpreter? (print syntax changed between Python 2.x and 3.x.)
>  How are you running it from the command line exactly?
>
> Best regards,
>
> Walter
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140201/39ae24cb/attachment-0001.html>


More information about the Tutor mailing list