Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Python exercises help
New Posts  All Forums:Forum Nav:

Python exercises help - Page 3

post #21 of 26
Thread Starter 
Yeah I am using an IDE. Sorry, I forgot to mention that.
Navy Beast
(14 items)
 
Brother's PC
(13 items)
 
 
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800  [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 240 @ 3.0GHz [MSi] 785GM-E51 [MSi] AMD Integrated HD 4200 Kingston 2 x 2GB DDR3 Dual Channel @ 1064MHz 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Green 1TB SATA 2 BENQ DVD DD DW1640 ATA Device IDE Windows Ultimate 64 Bit ASUS VH242 24" 1920 x 1080 
KeyboardPowerCaseMouse
Microsoft USB Digital Media Keyboard (IntelliType) Eurocase 400 watt Eurocase Middle Tower 5425 (no case fans) Microsoft USB Wheel Mouse Optical (IntelliPoint) 
Mouse Pad
N/A 
  hide details  
Reply
Navy Beast
(14 items)
 
Brother's PC
(13 items)
 
 
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800  [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 240 @ 3.0GHz [MSi] 785GM-E51 [MSi] AMD Integrated HD 4200 Kingston 2 x 2GB DDR3 Dual Channel @ 1064MHz 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Green 1TB SATA 2 BENQ DVD DD DW1640 ATA Device IDE Windows Ultimate 64 Bit ASUS VH242 24" 1920 x 1080 
KeyboardPowerCaseMouse
Microsoft USB Digital Media Keyboard (IntelliType) Eurocase 400 watt Eurocase Middle Tower 5425 (no case fans) Microsoft USB Wheel Mouse Optical (IntelliPoint) 
Mouse Pad
N/A 
  hide details  
Reply
post #22 of 26
Quote:
Originally Posted by Atham View Post

Yeah I am using an IDE. Sorry, I forgot to mention that.

If you're using an IDE, then you didn't need to follow the steps you just did. I'm not familiar with the IDE you're using but there should be an option from where you can "import" packages. Look for something like that. Then point it to the place where the unzipped Swampy folder is located and it should import the package and have it ready for use. Then you can just continue writing your code that uses methods/Classes etc. from the Swampy package. When you try to execute that code, the required stuff from Swampy will automatically be accessed so you don't need to worry about anything.

What you were doing right now would be appropriate if you were running all your programs by first typing the code into some text editor like notepad and then passing the appropriate command for executing the Python code in CMD.

EDIT: Hopefully someone who actively uses Python and external packages can come in and give some further input, if need be.
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
post #23 of 26
Thread Starter 
I found import module, but that only imports opened modules.
Navy Beast
(14 items)
 
Brother's PC
(13 items)
 
 
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800  [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 240 @ 3.0GHz [MSi] 785GM-E51 [MSi] AMD Integrated HD 4200 Kingston 2 x 2GB DDR3 Dual Channel @ 1064MHz 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Green 1TB SATA 2 BENQ DVD DD DW1640 ATA Device IDE Windows Ultimate 64 Bit ASUS VH242 24" 1920 x 1080 
KeyboardPowerCaseMouse
Microsoft USB Digital Media Keyboard (IntelliType) Eurocase 400 watt Eurocase Middle Tower 5425 (no case fans) Microsoft USB Wheel Mouse Optical (IntelliPoint) 
Mouse Pad
N/A 
  hide details  
Reply
Navy Beast
(14 items)
 
Brother's PC
(13 items)
 
 
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800  [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 240 @ 3.0GHz [MSi] 785GM-E51 [MSi] AMD Integrated HD 4200 Kingston 2 x 2GB DDR3 Dual Channel @ 1064MHz 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Green 1TB SATA 2 BENQ DVD DD DW1640 ATA Device IDE Windows Ultimate 64 Bit ASUS VH242 24" 1920 x 1080 
KeyboardPowerCaseMouse
Microsoft USB Digital Media Keyboard (IntelliType) Eurocase 400 watt Eurocase Middle Tower 5425 (no case fans) Microsoft USB Wheel Mouse Optical (IntelliPoint) 
Mouse Pad
N/A 
  hide details  
Reply
post #24 of 26
What are you actually trying to use Swampy for?
post #25 of 26
You have to install packages if you want them to be importable for anywhere. You can search for how to do that with Py Portable, but installing essentially just means sticking the folder in the Python Lib/site-packages folder. You can install stuff in a local Python installation and then just copy them to the Py Portable site-packages folder and it'll work.
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
post #26 of 26
Thread Starter 
Oh I see.

So I just copy and paste the file contents into the libs. It works. !

Thanks everyone. I thought I had to paste the folder of the package. Now I know that I have to paste the contents of the package into the libs folder. Thanks a lot.
Quote:
What are you actually trying to use Swampy for?
It is part of a case study in a Python Book.
Navy Beast
(14 items)
 
Brother's PC
(13 items)
 
 
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800  [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 240 @ 3.0GHz [MSi] 785GM-E51 [MSi] AMD Integrated HD 4200 Kingston 2 x 2GB DDR3 Dual Channel @ 1064MHz 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Green 1TB SATA 2 BENQ DVD DD DW1640 ATA Device IDE Windows Ultimate 64 Bit ASUS VH242 24" 1920 x 1080 
KeyboardPowerCaseMouse
Microsoft USB Digital Media Keyboard (IntelliType) Eurocase 400 watt Eurocase Middle Tower 5425 (no case fans) Microsoft USB Wheel Mouse Optical (IntelliPoint) 
Mouse Pad
N/A 
  hide details  
Reply
Navy Beast
(14 items)
 
Brother's PC
(13 items)
 
 
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800  [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
CPUMotherboardGraphicsRAM
[AMD] Athlon II x2 240 @ 3.0GHz [MSi] 785GM-E51 [MSi] AMD Integrated HD 4200 Kingston 2 x 2GB DDR3 Dual Channel @ 1064MHz 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Green 1TB SATA 2 BENQ DVD DD DW1640 ATA Device IDE Windows Ultimate 64 Bit ASUS VH242 24" 1920 x 1080 
KeyboardPowerCaseMouse
Microsoft USB Digital Media Keyboard (IntelliType) Eurocase 400 watt Eurocase Middle Tower 5425 (no case fans) Microsoft USB Wheel Mouse Optical (IntelliPoint) 
Mouse Pad
N/A 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Python exercises help