Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: how do you use stupid ffmpeg
Post: how do you use stupid ffmpeg

I copied the very first example line basically from https://trac.ffmpeg.org/wiki/Slideshow It prints 'doin shit' and 'done' with no errors, but I don't see any stupid mp4 in my c:\python27\mypy folder...
ineedastupidusername General Coding Help 0 4,342 Nov-10-2017, 05:38 AM
    Thread: Appropriately delay this PyGame code
Post: RE: Appropriately delay this PyGame code

I can't copy paste that without pasting all the left column numbers too. plus it doesn't look like the full program, so the gist should be this: you can draw whatever you want to the screen, but the u...
ineedastupidusername Game Development 2 4,406 Nov-09-2017, 02:15 AM
    Thread: Returning a Boolean operator and a variable both?
Post: RE: Returning a Boolean operator and a variable bo...

def myfunc(): return False,17 a=myfunc() print a[0] print a[1]
ineedastupidusername General Coding Help 2 2,919 Nov-08-2017, 08:18 PM
    Thread: What is wrong with code? Bin. Tree counting
Post: RE: What is wrong with code? Bin. Tree counting

def delete_node(self,node): that line has indented definitions underneath it? I never have a use for nested definitions anyway if it's even python-legal. Looks like if that def is blank, it should ha...
ineedastupidusername General Coding Help 3 3,456 Nov-08-2017, 06:16 AM
    Thread: Problem with "while and a string of characters
Post: RE: Problem with "while and a string of characters

I hardly looked at it and already strongly suspect it's this annoying "list parameters are references to external list not unique copies, so editing a list in a function will edit the external list as...
ineedastupidusername General Coding Help 4 3,515 Nov-08-2017, 06:08 AM
    Thread: get positive number from a list if there's the same number but negative
Post: RE: get positive number from a list if there's the...

**my** code loops through list once and seems to handle all cases (just returns [0] if there's a zero in there etc): a=[-16,4,16,7,-4] def getzeroclosest(a): negmax=None posmin=None for n ...
ineedastupidusername General Coding Help 14 7,524 Nov-08-2017, 05:59 AM
    Thread: Replace slice in list comperhensions
Post: RE: Replace slice in list comperhensions

This might be a little faster (''.join() is faster than + for strings I think): newlist=[''.join((b[0:-2],'2',b[-1])) for b in numbers if b[-2]=='1'] Strings are immutable, so you can convert to list(...
ineedastupidusername General Coding Help 2 3,300 Nov-06-2017, 03:29 AM
    Thread: Denary to Binary game
Post: RE: Denary to Binary game

In python 2.7 I was able to use both, but this is the behavior I got: rawinp= raw_input("type 00011011\n") inp=input("type 00011011\n") print 'raw_input keeps starting 0s', str(rawinp) #outputs 000110...
ineedastupidusername General Coding Help 7 5,690 Nov-06-2017, 12:56 AM
    Thread: Denary to Binary game
Post: RE: Denary to Binary game

lol, apparently input(00011011) with a leading zero makes it think it is in octal base. So... I guess you're supposed to use raw_input() instead of input(). Don't ask me, I just search engined that an...
ineedastupidusername General Coding Help 7 5,690 Nov-05-2017, 08:12 PM
    Thread: installing any package= impossible headache
Post: RE: installing any package= impossible headache

Quote:Simply trying to copy and paste a bunch of files into a directory would create a nightmare situation, the likes of which the world has never seen. Even if each package is organized in its own f...
ineedastupidusername Data Science 23 16,171 Nov-05-2017, 06:08 PM
    Thread: Denary to Binary game
Post: RE: Denary to Binary game

after line 46 type this (I often put "hi" or something dumb so the location of that test print is obvious) print 'hi', isinstance(answer,basestring),isinstance(binary,basestring) So the problem was an...
ineedastupidusername General Coding Help 7 5,690 Nov-05-2017, 04:58 PM
    Thread: installing any package= impossible headache
Post: RE: installing any package= impossible headache

That anaconda looks much easier, especially since it starts w/ 100 packages so you have less to manually install. Maybe I can use that whenever I get another computer with linux, since doing all this ...
ineedastupidusername Data Science 23 16,171 Nov-05-2017, 02:16 PM
    Thread: installing any package= impossible headache
Post: RE: installing any package= impossible headache

That worked! It never ends though so immediately there was another error: Traceback (most recent call last): File "C:\myPy\00shit.py", line 6, in <module> from moviepy.video.tools.segmenti...
ineedastupidusername Data Science 23 16,171 Nov-04-2017, 06:25 PM
    Thread: installing any package= impossible headache
Post: RE: installing any package= impossible headache

Quote:What is the exact error you get? It would be better if we can see what your input/output of the command prompt is when you get such issues. By the way you dont need sudo. sudo is for (admin) pri...
ineedastupidusername Data Science 23 16,171 Nov-04-2017, 03:23 AM
    Thread: Python written in Python, written in Python (warning: somewhat heavy image included)
Post: RE: Python written in Python, written in Python (w...

That's cool and inspired me to do the same basic thing in pygame (python 2.7). The next step would be to make a second "animation" that is really just flat and stationary, then "blend" both animations...
ineedastupidusername Bar 3 3,663 Nov-03-2017, 06:10 PM
    Thread: installing any package= impossible headache
Post: RE: installing any package= impossible headache

I have like 100 small pygame programs I made in 2.7. Do I have to uninstall 2.7 and install 3.6, thus having to slightly fix all those programs whenever I run them again to make them run on 3.6? Or ju...
ineedastupidusername Data Science 23 16,171 Nov-03-2017, 01:17 AM
    Thread: installing any package= impossible headache
Post: RE: installing any package= impossible headache

OMG, I think I did it, thanks! First I tried: c:\python27\scripts>python -m pip install -U pip setuptools (i think that u has to be capitalized by the way) "python is not recognized as an internal ...
ineedastupidusername Data Science 23 16,171 Nov-02-2017, 05:17 PM
    Thread: deleting certain rows from multidimensional list
Post: RE: deleting certain rows from multidimensional li...

This might help (delete row or column if total is less than given amount): import random #populate 2d grid 10tall 15wide with random numbers 0-9 grid=[] for y in range(10): row=[] for x in ra...
ineedastupidusername General Coding Help 4 14,378 Nov-02-2017, 04:09 PM
    Thread: installing any package= impossible headache
Post: RE: installing any package= impossible headache

Why can't one simply download a "package" folder and put that folder in the same folder as your py program and import that way? Because a package is sometimes dependent on sub-packages and maybe "pip"...
ineedastupidusername Data Science 23 16,171 Nov-02-2017, 03:18 PM
    Thread: installing any package= impossible headache
Post: installing any package= impossible headache

So I want to make animation move to the beat of music, viewable on youtube. I figure I need to mess with mp4 etc stuff so I guess I need pymovie. I downloaded the source which 7zipped to a folder "mov...
ineedastupidusername Data Science 23 16,171 Nov-02-2017, 02:41 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020